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
29fca608
Commit
29fca608
authored
Feb 12, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Table object implemented
parent
b75b2a03
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1118 additions
and
0 deletions
+1118
-0
java/jpwr/jop/src/GeDyn.java
java/jpwr/jop/src/GeDyn.java
+1
-0
java/jpwr/jop/src/GeDynTable.java
java/jpwr/jop/src/GeDynTable.java
+200
-0
java/jpwr/jop/src/GeTable.java
java/jpwr/jop/src/GeTable.java
+357
-0
src/jpwr/jop/src/GeDyn.java
src/jpwr/jop/src/GeDyn.java
+1
-0
src/jpwr/jop/src/GeDynTable.java
src/jpwr/jop/src/GeDynTable.java
+200
-0
src/jpwr/jop/src/GeTable.java
src/jpwr/jop/src/GeTable.java
+357
-0
src/jpwr/jop/src/os_linux/hw_x86/makefile
src/jpwr/jop/src/os_linux/hw_x86/makefile
+2
-0
No files found.
java/jpwr/jop/src/GeDyn.java
View file @
29fca608
...
@@ -28,6 +28,7 @@ public class GeDyn {
...
@@ -28,6 +28,7 @@ public class GeDyn {
public
static
final
int
mDynType_FillLevel
=
1
<<
21
;
public
static
final
int
mDynType_FillLevel
=
1
<<
21
;
public
static
final
int
mDynType_FastCurve
=
1
<<
22
;
public
static
final
int
mDynType_FastCurve
=
1
<<
22
;
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_Table
=
1
<<
24
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
...
...
java/jpwr/jop/src/GeDynTable.java
0 → 100644
View file @
29fca608
package
jpwr.jop
;
import
jpwr.rt.*
;
import
java.awt.*
;
import
java.awt.event.*
;
public
class
GeDynTable
extends
GeDynElem
{
public
String
[]
attribute
;
public
String
[]
selAttribute
;
int
rows
;
int
columns
;
public
GeCFormat
[]
cFormat
;
public
boolean
[]
attrFound
;
public
boolean
[]
selAttrFound
;
PwrtRefId
[]
subid
;
int
[]
p
;
public
int
[]
typeId
;
public
boolean
[][]
oldValueB
;
public
float
[][]
oldValueF
;
public
int
[][]
oldValueI
;
public
String
[][]
oldValueS
;
boolean
firstScan
=
true
;
StringBuffer
sb
=
new
StringBuffer
();
public
GeDynTable
(
GeDyn
dyn
,
String
[]
attribute
,
String
[]
format
,
String
[]
selAttribute
,
int
rows
,
int
columns
)
{
super
(
dyn
,
GeDyn
.
mDynType_Table
,
GeDyn
.
mActionType_No
);
this
.
rows
=
rows
;
this
.
columns
=
columns
;
this
.
attribute
=
attribute
;
this
.
selAttribute
=
selAttribute
;
cFormat
=
new
GeCFormat
[
columns
];
for
(
int
i
=
0
;
i
<
columns
;
i
++)
cFormat
[
i
]
=
new
GeCFormat
(
format
[
i
]);
p
=
new
int
[
columns
];
subid
=
new
PwrtRefId
[
columns
];
typeId
=
new
int
[
columns
];
attrFound
=
new
boolean
[
columns
];
selAttrFound
=
new
boolean
[
columns
];
oldValueB
=
new
boolean
[
columns
][];
oldValueF
=
new
float
[
columns
][];
oldValueI
=
new
int
[
columns
][];
oldValueS
=
new
String
[
columns
][];
}
public
void
connect
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
String
attrName
=
dyn
.
getAttrName
(
attribute
[
i
]);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
{
System
.
out
.
println
(
"Table: "
+
attrName
);
attrFound
[
i
]
=
false
;
}
else
{
attrFound
[
i
]
=
true
;
p
[
i
]
=
ret
.
id
;
subid
[
i
]
=
ret
.
refid
;
typeId
[
i
]
=
ret
.
typeId
;
if
(
typeId
[
i
]
==
Pwr
.
eType_Float32
)
{
oldValueF
[
i
]
=
new
float
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Boolean
)
{
oldValueB
[
i
]
=
new
boolean
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Int32
||
typeId
[
i
]
==
Pwr
.
eType_UInt32
||
typeId
[
i
]
==
Pwr
.
eType_Int16
||
typeId
[
i
]
==
Pwr
.
eType_UInt16
||
typeId
[
i
]
==
Pwr
.
eType_Int8
||
typeId
[
i
]
==
Pwr
.
eType_UInt8
)
{
oldValueI
[
i
]
=
new
int
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_String
||
typeId
[
i
]
==
Pwr
.
eType_Objid
)
{
oldValueS
[
i
]
=
new
String
[
rows
];
}
}
}
}
}
public
void
disconnect
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
if
(
attrFound
[
i
])
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
[
i
]);
}
}
public
void
scan
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
if
(
!
attrFound
[
i
])
continue
;
if
(
typeId
[
i
]
==
Pwr
.
eType_Float32
)
{
float
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueF
[
i
][
j
]
||
firstScan
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueF
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Boolean
)
{
boolean
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueB
[
i
][
j
]
||
firstScan
)
{
if
(
value0
)
((
GeTable
)
dyn
.
comp
).
setValueAt
(
"1"
,
j
,
i
);
else
((
GeTable
)
dyn
.
comp
).
setValueAt
(
"0"
,
j
,
i
);
// dyn.repaintNow = true;
oldValueB
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Int32
||
typeId
[
i
]
==
Pwr
.
eType_UInt32
||
typeId
[
i
]
==
Pwr
.
eType_Int16
||
typeId
[
i
]
==
Pwr
.
eType_UInt16
||
typeId
[
i
]
==
Pwr
.
eType_Int8
||
typeId
[
i
]
==
Pwr
.
eType_UInt8
)
{
int
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoInt
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueI
[
i
][
j
]
||
firstScan
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueI
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_String
||
typeId
[
i
]
==
Pwr
.
eType_Objid
)
{
String
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoString
(
p
[
i
],
typeId
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
firstScan
||
value0
.
compareTo
(
oldValueS
[
i
][
j
])
!=
0
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueS
[
i
][
j
]
=
value0
;
}
}
}
if
(
firstScan
)
firstScan
=
false
;
}
}
public
void
action
(
int
eventType
,
MouseEvent
e
)
{
int
row
;
int
column
;
switch
(
eventType
)
{
case
GeDyn
.
eEvent_MB1Click
:
column
=
((
GeTable
)
dyn
.
comp
).
getSelectedColumn
();
row
=
((
GeTable
)
dyn
.
comp
).
getSelectedRow
();
System
.
out
.
println
(
"MB1Click "
+
row
+
" "
+
column
);
break
;
case
GeDyn
.
eEvent_MB3Press
:
System
.
out
.
println
(
"mb3 press"
);
// Get the selected object
column
=
((
GeTable
)
dyn
.
comp
).
getSelectedColumn
();
row
=
((
GeTable
)
dyn
.
comp
).
getSelectedRow
();
System
.
out
.
println
(
"Row "
+
row
+
" Column "
+
column
);
if
(
row
==
-
1
||
column
==
-
1
)
break
;
if
(
typeId
[
column
]
==
Pwr
.
eType_Objid
)
{
// Name of an attribute that contains the objid of the reference object
String
name
=
dyn
.
getAttrNameNoSuffix
(
attribute
[
column
]);
name
=
name
+
"["
+
row
+
"]"
;
CdhrObjid
reto
=
dyn
.
en
.
gdh
.
getObjectInfoObjid
(
name
);
if
(
reto
.
oddSts
()
&&
!
reto
.
objid
.
isNull
())
{
CdhrString
rets
=
dyn
.
en
.
gdh
.
objidToName
(
reto
.
objid
,
Cdh
.
mName_volumeStrict
);
System
.
out
.
println
(
"str: "
+
rets
.
str
+
" "
+
rets
.
getSts
());
if
(
rets
.
oddSts
()
&&
!
rets
.
str
.
equals
(
""
))
new
JopMethodsMenu
(
dyn
.
session
,
rets
.
str
,
JopUtility
.
GRAPH
,
(
Component
)
dyn
.
comp
,
e
.
getX
(),
e
.
getY
());
}
}
break
;
}
}
}
java/jpwr/jop/src/GeTable.java
0 → 100644
View file @
29fca608
This diff is collapsed.
Click to expand it.
src/jpwr/jop/src/GeDyn.java
View file @
29fca608
...
@@ -28,6 +28,7 @@ public class GeDyn {
...
@@ -28,6 +28,7 @@ public class GeDyn {
public
static
final
int
mDynType_FillLevel
=
1
<<
21
;
public
static
final
int
mDynType_FillLevel
=
1
<<
21
;
public
static
final
int
mDynType_FastCurve
=
1
<<
22
;
public
static
final
int
mDynType_FastCurve
=
1
<<
22
;
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_AnalogText
=
1
<<
23
;
public
static
final
int
mDynType_Table
=
1
<<
24
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_No
=
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
public
static
final
int
mActionType_Inherit
=
1
<<
0
;
...
...
src/jpwr/jop/src/GeDynTable.java
0 → 100644
View file @
29fca608
package
jpwr.jop
;
import
jpwr.rt.*
;
import
java.awt.*
;
import
java.awt.event.*
;
public
class
GeDynTable
extends
GeDynElem
{
public
String
[]
attribute
;
public
String
[]
selAttribute
;
int
rows
;
int
columns
;
public
GeCFormat
[]
cFormat
;
public
boolean
[]
attrFound
;
public
boolean
[]
selAttrFound
;
PwrtRefId
[]
subid
;
int
[]
p
;
public
int
[]
typeId
;
public
boolean
[][]
oldValueB
;
public
float
[][]
oldValueF
;
public
int
[][]
oldValueI
;
public
String
[][]
oldValueS
;
boolean
firstScan
=
true
;
StringBuffer
sb
=
new
StringBuffer
();
public
GeDynTable
(
GeDyn
dyn
,
String
[]
attribute
,
String
[]
format
,
String
[]
selAttribute
,
int
rows
,
int
columns
)
{
super
(
dyn
,
GeDyn
.
mDynType_Table
,
GeDyn
.
mActionType_No
);
this
.
rows
=
rows
;
this
.
columns
=
columns
;
this
.
attribute
=
attribute
;
this
.
selAttribute
=
selAttribute
;
cFormat
=
new
GeCFormat
[
columns
];
for
(
int
i
=
0
;
i
<
columns
;
i
++)
cFormat
[
i
]
=
new
GeCFormat
(
format
[
i
]);
p
=
new
int
[
columns
];
subid
=
new
PwrtRefId
[
columns
];
typeId
=
new
int
[
columns
];
attrFound
=
new
boolean
[
columns
];
selAttrFound
=
new
boolean
[
columns
];
oldValueB
=
new
boolean
[
columns
][];
oldValueF
=
new
float
[
columns
][];
oldValueI
=
new
int
[
columns
][];
oldValueS
=
new
String
[
columns
][];
}
public
void
connect
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
String
attrName
=
dyn
.
getAttrName
(
attribute
[
i
]);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
{
System
.
out
.
println
(
"Table: "
+
attrName
);
attrFound
[
i
]
=
false
;
}
else
{
attrFound
[
i
]
=
true
;
p
[
i
]
=
ret
.
id
;
subid
[
i
]
=
ret
.
refid
;
typeId
[
i
]
=
ret
.
typeId
;
if
(
typeId
[
i
]
==
Pwr
.
eType_Float32
)
{
oldValueF
[
i
]
=
new
float
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Boolean
)
{
oldValueB
[
i
]
=
new
boolean
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Int32
||
typeId
[
i
]
==
Pwr
.
eType_UInt32
||
typeId
[
i
]
==
Pwr
.
eType_Int16
||
typeId
[
i
]
==
Pwr
.
eType_UInt16
||
typeId
[
i
]
==
Pwr
.
eType_Int8
||
typeId
[
i
]
==
Pwr
.
eType_UInt8
)
{
oldValueI
[
i
]
=
new
int
[
rows
];
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_String
||
typeId
[
i
]
==
Pwr
.
eType_Objid
)
{
oldValueS
[
i
]
=
new
String
[
rows
];
}
}
}
}
}
public
void
disconnect
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
if
(
attrFound
[
i
])
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
[
i
]);
}
}
public
void
scan
()
{
for
(
int
i
=
0
;
i
<
columns
;
i
++)
{
if
(
!
attrFound
[
i
])
continue
;
if
(
typeId
[
i
]
==
Pwr
.
eType_Float32
)
{
float
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueF
[
i
][
j
]
||
firstScan
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueF
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Boolean
)
{
boolean
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueB
[
i
][
j
]
||
firstScan
)
{
if
(
value0
)
((
GeTable
)
dyn
.
comp
).
setValueAt
(
"1"
,
j
,
i
);
else
((
GeTable
)
dyn
.
comp
).
setValueAt
(
"0"
,
j
,
i
);
// dyn.repaintNow = true;
oldValueB
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_Int32
||
typeId
[
i
]
==
Pwr
.
eType_UInt32
||
typeId
[
i
]
==
Pwr
.
eType_Int16
||
typeId
[
i
]
==
Pwr
.
eType_UInt16
||
typeId
[
i
]
==
Pwr
.
eType_Int8
||
typeId
[
i
]
==
Pwr
.
eType_UInt8
)
{
int
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoInt
(
p
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
value0
!=
oldValueI
[
i
][
j
]
||
firstScan
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueI
[
i
][
j
]
=
value0
;
}
}
}
else
if
(
typeId
[
i
]
==
Pwr
.
eType_String
||
typeId
[
i
]
==
Pwr
.
eType_Objid
)
{
String
value0
=
dyn
.
en
.
gdh
.
getObjectRefInfoString
(
p
[
i
],
typeId
[
i
]);
for
(
int
j
=
0
;
j
<
1
;
j
++)
{
// Just the first row...
if
(
firstScan
||
value0
.
compareTo
(
oldValueS
[
i
][
j
])
!=
0
)
{
sb
=
cFormat
[
i
].
format
(
value0
,
sb
);
((
GeTable
)
dyn
.
comp
).
setValueAt
(
new
String
(
sb
),
j
,
i
);
// dyn.repaintNow = true;
oldValueS
[
i
][
j
]
=
value0
;
}
}
}
if
(
firstScan
)
firstScan
=
false
;
}
}
public
void
action
(
int
eventType
,
MouseEvent
e
)
{
int
row
;
int
column
;
switch
(
eventType
)
{
case
GeDyn
.
eEvent_MB1Click
:
column
=
((
GeTable
)
dyn
.
comp
).
getSelectedColumn
();
row
=
((
GeTable
)
dyn
.
comp
).
getSelectedRow
();
System
.
out
.
println
(
"MB1Click "
+
row
+
" "
+
column
);
break
;
case
GeDyn
.
eEvent_MB3Press
:
System
.
out
.
println
(
"mb3 press"
);
// Get the selected object
column
=
((
GeTable
)
dyn
.
comp
).
getSelectedColumn
();
row
=
((
GeTable
)
dyn
.
comp
).
getSelectedRow
();
System
.
out
.
println
(
"Row "
+
row
+
" Column "
+
column
);
if
(
row
==
-
1
||
column
==
-
1
)
break
;
if
(
typeId
[
column
]
==
Pwr
.
eType_Objid
)
{
// Name of an attribute that contains the objid of the reference object
String
name
=
dyn
.
getAttrNameNoSuffix
(
attribute
[
column
]);
name
=
name
+
"["
+
row
+
"]"
;
CdhrObjid
reto
=
dyn
.
en
.
gdh
.
getObjectInfoObjid
(
name
);
if
(
reto
.
oddSts
()
&&
!
reto
.
objid
.
isNull
())
{
CdhrString
rets
=
dyn
.
en
.
gdh
.
objidToName
(
reto
.
objid
,
Cdh
.
mName_volumeStrict
);
System
.
out
.
println
(
"str: "
+
rets
.
str
+
" "
+
rets
.
getSts
());
if
(
rets
.
oddSts
()
&&
!
rets
.
str
.
equals
(
""
))
new
JopMethodsMenu
(
dyn
.
session
,
rets
.
str
,
JopUtility
.
GRAPH
,
(
Component
)
dyn
.
comp
,
e
.
getX
(),
e
.
getY
());
}
}
break
;
}
}
}
src/jpwr/jop/src/GeTable.java
0 → 100644
View file @
29fca608
This diff is collapsed.
Click to expand it.
src/jpwr/jop/src/os_linux/hw_x86/makefile
View file @
29fca608
...
@@ -27,6 +27,7 @@ local_java_sources := \
...
@@ -27,6 +27,7 @@ local_java_sources := \
JopBar.java
\
JopBar.java
\
JopTrend.java
\
JopTrend.java
\
JopAxis.java
\
JopAxis.java
\
GeTable.java
\
GeDynElem.java
\
GeDynElem.java
\
GeDynDigLowColor.java
\
GeDynDigLowColor.java
\
GeDynDigColor.java
\
GeDynDigColor.java
\
...
@@ -60,6 +61,7 @@ local_java_sources := \
...
@@ -60,6 +61,7 @@ local_java_sources := \
GeDynPulldownMenu.java
\
GeDynPulldownMenu.java
\
GeDynOptionMenu.java
\
GeDynOptionMenu.java
\
GeDynAnalogText.java
\
GeDynAnalogText.java
\
GeDynTable.java
\
JopSpiderFrame.java
\
JopSpiderFrame.java
\
JopLoginFrame.java
\
JopLoginFrame.java
\
JopLoginApplet.java
\
JopLoginApplet.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