Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
d74de3a8
Commit
d74de3a8
authored
Mar 27, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web WebLink searched for in subdirectory to WebHandler
parent
7380544c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
21 deletions
+36
-21
java/jpwr/jop/src/JopOpWindow.java
java/jpwr/jop/src/JopOpWindow.java
+36
-21
No files found.
java/jpwr/jop/src/JopOpWindow.java
View file @
d74de3a8
...
@@ -222,28 +222,19 @@ public class JopOpWindow extends JPanel {
...
@@ -222,28 +222,19 @@ public class JopOpWindow extends JPanel {
switch
(
retCid
.
classId
)
{
switch
(
retCid
.
classId
)
{
case
Pwrb
.
cClass_WebLink
:
case
Pwrb
.
cClass_WebLink
:
sret
=
en
.
gdh
.
objidToName
(
oret
.
objid
,
Cdh
.
mName_volumeStrict
);
addWebLinkButton
(
oret
.
objid
);
if
(
sret
.
evenSts
())
return
;
s
=
sret
.
str
+
".URL"
;
sretURL
=
en
.
gdh
.
getObjectInfoString
(
s
);
s
=
sret
.
str
+
".Text"
;
sretText
=
en
.
gdh
.
getObjectInfoString
(
s
);
s
=
sret
.
str
+
".WebTarget"
;
iretTarget
=
en
.
gdh
.
getObjectInfoInt
(
s
);
String
cmd
=
"open url \""
+
sretURL
.
str
+
"\""
;
if
(
iretTarget
.
value
==
Pwrb
.
eWebTargetEnum_RightFrame
)
cmd
=
cmd
+
" /name=\"right\""
;
else
if
(
iretTarget
.
value
==
Pwrb
.
eWebTargetEnum_ParentWindow
)
cmd
=
cmd
+
" /name=\"_parent\""
;
button
=
new
OpWindButton
(
session
,
cmd
,
sretText
.
str
,
OpWindButton
.
WEBLINK
);
this
.
add
(
button
);
break
;
break
;
case
Pwrs
.
cClass_PlantHier
:
case
Pwrs
.
cClass_NodeHier
:
for
(
CdhrObjid
oret2
=
en
.
gdh
.
getChild
(
oret
.
objid
);
oret2
.
oddSts
();
oret2
=
en
.
gdh
.
getNextSibling
(
oret2
.
objid
))
{
CdhrClassId
cret2
=
en
.
gdh
.
getObjectClass
(
oret2
.
objid
);
if
(
cret2
.
oddSts
()
&&
cret2
.
getClassId
()
==
Pwrb
.
cClass_WebLink
)
addWebLinkButton
(
oret2
.
objid
);
}
break
;
default
:
;
}
}
oret
=
en
.
gdh
.
getNextSibling
(
oret
.
objid
);
oret
=
en
.
gdh
.
getNextSibling
(
oret
.
objid
);
}
}
...
@@ -265,6 +256,30 @@ public class JopOpWindow extends JPanel {
...
@@ -265,6 +256,30 @@ public class JopOpWindow extends JPanel {
this
.
add
(
button
);
this
.
add
(
button
);
}
}
void
addWebLinkButton
(
PwrtObjid
oid
)
{
CdhrString
sret
=
en
.
gdh
.
objidToName
(
oid
,
Cdh
.
mName_volumeStrict
);
if
(
sret
.
evenSts
())
return
;
String
s
=
sret
.
str
+
".URL"
;
CdhrString
sretURL
=
en
.
gdh
.
getObjectInfoString
(
s
);
s
=
sret
.
str
+
".Text"
;
CdhrString
sretText
=
en
.
gdh
.
getObjectInfoString
(
s
);
s
=
sret
.
str
+
".WebTarget"
;
CdhrInt
iretTarget
=
en
.
gdh
.
getObjectInfoInt
(
s
);
String
cmd
=
"open url \""
+
sretURL
.
str
+
"\""
;
if
(
iretTarget
.
value
==
Pwrb
.
eWebTargetEnum_RightFrame
)
cmd
=
cmd
+
" /name=\"right\""
;
else
if
(
iretTarget
.
value
==
Pwrb
.
eWebTargetEnum_ParentWindow
)
cmd
=
cmd
+
" /name=\"_parent\""
;
OpWindButton
button
=
new
OpWindButton
(
session
,
cmd
,
sretText
.
str
,
OpWindButton
.
WEBLINK
);
this
.
add
(
button
);
}
class
OpWindButton
extends
JButton
{
class
OpWindButton
extends
JButton
{
public
static
final
int
WEBGRAPH
=
1
;
public
static
final
int
WEBGRAPH
=
1
;
public
static
final
int
WEBLINK
=
2
;
public
static
final
int
WEBLINK
=
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment