Commit 51748cef authored by Claes Sjofors's avatar Claes Sjofors

WebGraph object searched for also in one herarchiy level below WebHandler

parent e24aa4a6
...@@ -196,20 +196,19 @@ public class JopOpWindow extends JPanel { ...@@ -196,20 +196,19 @@ public class JopOpWindow extends JPanel {
switch( retCid.classId) { switch( retCid.classId) {
case Pwrb.cClass_WebGraph: case Pwrb.cClass_WebGraph:
sret = en.gdh.objidToName( oret.objid, Cdh.mName_volumeStrict); addWebGraphButton( oret.objid);
if ( sret.evenSts()) return; break;
case Pwrs.cClass_PlantHier:
s = sret.str + ".Name"; case Pwrs.cClass_NodeHier:
sretName = en.gdh.getObjectInfoString( s); for ( CdhrObjid oret2 = en.gdh.getChild(oret.objid);
oret2.oddSts();
s = sret.str + ".Text"; oret2 = en.gdh.getNextSibling(oret2.objid)) {
sretText = en.gdh.getObjectInfoString( s); CdhrClassId cret2 = en.gdh.getObjectClass(oret2.objid);
if (cret2.oddSts() && cret2.getClassId() == Pwrb.cClass_WebGraph)
addWebGraphButton(oret2.objid);
button = new OpWindButton( session, sretName.str, sretText.str, }
OpWindButton.WEBGRAPH);
this.add( button);
break; break;
default: ;
} }
oret = en.gdh.getNextSibling( oret.objid); oret = en.gdh.getNextSibling( oret.objid);
} }
...@@ -250,6 +249,22 @@ public class JopOpWindow extends JPanel { ...@@ -250,6 +249,22 @@ public class JopOpWindow extends JPanel {
} }
} }
void addWebGraphButton( PwrtObjid oid) {
CdhrString sret = en.gdh.objidToName( oid, Cdh.mName_volumeStrict);
if ( sret.evenSts()) return;
String s = sret.str + ".Name";
CdhrString sretName = en.gdh.getObjectInfoString( s);
s = sret.str + ".Text";
CdhrString sretText = en.gdh.getObjectInfoString( s);
OpWindButton button = new OpWindButton( session, sretName.str, sretText.str,
OpWindButton.WEBGRAPH);
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment