Commit 44956b4e authored by Claes Sjofors's avatar Claes Sjofors

Java classgraphs, functionallity for method buttons added

parent 029e26bb
...@@ -36,6 +36,7 @@ public class GeDynInvisible extends GeDynElem { ...@@ -36,6 +36,7 @@ public class GeDynInvisible extends GeDynElem {
boolean cmd = false; boolean cmd = false;
boolean valueCmd = false; boolean valueCmd = false;
int bitNum; int bitNum;
String command;
public GeDynInvisible( GeDyn dyn, String attribute, int dimmed) { public GeDynInvisible( GeDyn dyn, String attribute, int dimmed) {
super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No); super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No);
...@@ -48,6 +49,7 @@ public class GeDynInvisible extends GeDynElem { ...@@ -48,6 +49,7 @@ public class GeDynInvisible extends GeDynElem {
if ( attrName.toLowerCase().startsWith("$cmd(")) { if ( attrName.toLowerCase().startsWith("$cmd(")) {
cmd = true; cmd = true;
valueCmd = false; valueCmd = false;
command = attrName.substring(5, attrName.length()-1);
} }
else { else {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName); GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
...@@ -85,10 +87,14 @@ public class GeDynInvisible extends GeDynElem { ...@@ -85,10 +87,14 @@ public class GeDynInvisible extends GeDynElem {
public void scan() { public void scan() {
if ( cmd) { if ( cmd) {
if ( firstScan) { if ( firstScan) {
if ( dimmed == 0) int sts = Jop.executeCommand( dyn.session, command);
dyn.comp.setVisibility( Ge.VISIBILITY_INVISIBLE); System.out.println( "DynInvisible: " + command + ", value: " + sts);
else if ( sts == 0) {
dyn.comp.setVisibility( Ge.VISIBILITY_DIMMED); if ( dimmed == 0)
dyn.comp.setVisibility( Ge.VISIBILITY_INVISIBLE);
else
dyn.comp.setVisibility( Ge.VISIBILITY_DIMMED);
}
firstScan = false; firstScan = false;
} }
return; return;
......
...@@ -35,7 +35,7 @@ public class Jop { ...@@ -35,7 +35,7 @@ public class Jop {
public static final int BUTTON_ACTION_TOGGLE = 2; public static final int BUTTON_ACTION_TOGGLE = 2;
public static final int BUTTON_ACTION_COMMAND = 3; public static final int BUTTON_ACTION_COMMAND = 3;
public static void executeCommand( JopSession session, String command) { public static int executeCommand( JopSession session, String command) {
JopSpider.command( session, command); return JopSpider.command( session, command);
} }
} }
This diff is collapsed.
This diff is collapsed.
...@@ -37,7 +37,7 @@ public interface JopSessionIfc { ...@@ -37,7 +37,7 @@ public interface JopSessionIfc {
public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph); public void openGraphFrame( String name, String instance, boolean scrollbar, boolean classGraph);
public void openFlowFrame( PwrtObjid oid, String center); public void openFlowFrame( PwrtObjid oid, String center);
public void openCrrFrame( String name); public void openCrrFrame( String name);
public void executeCommand( String command); public int executeCommand( String command);
public boolean isApplet(); public boolean isApplet();
public boolean isApplication(); public boolean isApplication();
public boolean isOpWindowApplet(); public boolean isOpWindowApplet();
......
...@@ -168,9 +168,14 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -168,9 +168,14 @@ public class JopSessionRep implements JopSessionIfc {
if ( coid.objid.vid == 1) if ( coid.objid.vid == 1)
name = "jpwr.jopc.Jopc" + sret.str.substring(1,2).toUpperCase() + name = "jpwr.jopc.Jopc" + sret.str.substring(1,2).toUpperCase() +
sret.str.substring(2).toLowerCase() + suffix; sret.str.substring(2).toLowerCase() + suffix;
else if ( coid.objid.vid == 10) else if ( coid.objid.vid == 10) {
name = "jpwr.bcomp.Jopc" + sret.str.substring(0,1).toUpperCase() + if ( sret.str.startsWith( "BaseFcPPO"))
sret.str.substring(1).toLowerCase() + suffix; name = "jpwr.bcompfc.Jopc" + sret.str.substring(0,1).toUpperCase() +
sret.str.substring(1).toLowerCase() + suffix;
else
name = "jpwr.bcomp.Jopc" + sret.str.substring(0,1).toUpperCase() +
sret.str.substring(1).toLowerCase() + suffix;
}
else else
name = "jpwr.jopc.Jopc" + sret.str.substring(0,1).toUpperCase() + name = "jpwr.jopc.Jopc" + sret.str.substring(0,1).toUpperCase() +
sret.str.substring(1).toLowerCase() + suffix; sret.str.substring(1).toLowerCase() + suffix;
...@@ -228,7 +233,8 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -228,7 +233,8 @@ public class JopSessionRep implements JopSessionIfc {
for ( int i = 0; i < frames.size(); i++) { for ( int i = 0; i < frames.size(); i++) {
Object o = frames.get(i); Object o = frames.get(i);
PwrtObjid utilityObjid = ((JopUtilityIfc) o).getUtilityObjid(); PwrtObjid utilityObjid = ((JopUtilityIfc) o).getUtilityObjid();
if ( ((JopUtilityIfc) o).getUtilityType() == type && if ( ((JopUtilityIfc) o).getUtilityType() == type &&
utilityObjid != null &&
utilityObjid.oix == objid.oix && utilityObjid.vid == objid.vid) { utilityObjid.oix == objid.oix && utilityObjid.vid == objid.vid) {
return o; return o;
} }
...@@ -288,8 +294,8 @@ public class JopSessionRep implements JopSessionIfc { ...@@ -288,8 +294,8 @@ public class JopSessionRep implements JopSessionIfc {
} }
public void executeCommand( String command) { public int executeCommand( String command) {
JopSpider.command( session, command); return JopSpider.command( session, command);
} }
public boolean isApplet() { public boolean isApplet() {
......
This diff is collapsed.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
package jpwr.jop; package jpwr.jop;
public class JopUtility { public class JopUtility {
public static final int NO = 0;
public static final int TRACE = 1; public static final int TRACE = 1;
public static final int GRAPH = 2; public static final int GRAPH = 2;
public static final int NAVIGATOR = 3; public static final int NAVIGATOR = 3;
......
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