Commit fb0ef6e2 authored by claes's avatar claes

New ge fetched from 3.9

parent 53d04b2f
...@@ -8,4 +8,5 @@ public class Ge { ...@@ -8,4 +8,5 @@ public class Ge {
public static final int DIRECTION_LEFT = 2; public static final int DIRECTION_LEFT = 2;
public static final int DIRECTION_UP = 3; public static final int DIRECTION_UP = 3;
public static final int DIRECTION_DOWN = 4; public static final int DIRECTION_DOWN = 4;
public static final float cJBean_Offset = 2;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package jpwr.jop;
import jpwr.rt.*;
public interface GeComponentIfc {
public void tsetFillColor( int fillColor);
public void tsetColorTone( int colorTone);
public void tsetBorderColor( int borderColor);
public void tsetTextColor( int textColor);
public void setColorInverse( int inverse);
public void resetFillColor();
public void resetColorTone();
public void resetBorderColor();
public void resetTextColor();
public void setFillLevel( float fillLevel);
public void setLevelDirection( int levelDirection);
public void setLevelColorTone( int levelColorTone);
public void setLevelFillColor( int levelFillColor);
public String getAnnot1();
public void setAnnot1( String annot1);
public void setLastPage();
public void setFirstPage();
public void setPage( int page);
public int setNextPage();
public int setPreviousPage();
public Object getDd();
public void repaintForeground();
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDyn {
public static final int mDynType_No = 0;
public static final int mDynType_Inherit = 1 << 0;
public static final int mDynType_Tone = 1 << 1;
public static final int mDynType_DigLowColor = 1 << 2;
public static final int mDynType_DigColor = 1 << 3;
public static final int mDynType_DigError = 1 << 4;
public static final int mDynType_DigWarning = 1 << 5;
public static final int mDynType_DigFlash = 1 << 6;
public static final int mDynType_Invisible = 1 << 7;
public static final int mDynType_DigBorder = 1 << 8;
public static final int mDynType_DigText = 1 << 9;
public static final int mDynType_Value = 1 << 10;
public static final int mDynType_AnalogColor = 1 << 11;
public static final int mDynType_Rotate = 1 << 12;
public static final int mDynType_Move = 1 << 13;
public static final int mDynType_AnalogShift = 1 << 14;
public static final int mDynType_DigShift = 1 << 15;
public static final int mDynType_Animation = 1 << 16;
public static final int mDynType_Bar = 1 << 17;
public static final int mDynType_Trend = 1 << 18;
public static final int mDynType_SliderBackground = 1 << 19;
public static final int mDynType_Video = 1 << 20;
public static final int mDynType_FillLevel = 1 << 21;
public static final int mDynType_FastCurve = 1 << 22;
public static final int mDynType_AnalogText = 1 << 23;
public static final int mActionType_No = 0;
public static final int mActionType_Inherit = 1 << 0;
public static final int mActionType_PopupMenu = 1 << 1;
public static final int mActionType_SetDig = 1 << 2;
public static final int mActionType_ResetDig = 1 << 3;
public static final int mActionType_ToggleDig = 1 << 4;
public static final int mActionType_StoDig = 1 << 5;
public static final int mActionType_Command = 1 << 6;
public static final int mActionType_CommandDoubleClick = 1 << 7;
public static final int mActionType_Confirm = 1 << 8;
public static final int mActionType_IncrAnalog = 1 << 9;
public static final int mActionType_RadioButton = 1 << 10;
public static final int mActionType_Slider = 1 << 11;
public static final int mActionType_ValueInput = 1 << 12;
public static final int mActionType_TipText = 1 << 13;
public static final int mActionType_CloseGraph = 1 << 18;
public static final int mActionType_PulldownMenu = 1 << 19;
public static final int mActionType_OptionMenu = 1 << 20;
public static final int eAnimSequence_Cycle = 0;
public static final int eAnimSequence_Dig = 1;
public static final int eAnimSequence_ForwBack = 2;
public static final int eLimitType_Gt = 0;
public static final int eLimitType_Lt = 1;
public static final int eEvent_MB1Up = 0;
public static final int eEvent_MB1Down = 1;
public static final int eEvent_MB1Click = 2;
public static final int eEvent_MB3Press = 3;
public static final int eEvent_SliderMoved = 4;
public static final int eEvent_ValueChanged = 5;
public static final int eEvent_FocusLost = 6;
public int dynType;
public int actionType;
public int access;
public GeDynElemIfc[] elements;
public GeComponentIfc comp;
public String instance;
public boolean ignoreColor;
public boolean resetColor;
public boolean repaintNow;
public JopSession session;
public JopEngine en;
public boolean invisible;
public boolean invisibleOld;
public double rotate;
public double x0;
public double y0;
public GeDyn( Object comp) {
this.comp = (GeComponentIfc) comp;
}
public GeDyn( Object comp, int dynType, int actionType, int access, GeDynElemIfc[] elements) {
this.comp = (GeComponentIfc) comp;
this.dynType = dynType;
this.actionType = actionType;
this.access = access;
this.elements = elements;
}
public void setSession( JopSession session) {
this.session = session;
en = session.getEngine();
}
public void setDynType( int dynType) {
this.dynType = dynType;
}
public void setActionType( int actionType) {
this.actionType = actionType;
}
public void setAccess( int access) {
this.access = access;
}
public void setInstance( String instance) {
this.instance = instance;
}
public void setElements( GeDynElemIfc[] elements) {
this.elements = elements;
}
public void connect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].connect();
}
public void disconnect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].disconnect();
}
public void scan() {
if ( elements == null)
return;
resetColor = false;
ignoreColor = false;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].scan();
if ( repaintNow)
comp.repaintForeground();
}
public void action( int eventType, MouseEvent e) {
if ( elements == null)
return;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
if ( repaintNow)
comp.repaintForeground();
}
public void confirmedAction( int eventType, MouseEvent e) {
if ( elements == null)
return;
actionType = actionType & ~mActionType_Confirm;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
actionType = actionType | mActionType_Confirm;
}
public String getAttrName( String str) {
if ( instance == null) {
if ( str.startsWith("!"))
return str.substring(1);
else
return str;
}
else {
String s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
return s.substring(1);
else
return s;
}
}
public String getAttrNameNoSuffix( String str) {
int startIdx;
String s;
if ( instance == null)
s = str;
else
s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
startIdx = 1;
else
startIdx = 0;
int idx1 = s.indexOf('#');
if ( idx1 != -1) {
int idx2 = s.indexOf('[');
if ( idx2 != -1)
return s.substring( startIdx, idx1) + s.substring(idx2);
else
return s.substring( startIdx, idx1);
}
else
return s.substring(startIdx);
}
static public boolean getAttrInverted( String str) {
return str.startsWith("!");
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogColor extends GeDynElem {
String attribute;
double limit;
int limitType;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
boolean oldState;
boolean isMainInstance = false;
public GeDynAnalogColor( GeDyn dyn, String attribute,
double limit, int limitType, int color) {
super( dyn, GeDyn.mDynType_AnalogColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.limit = limit;
this.limitType = limitType;
this.color = color;
}
public void connect() {
// Find the main instance
GeDynAnalogColor mainInstance = null;
for ( int i = dyn.elements.length - 1; i >= 0; i--) {
if ( dyn.elements[i].getDynType() == GeDyn.mDynType_AnalogColor) {
mainInstance = (GeDynAnalogColor)dyn.elements[i];
break;
}
}
if ( mainInstance != null) {
if ( !mainInstance.attrFound) {
String attrName = dyn.getAttrName( mainInstance.attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogColor: " + attrName);
else
mainInstance.attrFound = true;
mainInstance.p = ret.id;
mainInstance.subid = ret.refid;
mainInstance.isMainInstance = true;
}
}
p = mainInstance.p;
attrFound = mainInstance.attrFound;
}
}
public void disconnect() {
if ( isMainInstance && attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
int i;
if ( !firstScan) {
if ( !dyn.resetColor && value == oldValue) {
if ( oldState)
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
boolean state;
boolean set_color = false;
boolean reset_color = false;
if ( limitType == GeDyn.eLimitType_Gt)
state = value > limit;
else
state = value < limit;
if ( state != oldState || dyn.resetColor || firstScan) {
if ( state) {
set_color = true;
dyn.ignoreColor = true;
}
else {
reset_color = true;
dyn.resetColor = true;
}
oldState = state;
}
else if ( state)
dyn.ignoreColor = true;
oldValue = value;
if ( !set_color && !reset_color)
return;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( set_color) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( set_color) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogShift extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
public GeDynAnalogShift( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_AnalogShift, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValue || firstScan) {
dyn.comp.setPage( (int)(value0 + 1.5));
dyn.repaintNow = true;
oldValue = value0;
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynAnalogText extends GeDynOptionMenu {
public GeDynAnalogText( GeDyn dyn, String attribute, String[] itemsText, int[] itemsEnum) {
super( dyn, attribute, itemsText, itemsEnum);
this.dynType = GeDyn.mDynType_AnalogText;
this.actionType = GeDyn.mActionType_No;
}
public void action( int eventType, MouseEvent e) {
}
}
package jpwr.jop;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynAnimation extends GeDynElem {
String attribute;
int sequence;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
int animationCount;
int animationDirection;
public GeDynAnimation( GeDyn dyn, String attribute, int sequence) {
super( dyn, GeDyn.mDynType_Animation, GeDyn.mActionType_No);
this.attribute = attribute;
this.sequence = sequence;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean repaintNow = false;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
int sts;
int maxCount;
switch ( sequence) {
case GeDyn.eAnimSequence_Cycle:
case GeDyn.eAnimSequence_ForwBack: {
if ( firstScan) {
animationCount = 0;
animationDirection = 1;
}
if ( (!inverted && value0) || (inverted && !value0)) {
if ( animationDirection == 0) {
animationCount = 0;
animationDirection = 1;
}
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
if ( sequence == GeDyn.eAnimSequence_Cycle)
// Start from beginning the again
dyn.comp.setPage( 2);
else {
// Change direction
animationDirection = 2;
dyn.comp.setPreviousPage();
}
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// Change direction
animationDirection = 1;
dyn.comp.setNextPage();
}
animationCount = 0;
repaintNow = true;
}
}
}
else {
if ( animationDirection != 0) {
animationDirection = 0;
dyn.comp.setFirstPage();
repaintNow = true;
}
}
break;
}
case GeDyn.eAnimSequence_Dig: {
if ( firstScan) {
animationCount = 0;
animationDirection = 0;
if ( (!inverted && value0) || (inverted && !value0)) {
dyn.comp.setLastPage();
repaintNow = true;
}
oldValue = value0;
}
if ( oldValue != value0) {
// Start animation
if ( (!inverted && value0) || (inverted && !value0)) {
animationCount = 0;
animationDirection = 1;
}
else if ( (!inverted && !value0) || (inverted && value0)) {
animationCount = 0;
animationDirection = 2;
}
}
if ( animationDirection != 0) {
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
}
}
break;
}
}
oldValue = value0;
if ( repaintNow)
((JComponent)dyn.comp).repaint();
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynCloseGraph extends GeDynElem {
String command;
public GeDynCloseGraph( GeDyn dyn) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_CloseGraph);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
JopDynamic comp = (JopDynamic)dyn.comp;
if ( comp.dynamicGetRoot() instanceof JFrame)
((JFrame)comp.dynamicGetRoot()).dispose();
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynCommand extends GeDynElem {
String command;
public GeDynCommand( GeDyn dyn, String command) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Command);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
Jop.executeCommand( dyn.session, command);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
public class GeDynConfirm extends GeDynElem {
String text;
public GeDynConfirm( GeDyn dyn, String text) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Confirm);
this.text = text;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Click:
case GeDyn.eEvent_ValueChanged:
JopConfirmDialog.open( (Component)dyn.comp, text);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigBorder extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigBorder( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigBorder, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && !value) || (inverted && value)) {
dyn.comp.tsetBorderColor( color);
}
else {
dyn.comp.resetBorderColor();
}
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigColor extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigColor( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigError extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigError( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigError, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigError: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetColorTone( GeColor.COLOR_TONE_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( GeColor.COLOR_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigFlash extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
boolean on;
public GeDynDigFlash( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigFlash, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( !((!inverted && value) || (inverted && !value)))
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public interface GeDynElemIfc {
public int getDynType();
public int getActionType();
public void connect();
public void disconnect();
public void scan();
public void action( int eventType, MouseEvent e);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,4 +2,5 @@ package jpwr.jop; ...@@ -2,4 +2,5 @@ package jpwr.jop;
public interface JopConfirm { public interface JopConfirm {
public void confirmYes(); public void confirmYes();
public void confirmNo();
} }
This diff is collapsed.
This diff is collapsed.
...@@ -8,4 +8,5 @@ public class Ge { ...@@ -8,4 +8,5 @@ public class Ge {
public static final int DIRECTION_LEFT = 2; public static final int DIRECTION_LEFT = 2;
public static final int DIRECTION_UP = 3; public static final int DIRECTION_UP = 3;
public static final int DIRECTION_DOWN = 4; public static final int DIRECTION_DOWN = 4;
public static final float cJBean_Offset = 2;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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