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
eb4b2236
Commit
eb4b2236
authored
Feb 25, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dimmed and HostObject dynamics
parent
9e2fb5c7
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
445 additions
and
116 deletions
+445
-116
java/jpwr/jop/src/Ge.java
java/jpwr/jop/src/Ge.java
+3
-0
java/jpwr/jop/src/GeColor.java
java/jpwr/jop/src/GeColor.java
+16
-4
java/jpwr/jop/src/GeComponent.java
java/jpwr/jop/src/GeComponent.java
+27
-1
java/jpwr/jop/src/GeComponentIfc.java
java/jpwr/jop/src/GeComponentIfc.java
+1
-0
java/jpwr/jop/src/GeDyn.java
java/jpwr/jop/src/GeDyn.java
+42
-11
java/jpwr/jop/src/GeDynHostObject.java
java/jpwr/jop/src/GeDynHostObject.java
+25
-0
java/jpwr/jop/src/GeDynInvisible.java
java/jpwr/jop/src/GeDynInvisible.java
+74
-22
java/jpwr/jop/src/GeDynTipText.java
java/jpwr/jop/src/GeDynTipText.java
+13
-1
java/jpwr/jop/src/GeFrameThin.java
java/jpwr/jop/src/GeFrameThin.java
+4
-4
java/jpwr/jop/src/GeTable.java
java/jpwr/jop/src/GeTable.java
+6
-5
java/jpwr/jop/src/GeTextField.java
java/jpwr/jop/src/GeTextField.java
+6
-5
java/jpwr/jop/src/JopButtontoggle.java
java/jpwr/jop/src/JopButtontoggle.java
+3
-3
java/jpwr/jop/src/JopFilter.java
java/jpwr/jop/src/JopFilter.java
+1
-1
java/jpwr/jop/src/JopSpider.java
java/jpwr/jop/src/JopSpider.java
+1
-1
src/jpwr/jop/src/Ge.java
src/jpwr/jop/src/Ge.java
+3
-0
src/jpwr/jop/src/GeColor.java
src/jpwr/jop/src/GeColor.java
+16
-4
src/jpwr/jop/src/GeComponent.java
src/jpwr/jop/src/GeComponent.java
+27
-1
src/jpwr/jop/src/GeComponentIfc.java
src/jpwr/jop/src/GeComponentIfc.java
+1
-0
src/jpwr/jop/src/GeDyn.java
src/jpwr/jop/src/GeDyn.java
+42
-11
src/jpwr/jop/src/GeDynHostObject.java
src/jpwr/jop/src/GeDynHostObject.java
+25
-0
src/jpwr/jop/src/GeDynInvisible.java
src/jpwr/jop/src/GeDynInvisible.java
+74
-22
src/jpwr/jop/src/GeDynTipText.java
src/jpwr/jop/src/GeDynTipText.java
+13
-1
src/jpwr/jop/src/GeFrameThin.java
src/jpwr/jop/src/GeFrameThin.java
+4
-4
src/jpwr/jop/src/GeTable.java
src/jpwr/jop/src/GeTable.java
+6
-5
src/jpwr/jop/src/GeTextField.java
src/jpwr/jop/src/GeTextField.java
+6
-5
src/jpwr/jop/src/JopButtontoggle.java
src/jpwr/jop/src/JopButtontoggle.java
+3
-3
src/jpwr/jop/src/JopFilter.java
src/jpwr/jop/src/JopFilter.java
+1
-1
src/jpwr/jop/src/JopSpider.java
src/jpwr/jop/src/JopSpider.java
+1
-1
src/jpwr/jop/src/os_linux/hw_x86/makefile
src/jpwr/jop/src/os_linux/hw_x86/makefile
+1
-0
No files found.
java/jpwr/jop/src/Ge.java
View file @
eb4b2236
...
...
@@ -8,5 +8,8 @@ public class Ge {
public
static
final
int
DIRECTION_LEFT
=
2
;
public
static
final
int
DIRECTION_UP
=
3
;
public
static
final
int
DIRECTION_DOWN
=
4
;
public
static
final
int
VISIBILITY_VISIBLE
=
0
;
public
static
final
int
VISIBILITY_INVISIBLE
=
1
;
public
static
final
int
VISIBILITY_DIMMED
=
2
;
public
static
final
float
cJBean_Offset
=
2
;
}
java/jpwr/jop/src/GeColor.java
View file @
eb4b2236
...
...
@@ -585,7 +585,7 @@ public class GeColor {
public
static
int
getDrawtype
(
int
local_drawtype
,
int
color_tone
,
int
color_shift
,
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
)
{
int
color_brightness
,
int
color_inverse
,
int
default_color
,
boolean
dimmed
)
{
int
drawtype
;
int
base_drawtype
;
int
incr
;
...
...
@@ -665,6 +665,18 @@ public class GeColor {
if
(
drawtype
>=
10
)
drawtype
=
drawtype
+
10
-
2
*
(
drawtype
%
10
)
-
1
;
}
if
(
dimmed
)
{
if
(
drawtype
==
0
)
drawtype
=
25
;
else
if
(
26
<=
drawtype
&&
drawtype
<=
29
)
drawtype
=
drawtype
-
4
;
else
if
(
36
<=
drawtype
&&
drawtype
<=
39
)
drawtype
=
drawtype
-
4
;
else
if
(
46
<=
drawtype
&&
drawtype
<=
49
)
drawtype
=
drawtype
-
4
;
else
if
(
56
<=
drawtype
&&
drawtype
<=
59
)
drawtype
=
drawtype
-
4
;
}
if
(
drawtype
<
0
||
drawtype
>=
300
)
{
System
.
out
.
println
(
"** Invalid drawtype"
);
drawtype
=
0
;
...
...
@@ -679,10 +691,10 @@ public class GeColor {
}
public
static
Color
getColor
(
int
local_drawtype
,
int
color_tone
,
int
color_shift
,
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
)
{
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
,
boolean
dimmed
)
{
int
drawtype
=
getDrawtype
(
local_drawtype
,
color_tone
,
color_shift
,
color_intensity
,
color_brightness
,
color_inverse
,
default_color
);
color_brightness
,
color_inverse
,
default_color
,
dimmed
);
if
(
colors
[
drawtype
]
==
null
)
colors
[
drawtype
]
=
rgbColor
(
drawtype
);
return
colors
[
drawtype
];
...
...
java/jpwr/jop/src/GeComponent.java
View file @
eb4b2236
...
...
@@ -52,6 +52,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
if
(
dd
.
actionType
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
{
this
.
addMouseListener
(
new
MouseAdapter
()
{
public
void
mouseReleased
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
(
e
.
isPopupTrigger
())
dd
.
action
(
GeDyn
.
eEvent_MB3Press
,
e
);
else
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
...
...
@@ -60,6 +62,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
}
public
void
mousePressed
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
(
e
.
isPopupTrigger
())
dd
.
action
(
GeDyn
.
eEvent_MB3Press
,
e
);
else
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
...
...
@@ -67,6 +71,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
dd
.
action
(
GeDyn
.
eEvent_MB1Down
,
e
);
}
public
void
mouseClicked
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
dd
.
action
(
GeDyn
.
eEvent_MB1Click
,
e
);
...
...
@@ -75,7 +81,7 @@ public class GeComponent extends JComponent implements GeComponentIfc,
if
(
(
dd
.
actionType
&
GeDyn
.
mActionType_Slider
)
!=
0
)
{
this
.
addMouseMotionListener
(
new
MouseMotionAdapter
()
{
public
void
mouseDragged
(
MouseEvent
e
)
{
if
(
actionDisabled
)
if
(
actionDisabled
||
dimmed
)
return
;
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
...
...
@@ -104,6 +110,24 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
}
public
void
resetBorderColor
()
{
borderColor
=
originalBorderColor
;}
public
void
resetTextColor
()
{
textColor
=
originalTextColor
;}
public
void
setVisibility
(
int
visibility
)
{
switch
(
visibility
)
{
case
Ge
.
VISIBILITY_VISIBLE
:
visible
=
true
;
dimmed
=
false
;
break
;
case
Ge
.
VISIBILITY_INVISIBLE
:
visible
=
false
;
dimmed
=
false
;
repaint
();
break
;
case
Ge
.
VISIBILITY_DIMMED
:
visible
=
true
;
dimmed
=
true
;
repaint
();
break
;
}
}
public
String
getAnnot1
()
{
return
annot1
;}
public
void
setAnnot1
(
String
s
)
{
annot1
=
s
;}
public
Object
getDd
()
{
return
dd
;}
...
...
@@ -139,6 +163,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
int
levelColorTone
=
0
;
public
int
levelFillColor
=
0
;
public
int
shadow
=
0
;
public
boolean
visible
=
true
;
public
boolean
dimmed
=
false
;
public
void
setColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
originalColorTone
=
colorTone
;
...
...
java/jpwr/jop/src/GeComponentIfc.java
View file @
eb4b2236
...
...
@@ -15,6 +15,7 @@ public interface GeComponentIfc {
public
void
setLevelDirection
(
int
levelDirection
);
public
void
setLevelColorTone
(
int
levelColorTone
);
public
void
setLevelFillColor
(
int
levelFillColor
);
public
void
setVisibility
(
int
visibility
);
public
String
getAnnot1
();
public
void
setAnnot1
(
String
annot1
);
public
void
setLastPage
();
...
...
java/jpwr/jop/src/GeDyn.java
View file @
eb4b2236
...
...
@@ -30,6 +30,7 @@ public class GeDyn {
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_Table
=
1
<<
24
;
public
static
final
int
mDynType_StatusColor
=
1
<<
25
;
public
static
final
int
mDynType_HostObject
=
1
<<
26
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
...
...
@@ -75,17 +76,16 @@ public class GeDyn {
public
GeDynElemIfc
[]
elements
;
public
GeComponentIfc
comp
;
public
String
instance
;
public
String
hostObject
;
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
double
rotate
;
public
double
x0
;
public
double
y0
;
public
GeDyn
(
Object
comp
)
{
this
.
comp
=
(
GeComponentIfc
)
comp
;
...
...
@@ -113,6 +113,9 @@ public class GeDyn {
public
void
setInstance
(
String
instance
)
{
this
.
instance
=
instance
;
}
public
void
setHostObject
(
String
hostObject
)
{
this
.
hostObject
=
hostObject
;
}
public
void
setElements
(
GeDynElemIfc
[]
elements
)
{
this
.
elements
=
elements
;
}
...
...
@@ -161,11 +164,35 @@ public class GeDyn {
}
public
String
getAttrName
(
String
str
)
{
if
(
str
.
toLowerCase
().
startsWith
(
"$node"
))
{
int
nix
;
if
(
instance
==
null
)
nix
=
0
;
else
{
CdhrObjid
cdhr_inst
=
en
.
gdh
.
nameToObjid
(
instance
);
nix
=
cdhr_inst
.
objid
.
vid
;
}
CdhrObjid
cdhr_node
=
en
.
gdh
.
getNodeObject
(
nix
);
if
(
cdhr_node
.
evenSts
())
return
str
;
CdhrString
cdhr_ns
=
en
.
gdh
.
objidToName
(
cdhr_node
.
objid
,
Cdh
.
mName_volumeStrict
);
if
(
cdhr_ns
.
evenSts
())
return
str
;
String
s
=
RtUtilities
.
strReplace
(
str
,
"$node"
,
cdhr_ns
.
str
);
return
s
;
}
if
(
instance
==
null
)
{
if
(
str
.
startsWith
(
"!"
))
return
str
.
substring
(
1
);
else
return
str
;
if
(
hostObject
==
null
)
{
if
(
str
.
startsWith
(
"!"
))
return
str
.
substring
(
1
);
else
return
str
;
}
else
{
String
s
=
RtUtilities
.
strReplace
(
str
,
"$hostobject"
,
hostObject
);
if
(
s
.
startsWith
(
"!"
))
return
s
.
substring
(
1
);
else
return
s
;
}
}
else
{
String
s
=
RtUtilities
.
strReplace
(
str
,
"$object"
,
instance
);
...
...
@@ -179,8 +206,12 @@ public class GeDyn {
public
String
getAttrNameNoSuffix
(
String
str
)
{
int
startIdx
;
String
s
;
if
(
instance
==
null
)
s
=
str
;
if
(
instance
==
null
)
{
if
(
hostObject
==
null
)
s
=
str
;
else
s
=
RtUtilities
.
strReplace
(
str
,
"$hostobject"
,
hostObject
);
}
else
s
=
RtUtilities
.
strReplace
(
str
,
"$object"
,
instance
);
...
...
java/jpwr/jop/src/GeDynHostObject.java
0 → 100644
View file @
eb4b2236
package
jpwr.jop
;
import
jpwr.rt.*
;
public
class
GeDynHostObject
extends
GeDynElem
{
public
GeDynHostObject
(
GeDyn
dyn
,
String
hostObject
)
{
super
(
dyn
,
GeDyn
.
mDynType_HostObject
,
GeDyn
.
mActionType_No
);
dyn
.
setHostObject
(
hostObject
);
}
public
void
connect
()
{
}
public
void
disconnect
()
{
}
public
void
scan
()
{
}
}
java/jpwr/jop/src/GeDynInvisible.java
View file @
eb4b2236
...
...
@@ -3,29 +3,42 @@ import jpwr.rt.*;
public
class
GeDynInvisible
extends
GeDynElem
{
String
attribute
;
int
dimmed
;
boolean
attrFound
;
PwrtRefId
subid
;
int
typeId
;
int
p
;
boolean
inverted
;
boolean
oldValue
;
boolean
oldValueB
;
String
oldValueS
;
boolean
firstScan
=
true
;
boolean
cmd
=
false
;
boolean
valueCmd
=
false
;
public
GeDynInvisible
(
GeDyn
dyn
,
String
attribute
)
{
public
GeDynInvisible
(
GeDyn
dyn
,
String
attribute
,
int
dimmed
)
{
super
(
dyn
,
GeDyn
.
mDynType_Invisible
,
GeDyn
.
mActionType_No
);
this
.
attribute
=
attribute
;
this
.
dimmed
=
dimmed
;
}
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
(
"DigInvisible: "
+
attrName
);
if
(
attrName
.
toLowerCase
().
startsWith
(
"$cmd("
))
{
cmd
=
true
;
valueCmd
=
false
;
}
else
{
attrFound
=
true
;
p
=
ret
.
id
;
subid
=
ret
.
refid
;
inverted
=
GeDyndata
.
getAttrInverted
(
attribute
);
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"DigInvisible: "
+
attrName
);
else
{
attrFound
=
true
;
p
=
ret
.
id
;
subid
=
ret
.
refid
;
typeId
=
ret
.
typeId
;
inverted
=
GeDyndata
.
getAttrInverted
(
attribute
);
}
}
}
}
...
...
@@ -34,26 +47,65 @@ public class GeDynInvisible extends GeDynElem {
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
}
public
void
scan
()
{
if
(
cmd
)
{
if
(
firstScan
)
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
firstScan
=
false
;
}
return
;
}
if
(
!
attrFound
)
return
;
boolean
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
);
if
(
!
firstScan
)
{
if
(
value
==
oldValue
)
{
// No change since last time
return
;
switch
(
typeId
)
{
case
Pwr
.
eType_Boolean
:
{
boolean
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
);
if
(
!
firstScan
)
{
if
(
value
==
oldValueB
)
{
// No change since last time
return
;
}
}
else
firstScan
=
false
;
if
(
(!
inverted
&&
value
)
||
(
inverted
&&
!
value
))
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
}
else
{
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_VISIBLE
);
}
dyn
.
repaintNow
=
true
;
oldValueB
=
value
;
break
;
}
else
firstScan
=
false
;
case
Pwr
.
eType_String
:
{
String
value0
;
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoString
(
p
,
typeId
);
if
(
(!
inverted
&&
value
)
||
(
inverted
&&
!
value
))
{
dyn
.
invisible
=
true
;
if
(
firstScan
||
value0
.
compareTo
(
oldValueS
)
!=
0
)
{
if
(
value0
.
compareTo
(
""
)
==
0
)
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
}
else
{
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_VISIBLE
);
}
dyn
.
repaintNow
=
true
;
oldValueS
=
value0
;
if
(
firstScan
)
firstScan
=
false
;
}
break
;
}
else
{
dyn
.
invisible
=
false
;
}
dyn
.
repaintNow
=
true
;
oldValue
=
value
;
}
}
...
...
java/jpwr/jop/src/GeDynTipText.java
View file @
eb4b2236
...
...
@@ -6,12 +6,24 @@ import javax.swing.*;
public
class
GeDynTipText
extends
GeDynElem
{
String
text
;
boolean
attrFound
=
false
;
public
GeDynTipText
(
GeDyn
dyn
,
String
text
)
{
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_TipText
);
this
.
text
=
text
;
}
public
void
connect
()
{
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
text
);
if
(
text
.
charAt
(
0
)
==
'&'
)
{
String
attrName
=
dyn
.
getAttrName
(
text
.
substring
(
1
));
CdhrString
cdhr
=
dyn
.
en
.
gdh
.
getObjectInfoString
(
attrName
);
if
(
cdhr
.
evenSts
())
return
;
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
cdhr
.
str
);
attrFound
=
true
;
}
else
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
text
);
}
public
void
disconnect
()
{
}
...
...
java/jpwr/jop/src/GeFrameThin.java
View file @
eb4b2236
...
...
@@ -92,19 +92,19 @@ public class GeFrameThin extends GeComponent {
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
78
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
0
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
78
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
1
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
40
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
2
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
40
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
3
]);
g
.
setTransform
(
save
);
}
...
...
java/jpwr/jop/src/GeTable.java
View file @
eb4b2236
...
...
@@ -206,7 +206,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
this
.
fillColor
=
fillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -214,7 +214,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
tsetColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -225,7 +225,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
resetFillColor
()
{
fillColor
=
originalFillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -233,13 +233,14 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
}
public
void
resetBorderColor
()
{}
public
void
resetTextColor
()
{}
public
void
setVisibility
(
int
visibility
)
{}
public
String
getAnnot1
()
{
return
""
;}
public
void
setAnnot1
(
String
s
)
{}
public
void
setLastPage
()
{}
...
...
@@ -326,7 +327,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
dd
.
connect
();
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
java/jpwr/jop/src/GeTextField.java
View file @
eb4b2236
...
...
@@ -133,13 +133,13 @@ public class GeTextField extends JTextField implements GeComponentIfc,
this
.
fillColor
=
fillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
tsetColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
,
false
);
setBackground
(
normalColor
);
}
public
void
setShadow
(
int
shadow
)
{}
...
...
@@ -149,13 +149,13 @@ public class GeTextField extends JTextField implements GeComponentIfc,
public
void
resetFillColor
()
{
fillColor
=
originalFillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
resetBorderColor
()
{}
...
...
@@ -176,6 +176,7 @@ public class GeTextField extends JTextField implements GeComponentIfc,
public
void
setLevelDirection
(
int
levelDirection
)
{}
public
void
setLevelColorTone
(
int
levelColorTone
)
{}
public
void
setLevelFillColor
(
int
levelFillColor
)
{}
public
void
setVisibility
(
int
visibility
)
{}
Font
annot1Font
=
new
Font
(
"Helvetica"
,
Font
.
BOLD
,
14
);
public
Font
annotFont
=
annot1Font
;
...
...
@@ -265,7 +266,7 @@ public class GeTextField extends JTextField implements GeComponentIfc,
dd
.
connect
();
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
dynamicClose
()
{
...
...
java/jpwr/jop/src/JopButtontoggle.java
View file @
eb4b2236
...
...
@@ -192,13 +192,13 @@ public class JopButtontoggle extends JComponent implements JopDynamic, ActionLis
Math
.
PI
*
rotate
/
180
,((
double
)
original_width
)/
2
,
((
double
)
original_height
)/
2
));
g
.
transform
(
AffineTransform
.
getScaleInstance
(
scaleWidth
,
scaleHeight
));
g
.
setColor
(
GeColor
.
getColor
(
22
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
0
]);
g
.
setColor
(
GeColor
.
getColor
(
20
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
1
]);
g
.
setColor
(
GeColor
.
getColor
(
23
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
2
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
0
,
borderColor
));
...
...
java/jpwr/jop/src/JopFilter.java
View file @
eb4b2236
...
...
@@ -141,7 +141,7 @@ public class JopFilter extends JComponent implements JopDynamic, ActionListener{
Math
.
PI
*
rotate
/
180
,((
double
)
original_width
)/
2
,
((
double
)
original_height
)/
2
));
g
.
transform
(
AffineTransform
.
getScaleInstance
(
scaleWidth
,
scaleHeight
));
g
.
setColor
(
GeColor
.
getColor
(
21
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
0
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
0
,
borderColor
));
...
...
java/jpwr/jop/src/JopSpider.java
View file @
eb4b2236
...
...
@@ -140,7 +140,7 @@ System.out.println( "qcom put finished");
// Replace * by node object
if
(
objectValue
.
charAt
(
0
)
==
'*'
)
{
CdhrObjid
cdhr_node
=
gdh
.
getNodeObject
();
CdhrObjid
cdhr_node
=
gdh
.
getNodeObject
(
0
);
if
(
cdhr_node
.
evenSts
())
return
;
CdhrString
cdhr_nodestr
=
gdh
.
objidToName
(
cdhr_node
.
objid
,
Cdh
.
mName_volumeStrict
);
...
...
src/jpwr/jop/src/Ge.java
View file @
eb4b2236
...
...
@@ -8,5 +8,8 @@ public class Ge {
public
static
final
int
DIRECTION_LEFT
=
2
;
public
static
final
int
DIRECTION_UP
=
3
;
public
static
final
int
DIRECTION_DOWN
=
4
;
public
static
final
int
VISIBILITY_VISIBLE
=
0
;
public
static
final
int
VISIBILITY_INVISIBLE
=
1
;
public
static
final
int
VISIBILITY_DIMMED
=
2
;
public
static
final
float
cJBean_Offset
=
2
;
}
src/jpwr/jop/src/GeColor.java
View file @
eb4b2236
...
...
@@ -585,7 +585,7 @@ public class GeColor {
public
static
int
getDrawtype
(
int
local_drawtype
,
int
color_tone
,
int
color_shift
,
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
)
{
int
color_brightness
,
int
color_inverse
,
int
default_color
,
boolean
dimmed
)
{
int
drawtype
;
int
base_drawtype
;
int
incr
;
...
...
@@ -665,6 +665,18 @@ public class GeColor {
if
(
drawtype
>=
10
)
drawtype
=
drawtype
+
10
-
2
*
(
drawtype
%
10
)
-
1
;
}
if
(
dimmed
)
{
if
(
drawtype
==
0
)
drawtype
=
25
;
else
if
(
26
<=
drawtype
&&
drawtype
<=
29
)
drawtype
=
drawtype
-
4
;
else
if
(
36
<=
drawtype
&&
drawtype
<=
39
)
drawtype
=
drawtype
-
4
;
else
if
(
46
<=
drawtype
&&
drawtype
<=
49
)
drawtype
=
drawtype
-
4
;
else
if
(
56
<=
drawtype
&&
drawtype
<=
59
)
drawtype
=
drawtype
-
4
;
}
if
(
drawtype
<
0
||
drawtype
>=
300
)
{
System
.
out
.
println
(
"** Invalid drawtype"
);
drawtype
=
0
;
...
...
@@ -679,10 +691,10 @@ public class GeColor {
}
public
static
Color
getColor
(
int
local_drawtype
,
int
color_tone
,
int
color_shift
,
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
)
{
int
color_intensity
,
int
color_brightness
,
int
color_inverse
,
int
default_color
,
boolean
dimmed
)
{
int
drawtype
=
getDrawtype
(
local_drawtype
,
color_tone
,
color_shift
,
color_intensity
,
color_brightness
,
color_inverse
,
default_color
);
color_brightness
,
color_inverse
,
default_color
,
dimmed
);
if
(
colors
[
drawtype
]
==
null
)
colors
[
drawtype
]
=
rgbColor
(
drawtype
);
return
colors
[
drawtype
];
...
...
src/jpwr/jop/src/GeComponent.java
View file @
eb4b2236
...
...
@@ -52,6 +52,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
if
(
dd
.
actionType
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
{
this
.
addMouseListener
(
new
MouseAdapter
()
{
public
void
mouseReleased
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
(
e
.
isPopupTrigger
())
dd
.
action
(
GeDyn
.
eEvent_MB3Press
,
e
);
else
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
...
...
@@ -60,6 +62,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
}
public
void
mousePressed
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
(
e
.
isPopupTrigger
())
dd
.
action
(
GeDyn
.
eEvent_MB3Press
,
e
);
else
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
...
...
@@ -67,6 +71,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
dd
.
action
(
GeDyn
.
eEvent_MB1Down
,
e
);
}
public
void
mouseClicked
(
MouseEvent
e
)
{
if
(
dimmed
)
return
;
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
dd
.
action
(
GeDyn
.
eEvent_MB1Click
,
e
);
...
...
@@ -75,7 +81,7 @@ public class GeComponent extends JComponent implements GeComponentIfc,
if
(
(
dd
.
actionType
&
GeDyn
.
mActionType_Slider
)
!=
0
)
{
this
.
addMouseMotionListener
(
new
MouseMotionAdapter
()
{
public
void
mouseDragged
(
MouseEvent
e
)
{
if
(
actionDisabled
)
if
(
actionDisabled
||
dimmed
)
return
;
if
((
e
.
getModifiers
()
&
MouseEvent
.
BUTTON1_MASK
)
!=
0
&&
en
.
gdh
.
isAuthorized
(
dd
.
access
))
...
...
@@ -104,6 +110,24 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
}
public
void
resetBorderColor
()
{
borderColor
=
originalBorderColor
;}
public
void
resetTextColor
()
{
textColor
=
originalTextColor
;}
public
void
setVisibility
(
int
visibility
)
{
switch
(
visibility
)
{
case
Ge
.
VISIBILITY_VISIBLE
:
visible
=
true
;
dimmed
=
false
;
break
;
case
Ge
.
VISIBILITY_INVISIBLE
:
visible
=
false
;
dimmed
=
false
;
repaint
();
break
;
case
Ge
.
VISIBILITY_DIMMED
:
visible
=
true
;
dimmed
=
true
;
repaint
();
break
;
}
}
public
String
getAnnot1
()
{
return
annot1
;}
public
void
setAnnot1
(
String
s
)
{
annot1
=
s
;}
public
Object
getDd
()
{
return
dd
;}
...
...
@@ -139,6 +163,8 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
int
levelColorTone
=
0
;
public
int
levelFillColor
=
0
;
public
int
shadow
=
0
;
public
boolean
visible
=
true
;
public
boolean
dimmed
=
false
;
public
void
setColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
originalColorTone
=
colorTone
;
...
...
src/jpwr/jop/src/GeComponentIfc.java
View file @
eb4b2236
...
...
@@ -15,6 +15,7 @@ public interface GeComponentIfc {
public
void
setLevelDirection
(
int
levelDirection
);
public
void
setLevelColorTone
(
int
levelColorTone
);
public
void
setLevelFillColor
(
int
levelFillColor
);
public
void
setVisibility
(
int
visibility
);
public
String
getAnnot1
();
public
void
setAnnot1
(
String
annot1
);
public
void
setLastPage
();
...
...
src/jpwr/jop/src/GeDyn.java
View file @
eb4b2236
...
...
@@ -30,6 +30,7 @@ public class GeDyn {
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_Table
=
1
<<
24
;
public
static
final
int
mDynType_StatusColor
=
1
<<
25
;
public
static
final
int
mDynType_HostObject
=
1
<<
26
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
...
...
@@ -75,17 +76,16 @@ public class GeDyn {
public
GeDynElemIfc
[]
elements
;
public
GeComponentIfc
comp
;
public
String
instance
;
public
String
hostObject
;
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
double
rotate
;
public
double
x0
;
public
double
y0
;
public
GeDyn
(
Object
comp
)
{
this
.
comp
=
(
GeComponentIfc
)
comp
;
...
...
@@ -113,6 +113,9 @@ public class GeDyn {
public
void
setInstance
(
String
instance
)
{
this
.
instance
=
instance
;
}
public
void
setHostObject
(
String
hostObject
)
{
this
.
hostObject
=
hostObject
;
}
public
void
setElements
(
GeDynElemIfc
[]
elements
)
{
this
.
elements
=
elements
;
}
...
...
@@ -161,11 +164,35 @@ public class GeDyn {
}
public
String
getAttrName
(
String
str
)
{
if
(
str
.
toLowerCase
().
startsWith
(
"$node"
))
{
int
nix
;
if
(
instance
==
null
)
nix
=
0
;
else
{
CdhrObjid
cdhr_inst
=
en
.
gdh
.
nameToObjid
(
instance
);
nix
=
cdhr_inst
.
objid
.
vid
;
}
CdhrObjid
cdhr_node
=
en
.
gdh
.
getNodeObject
(
nix
);
if
(
cdhr_node
.
evenSts
())
return
str
;
CdhrString
cdhr_ns
=
en
.
gdh
.
objidToName
(
cdhr_node
.
objid
,
Cdh
.
mName_volumeStrict
);
if
(
cdhr_ns
.
evenSts
())
return
str
;
String
s
=
RtUtilities
.
strReplace
(
str
,
"$node"
,
cdhr_ns
.
str
);
return
s
;
}
if
(
instance
==
null
)
{
if
(
str
.
startsWith
(
"!"
))
return
str
.
substring
(
1
);
else
return
str
;
if
(
hostObject
==
null
)
{
if
(
str
.
startsWith
(
"!"
))
return
str
.
substring
(
1
);
else
return
str
;
}
else
{
String
s
=
RtUtilities
.
strReplace
(
str
,
"$hostobject"
,
hostObject
);
if
(
s
.
startsWith
(
"!"
))
return
s
.
substring
(
1
);
else
return
s
;
}
}
else
{
String
s
=
RtUtilities
.
strReplace
(
str
,
"$object"
,
instance
);
...
...
@@ -179,8 +206,12 @@ public class GeDyn {
public
String
getAttrNameNoSuffix
(
String
str
)
{
int
startIdx
;
String
s
;
if
(
instance
==
null
)
s
=
str
;
if
(
instance
==
null
)
{
if
(
hostObject
==
null
)
s
=
str
;
else
s
=
RtUtilities
.
strReplace
(
str
,
"$hostobject"
,
hostObject
);
}
else
s
=
RtUtilities
.
strReplace
(
str
,
"$object"
,
instance
);
...
...
src/jpwr/jop/src/GeDynHostObject.java
0 → 100644
View file @
eb4b2236
package
jpwr.jop
;
import
jpwr.rt.*
;
public
class
GeDynHostObject
extends
GeDynElem
{
public
GeDynHostObject
(
GeDyn
dyn
,
String
hostObject
)
{
super
(
dyn
,
GeDyn
.
mDynType_HostObject
,
GeDyn
.
mActionType_No
);
dyn
.
setHostObject
(
hostObject
);
}
public
void
connect
()
{
}
public
void
disconnect
()
{
}
public
void
scan
()
{
}
}
src/jpwr/jop/src/GeDynInvisible.java
View file @
eb4b2236
...
...
@@ -3,29 +3,42 @@ import jpwr.rt.*;
public
class
GeDynInvisible
extends
GeDynElem
{
String
attribute
;
int
dimmed
;
boolean
attrFound
;
PwrtRefId
subid
;
int
typeId
;
int
p
;
boolean
inverted
;
boolean
oldValue
;
boolean
oldValueB
;
String
oldValueS
;
boolean
firstScan
=
true
;
boolean
cmd
=
false
;
boolean
valueCmd
=
false
;
public
GeDynInvisible
(
GeDyn
dyn
,
String
attribute
)
{
public
GeDynInvisible
(
GeDyn
dyn
,
String
attribute
,
int
dimmed
)
{
super
(
dyn
,
GeDyn
.
mDynType_Invisible
,
GeDyn
.
mActionType_No
);
this
.
attribute
=
attribute
;
this
.
dimmed
=
dimmed
;
}
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
(
"DigInvisible: "
+
attrName
);
if
(
attrName
.
toLowerCase
().
startsWith
(
"$cmd("
))
{
cmd
=
true
;
valueCmd
=
false
;
}
else
{
attrFound
=
true
;
p
=
ret
.
id
;
subid
=
ret
.
refid
;
inverted
=
GeDyndata
.
getAttrInverted
(
attribute
);
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"DigInvisible: "
+
attrName
);
else
{
attrFound
=
true
;
p
=
ret
.
id
;
subid
=
ret
.
refid
;
typeId
=
ret
.
typeId
;
inverted
=
GeDyndata
.
getAttrInverted
(
attribute
);
}
}
}
}
...
...
@@ -34,26 +47,65 @@ public class GeDynInvisible extends GeDynElem {
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
}
public
void
scan
()
{
if
(
cmd
)
{
if
(
firstScan
)
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
firstScan
=
false
;
}
return
;
}
if
(
!
attrFound
)
return
;
boolean
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
);
if
(
!
firstScan
)
{
if
(
value
==
oldValue
)
{
// No change since last time
return
;
switch
(
typeId
)
{
case
Pwr
.
eType_Boolean
:
{
boolean
value
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
);
if
(
!
firstScan
)
{
if
(
value
==
oldValueB
)
{
// No change since last time
return
;
}
}
else
firstScan
=
false
;
if
(
(!
inverted
&&
value
)
||
(
inverted
&&
!
value
))
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
}
else
{
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_VISIBLE
);
}
dyn
.
repaintNow
=
true
;
oldValueB
=
value
;
break
;
}
else
firstScan
=
false
;
case
Pwr
.
eType_String
:
{
String
value0
;
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoString
(
p
,
typeId
);
if
(
(!
inverted
&&
value
)
||
(
inverted
&&
!
value
))
{
dyn
.
invisible
=
true
;
if
(
firstScan
||
value0
.
compareTo
(
oldValueS
)
!=
0
)
{
if
(
value0
.
compareTo
(
""
)
==
0
)
{
if
(
dimmed
==
0
)
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_INVISIBLE
);
else
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_DIMMED
);
}
else
{
dyn
.
comp
.
setVisibility
(
Ge
.
VISIBILITY_VISIBLE
);
}
dyn
.
repaintNow
=
true
;
oldValueS
=
value0
;
if
(
firstScan
)
firstScan
=
false
;
}
break
;
}
else
{
dyn
.
invisible
=
false
;
}
dyn
.
repaintNow
=
true
;
oldValue
=
value
;
}
}
...
...
src/jpwr/jop/src/GeDynTipText.java
View file @
eb4b2236
...
...
@@ -6,12 +6,24 @@ import javax.swing.*;
public
class
GeDynTipText
extends
GeDynElem
{
String
text
;
boolean
attrFound
=
false
;
public
GeDynTipText
(
GeDyn
dyn
,
String
text
)
{
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_TipText
);
this
.
text
=
text
;
}
public
void
connect
()
{
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
text
);
if
(
text
.
charAt
(
0
)
==
'&'
)
{
String
attrName
=
dyn
.
getAttrName
(
text
.
substring
(
1
));
CdhrString
cdhr
=
dyn
.
en
.
gdh
.
getObjectInfoString
(
attrName
);
if
(
cdhr
.
evenSts
())
return
;
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
cdhr
.
str
);
attrFound
=
true
;
}
else
((
JComponent
)
dyn
.
comp
).
setToolTipText
(
text
);
}
public
void
disconnect
()
{
}
...
...
src/jpwr/jop/src/GeFrameThin.java
View file @
eb4b2236
...
...
@@ -92,19 +92,19 @@ public class GeFrameThin extends GeComponent {
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
78
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
0
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
78
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
1
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
40
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
2
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
40
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
borderColor
,
false
));
g
.
draw
(
shapes
[
3
]);
g
.
setTransform
(
save
);
}
...
...
src/jpwr/jop/src/GeTable.java
View file @
eb4b2236
...
...
@@ -206,7 +206,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
this
.
fillColor
=
fillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -214,7 +214,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
tsetColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -225,7 +225,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
resetFillColor
()
{
fillColor
=
originalFillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
@@ -233,13 +233,14 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
}
public
void
resetBorderColor
()
{}
public
void
resetTextColor
()
{}
public
void
setVisibility
(
int
visibility
)
{}
public
String
getAnnot1
()
{
return
""
;}
public
void
setAnnot1
(
String
s
)
{}
public
void
setLastPage
()
{}
...
...
@@ -326,7 +327,7 @@ public class GeTable extends JScrollPane implements GeComponentIfc,
dd
.
connect
();
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
table
.
setBackground
(
normalColor
);
if
(
hColumn
==
1
)
headerColumn
.
setBackground
(
normalColor
);
...
...
src/jpwr/jop/src/GeTextField.java
View file @
eb4b2236
...
...
@@ -133,13 +133,13 @@ public class GeTextField extends JTextField implements GeComponentIfc,
this
.
fillColor
=
fillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
tsetColorTone
(
int
colorTone
)
{
this
.
colorTone
=
colorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
GeColor
.
NO_COLOR
,
false
);
setBackground
(
normalColor
);
}
public
void
setShadow
(
int
shadow
)
{}
...
...
@@ -149,13 +149,13 @@ public class GeTextField extends JTextField implements GeComponentIfc,
public
void
resetFillColor
()
{
fillColor
=
originalFillColor
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
resetColorTone
()
{
colorTone
=
originalColorTone
;
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
resetBorderColor
()
{}
...
...
@@ -176,6 +176,7 @@ public class GeTextField extends JTextField implements GeComponentIfc,
public
void
setLevelDirection
(
int
levelDirection
)
{}
public
void
setLevelColorTone
(
int
levelColorTone
)
{}
public
void
setLevelFillColor
(
int
levelFillColor
)
{}
public
void
setVisibility
(
int
visibility
)
{}
Font
annot1Font
=
new
Font
(
"Helvetica"
,
Font
.
BOLD
,
14
);
public
Font
annotFont
=
annot1Font
;
...
...
@@ -265,7 +266,7 @@ public class GeTextField extends JTextField implements GeComponentIfc,
dd
.
connect
();
normalColor
=
GeColor
.
getColor
(
fillColor
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
);
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
);
setBackground
(
normalColor
);
}
public
void
dynamicClose
()
{
...
...
src/jpwr/jop/src/JopButtontoggle.java
View file @
eb4b2236
...
...
@@ -192,13 +192,13 @@ public class JopButtontoggle extends JComponent implements JopDynamic, ActionLis
Math
.
PI
*
rotate
/
180
,((
double
)
original_width
)/
2
,
((
double
)
original_height
)/
2
));
g
.
transform
(
AffineTransform
.
getScaleInstance
(
scaleWidth
,
scaleHeight
));
g
.
setColor
(
GeColor
.
getColor
(
22
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
0
]);
g
.
setColor
(
GeColor
.
getColor
(
20
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
1
]);
g
.
setColor
(
GeColor
.
getColor
(
23
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
2
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
0
,
borderColor
));
...
...
src/jpwr/jop/src/JopFilter.java
View file @
eb4b2236
...
...
@@ -141,7 +141,7 @@ public class JopFilter extends JComponent implements JopDynamic, ActionListener{
Math
.
PI
*
rotate
/
180
,((
double
)
original_width
)/
2
,
((
double
)
original_height
)/
2
));
g
.
transform
(
AffineTransform
.
getScaleInstance
(
scaleWidth
,
scaleHeight
));
g
.
setColor
(
GeColor
.
getColor
(
21
,
colorTone
,
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
));
colorShift
,
colorIntensity
,
colorBrightness
,
colorInverse
,
fillColor
,
false
));
g
.
fill
(
shapes
[
0
]);
g
.
setStroke
(
new
BasicStroke
(
1
F
));
g
.
setColor
(
GeColor
.
getColor
(
0
,
borderColor
));
...
...
src/jpwr/jop/src/JopSpider.java
View file @
eb4b2236
...
...
@@ -140,7 +140,7 @@ System.out.println( "qcom put finished");
// Replace * by node object
if
(
objectValue
.
charAt
(
0
)
==
'*'
)
{
CdhrObjid
cdhr_node
=
gdh
.
getNodeObject
();
CdhrObjid
cdhr_node
=
gdh
.
getNodeObject
(
0
);
if
(
cdhr_node
.
evenSts
())
return
;
CdhrString
cdhr_nodestr
=
gdh
.
objidToName
(
cdhr_node
.
objid
,
Cdh
.
mName_volumeStrict
);
...
...
src/jpwr/jop/src/os_linux/hw_x86/makefile
View file @
eb4b2236
...
...
@@ -64,6 +64,7 @@ local_java_sources := \
GeDynOptionMenu.java
\
GeDynAnalogText.java
\
GeDynTable.java
\
GeDynHostObject.java
\
Proportion.java
\
RatioLayout.java
\
AspectRatioListener.java
\
...
...
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