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