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
7df9e038
Commit
7df9e038
authored
Oct 17, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java pwg-files, XY_Curve addedDyn.java
parent
935c5eaa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
23 deletions
+43
-23
java/jpwr/jopg/src/DynParsedAttrName.java
java/jpwr/jopg/src/DynParsedAttrName.java
+1
-0
java/jpwr/jopg/src/Graph.java
java/jpwr/jopg/src/Graph.java
+23
-13
java/jpwr/jopg/src/GrowCtx.java
java/jpwr/jopg/src/GrowCtx.java
+7
-3
java/jpwr/jopg/src/GrowTrend.java
java/jpwr/jopg/src/GrowTrend.java
+3
-0
java/jpwr/jopg/src/GrowXYCurve.java
java/jpwr/jopg/src/GrowXYCurve.java
+9
-7
No files found.
java/jpwr/jopg/src/DynParsedAttrName.java
View file @
7df9e038
...
...
@@ -42,6 +42,7 @@ public class DynParsedAttrName {
public
String
tname
;
public
boolean
inverted
;
public
int
elements
;
public
int
index
;
public
int
type
;
public
int
database
;
public
int
bitmask
;
...
...
java/jpwr/jopg/src/Graph.java
View file @
7df9e038
...
...
@@ -196,22 +196,22 @@ public class Graph implements GraphIfc, GrowApplIfc {
return
0
;
}
int
stringTo
Elements
(
String
str
)
{
int
stringTo
Index
(
String
str
)
{
int
idx1
,
idx2
;
int
elements
;
int
index
;
if
(
(
idx1
=
str
.
indexOf
(
'['
))
!=
-
1
&&
(
idx2
=
str
.
indexOf
(
']'
))
!=
-
1
&&
idx2
>
idx1
)
{
try
{
System
.
out
.
println
(
"Elements: "
+
str
.
substring
(
idx1
+
1
,
idx2
));
elements
=
new
Integer
(
str
.
substring
(
idx1
+
1
,
idx2
)).
intValue
();
index
=
new
Integer
(
str
.
substring
(
idx1
+
1
,
idx2
)).
intValue
();
}
catch
(
NumberFormatException
e
)
{
System
.
out
.
println
(
"Element syntax error, "
+
str
);
return
1
;
}
return
elements
;
return
index
;
}
return
1
;
}
...
...
@@ -294,19 +294,29 @@ public class Graph implements GraphIfc, GrowApplIfc {
pname
.
tname
=
new
String
(
str
);
if
(
(
idx
=
str
.
indexOf
(
'['
))
!=
-
1
&&
(
eidx
=
str
.
lastIndexOf
(
'#'
))
!=
-
1
&&
if
(
(
idx
=
str
.
indexOf
(
'['
))
==
-
1
)
{
if
(
(
eidx
=
str
.
lastIndexOf
(
'#'
))
!=
-
1
&&
str
.
charAt
(
eidx
-
1
)
!=
'#'
)
{
pname
.
elements
=
stringToElements
(
str
);
str
=
str
.
substring
(
0
,
idx
-
1
);
pname
.
elements
=
new
Integer
(
str
.
substring
(
eidx
+
1
)).
intValue
(
);
str
=
str
.
substring
(
0
,
eidx
);
}
else
pname
.
elements
=
1
;
}
else
{
pname
.
index
=
stringToIndex
(
str
);
pname
.
elements
=
1
;
if
((
eidx
=
str
.
lastIndexOf
(
'#'
))
!=
-
1
&&
str
.
charAt
(
eidx
-
1
)
!=
'#'
)
str
=
str
.
substring
(
0
,
eidx
-
1
);
else
str
=
str
.
substring
(
0
,
idx
-
1
);
}
if
(
(
tidx
=
str
.
indexOf
(
"##"
))
!=
-
1
)
{
if
(
str
.
toLowerCase
().
startsWith
(
"bit"
,
tidx
+
2
))
{
String
typestr
=
str
.
substring
(
tidx
+
2
);
int
bit
=
stringTo
Elements
(
str
);
int
bit
=
stringTo
Index
(
str
);
pname
.
bitmask
=
1
<<
bit
;
str
=
str
.
substring
(
0
,
tidx
+
5
);
}
...
...
java/jpwr/jopg/src/GrowCtx.java
View file @
7df9e038
...
...
@@ -611,7 +611,8 @@ public class GrowCtx implements GrowCtxIfc {
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowTable
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowSlider
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowWindow
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
)
{
System
.
out
.
println
(
"GrowCtx connect "
+
i
+
" ("
+
cmn
.
a
.
size
()
+
") "
+
cmn
.
a
.
get
(
i
));
cmn
.
appl
.
traceConnect
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
...
...
@@ -644,7 +645,8 @@ public class GrowCtx implements GrowCtxIfc {
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowTable
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowSlider
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowWindow
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
)
{
cmn
.
appl
.
traceDisconnect
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
...
...
@@ -664,6 +666,7 @@ public class GrowCtx implements GrowCtxIfc {
}
public
void
traceScan
()
{
int
sts
;
for
(
int
i
=
0
;
i
<
cmn
.
a
.
size
();
i
++)
{
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowNode
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
||
...
...
@@ -672,7 +675,8 @@ public class GrowCtx implements GrowCtxIfc {
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowTable
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowSlider
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowWindow
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowFolder
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
)
{
cmn
.
appl
.
traceScan
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
...
...
java/jpwr/jopg/src/GrowTrend.java
View file @
7df9e038
...
...
@@ -466,4 +466,7 @@ public class GrowTrend extends GrowRect {
public
double
get_scan_time
()
{
return
scan_time
;
}
public
int
get_no_of_points
()
{
return
no_of_points
;
}
}
java/jpwr/jopg/src/GrowXYCurve.java
View file @
7df9e038
...
...
@@ -95,14 +95,14 @@ public class GrowXYCurve extends GrowTrend {
public
void
set_xy_range_x
(
int
curve
,
double
min
,
double
max
)
{
if
(
curve
>
Glow
.
TREND_MAX_CURVES
)
if
(
curve
>
Glow
.
TREND_MAX_CURVES
||
curve
<
0
)
return
;
x_max_value
[
curve
]
=
max
;
x_min_value
[
curve
]
=
min
;
}
public
void
set_xy_range_y
(
int
curve
,
double
min
,
double
max
)
{
if
(
curve
>
Glow
.
TREND_MAX_CURVES
)
if
(
curve
>
Glow
.
TREND_MAX_CURVES
||
curve
<
0
)
return
;
y_max_value
[
curve
]
=
max
;
y_min_value
[
curve
]
=
min
;
...
...
@@ -114,7 +114,7 @@ public class GrowXYCurve extends GrowTrend {
public
void
set_xy_curve_color
(
int
curve
,
int
curve_color
,
int
fill_color
)
{
if
(
curve
>
Glow
.
TREND_MAX_CURVES
)
if
(
curve
>
Glow
.
TREND_MAX_CURVES
||
curve
<
0
)
return
;
curve_drawtype
[
curve
]
=
curve_color
;
curve_fill_drawtype
[
curve
]
=
fill_color
;
...
...
@@ -128,7 +128,7 @@ public class GrowXYCurve extends GrowTrend {
GlowPoint
point_p
;
int
i
,
j
,
idx
;
if
(
curve_idx
>
Glow
.
TREND_MAX_CURVES
)
if
(
curve_idx
>
Glow
.
TREND_MAX_CURVES
||
curve_idx
<
0
)
return
;
no_of_points
=
Math
.
max
(
2
,
no_of_points
);
...
...
@@ -138,10 +138,10 @@ public class GrowXYCurve extends GrowTrend {
curve_width
=
Math
.
min
(
Glow
.
DRAW_TYPE_SIZE
,
Math
.
max
(
1
,
curve_width
));
pointarray
=
new
GlowPoint
[
points
];
pointarray
=
new
GlowPoint
[
c
points
];
j
=
curve_idx
;
for
(
i
=
0
,
idx
=
0
;
i
<
cpoints
;
i
++,
idx
++)
{
point_p
=
pointarray
[
i
];
point_p
=
pointarray
[
i
]
=
new
GlowPoint
()
;
if
(
fill_curve
==
0
)
{
idx
=
i
;
if
(
y_max_value
[
j
]
!=
y_min_value
[
j
])
...
...
@@ -155,6 +155,7 @@ public class GrowXYCurve extends GrowTrend {
(
x_max_value
[
j
]
-
x_min_value
[
j
])
*
(
ur
.
x
-
ll
.
x
);
point_p
.
x
=
Math
.
max
(
ll
.
x
,
Math
.
min
(
point_p
.
x
,
ur
.
x
));
}
else
{
...
...
@@ -206,6 +207,7 @@ public class GrowXYCurve extends GrowTrend {
curve_width
,
0
,
fill_curve
,
1
,
0
,
dt_fill
);
cmn
.
nodraw
--;
draw
();
}
}
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