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
ea385221
Commit
ea385221
authored
May 20, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java AxisArc and dynamics for Axis added
parent
1d7aa0b9
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1083 additions
and
52 deletions
+1083
-52
java/jpwr/jopg/src/Dyn.java
java/jpwr/jopg/src/Dyn.java
+402
-49
java/jpwr/jopg/src/GlowVector.java
java/jpwr/jopg/src/GlowVector.java
+6
-0
java/jpwr/jopg/src/GrowAxis.java
java/jpwr/jopg/src/GrowAxis.java
+162
-0
java/jpwr/jopg/src/GrowAxisArc.java
java/jpwr/jopg/src/GrowAxisArc.java
+503
-0
java/jpwr/jopg/src/GrowCtx.java
java/jpwr/jopg/src/GrowCtx.java
+9
-3
java/jpwr/jopg/src/os_templ/hw_templ/makefile
java/jpwr/jopg/src/os_templ/hw_templ/makefile
+1
-0
No files found.
java/jpwr/jopg/src/Dyn.java
View file @
ea385221
This diff is collapsed.
Click to expand it.
java/jpwr/jopg/src/GlowVector.java
View file @
ea385221
...
@@ -225,6 +225,12 @@ public class GlowVector {
...
@@ -225,6 +225,12 @@ public class GlowVector {
a
.
add
(
c
);
a
.
add
(
c
);
break
;
break
;
}
}
case
Glow
.
eSave_GrowAxisArc
:
{
GrowAxisArc
c
=
new
GrowAxisArc
(
cmn
);
c
.
open
(
reader
);
a
.
add
(
c
);
break
;
}
case
Glow
.
eSave_GrowImage
:
{
case
Glow
.
eSave_GrowImage
:
{
GrowImage
c
=
new
GrowImage
(
cmn
);
GrowImage
c
=
new
GrowImage
(
cmn
);
c
.
open
(
reader
);
c
.
open
(
reader
);
...
...
java/jpwr/jopg/src/GrowAxis.java
View file @
ea385221
...
@@ -476,4 +476,166 @@ public class GrowAxis extends GrowRect {
...
@@ -476,4 +476,166 @@ public class GrowAxis extends GrowRect {
return
userdata
;
return
userdata
;
}
}
public
class
Range
{
public
Range
(
int
lines
,
int
longq
,
int
vvalq
,
int
hvalq
,
String
format
)
{
this
.
lines
=
lines
;
this
.
longq
=
longq
;
this
.
vvalq
=
vvalq
;
this
.
hvalq
=
hvalq
;
this
.
format
=
format
;
}
int
lines
;
int
longq
;
int
vvalq
;
int
hvalq
;
String
format
;
}
public
void
set_range
(
double
minval
,
double
maxval
,
int
keep_settings
)
{
Range
[][]
rdata
=
new
Range
[][]
{
new
Range
[]
{
new
Range
(
26
,
5
,
5
,
10
,
"%3.1f"
),
// 1
new
Range
(
21
,
5
,
5
,
10
,
"%3.1f"
),
// 2
new
Range
(
31
,
5
,
10
,
10
,
"%3.1f"
),
// 3
new
Range
(
41
,
5
,
10
,
20
,
"%3.1f"
),
// 4
new
Range
(
26
,
5
,
5
,
10
,
"%1.0f"
),
// 5
new
Range
(
31
,
5
,
10
,
10
,
"%1.0f"
),
// 6
new
Range
(
36
,
5
,
10
,
10
,
"%1.0f"
),
// 7
new
Range
(
17
,
2
,
4
,
4
,
"%1.0f"
),
// 8
new
Range
(
19
,
2
,
4
,
4
,
"%1.0f"
),
// 9
new
Range
(
21
,
2
,
4
,
8
,
"%2.0f"
),
// 10
new
Range
(
23
,
2
,
4
,
8
,
"%2.0f"
),
// 11
new
Range
(
13
,
4
,
4
,
4
,
"%2.0f"
),
// 12
new
Range
(
14
,
4
,
4
,
4
,
"%2.0f"
),
// 13
new
Range
(
15
,
4
,
4
,
4
,
"%2.0f"
),
// 14
new
Range
(
16
,
5
,
5
,
5
,
"%2.0f"
),
// 15
new
Range
(
17
,
5
,
5
,
5
,
"%2.0f"
),
// 16
new
Range
(
18
,
5
,
5
,
5
,
"%2.0f"
),
// 17
new
Range
(
19
,
5
,
5
,
5
,
"%2.0f"
),
// 18
new
Range
(
20
,
5
,
5
,
5
,
"%2.0f"
),
// 19
new
Range
(
21
,
5
,
5
,
5
,
"%2.0f"
),
// 20
new
Range
(
22
,
5
,
5
,
5
,
"%2.0f"
),
// 21
new
Range
(
23
,
5
,
5
,
5
,
"%2.0f"
),
// 22
new
Range
(
24
,
5
,
5
,
5
,
"%2.0f"
),
// 23
new
Range
(
25
,
5
,
5
,
5
,
"%2.0f"
),
// 24
new
Range
(
26
,
5
,
5
,
10
,
"%2.0f"
)},
// 25
new
Range
[]
{
new
Range
(
101
,
5
,
10
,
20
,
"%3.1f"
),
// 1
new
Range
(
101
,
5
,
10
,
20
,
"%3.1f"
),
// 2
new
Range
(
61
,
10
,
10
,
20
,
"%3.1f"
),
// 3
new
Range
(
81
,
10
,
10
,
20
,
"%3.1f"
),
// 4
new
Range
(
101
,
10
,
20
,
20
,
"%1.0f"
),
// 5
new
Range
(
61
,
5
,
10
,
20
,
"%1.0f"
),
// 6
new
Range
(
71
,
5
,
10
,
20
,
"%1.0f"
),
// 7
new
Range
(
81
,
5
,
10
,
20
,
"%1.0f"
),
// 8
new
Range
(
91
,
5
,
10
,
20
,
"%1.0f"
),
// 9
new
Range
(
101
,
5
,
10
,
20
,
"%2.0f"
),
// 10
new
Range
(
56
,
5
,
5
,
5
,
"%2.0f"
),
// 11
new
Range
(
61
,
5
,
10
,
10
,
"%2.0f"
),
// 12
new
Range
(
66
,
5
,
10
,
20
,
"%2.0f"
),
// 13
new
Range
(
71
,
5
,
10
,
20
,
"%2.0f"
),
// 14
new
Range
(
76
,
5
,
10
,
20
,
"%2.0f"
),
// 15
new
Range
(
81
,
5
,
10
,
20
,
"%2.0f"
),
// 16
new
Range
(
86
,
5
,
10
,
20
,
"%2.0f"
),
// 17
new
Range
(
91
,
5
,
10
,
20
,
"%2.0f"
),
// 18
new
Range
(
96
,
5
,
10
,
20
,
"%2.0f"
),
// 19
new
Range
(
101
,
5
,
10
,
25
,
"%2.0f"
),
// 20
new
Range
(
43
,
2
,
6
,
6
,
"%2.0f"
),
// 21
new
Range
(
45
,
2
,
4
,
8
,
"%2.0f"
),
// 22
new
Range
(
47
,
2
,
4
,
8
,
"%2.0f"
),
// 23
new
Range
(
49
,
2
,
4
,
8
,
"%2.0f"
),
// 24
new
Range
(
26
,
5
,
5
,
5
,
"%2.0f"
)}};
// 25
max_value
=
maxval
;
min_value
=
minval
;
int
x1
=
(
int
)(
trf
.
x
(
ll
.
x
,
ll
.
y
)
*
cmn
.
mw
.
zoom_factor_x
)
-
cmn
.
mw
.
offset_x
;
int
y1
=
(
int
)(
trf
.
y
(
ll
.
x
,
ll
.
y
)
*
cmn
.
mw
.
zoom_factor_y
)
-
cmn
.
mw
.
offset_y
;
int
x2
=
(
int
)(
trf
.
x
(
ur
.
x
,
ur
.
y
)
*
cmn
.
mw
.
zoom_factor_x
)
-
cmn
.
mw
.
offset_x
;
int
y2
=
(
int
)(
trf
.
y
(
ur
.
x
,
ur
.
y
)
*
cmn
.
mw
.
zoom_factor_y
)
-
cmn
.
mw
.
offset_y
;
double
rotation
=
(
trf
.
rot
()
/
360
-
Math
.
floor
(
trf
.
rot
()
/
360
))
*
360
;
if
(
keep_settings
==
0
)
{
int
len
;
int
lix
;
int
di
;
int
horizontal
=
(
rotation
<
45
||
(
rotation
>
135
&&
rotation
<
225
)
||
rotation
>
315
)
?
0
:
1
;
if
(
horizontal
!=
0
)
len
=
Math
.
abs
(
x2
-
x1
);
else
len
=
Math
.
abs
(
y2
-
y1
);
if
(
len
<
150
)
lix
=
0
;
else
lix
=
1
;
double
d
=
Math
.
abs
(
maxval
-
minval
);
if
(
d
<
5
)
d
=
1000
*
d
;
di
=
(
int
)
(
d
+
0.5
);
while
(
di
>=
25
)
di
/=
10
;
if
(
di
>
0
&&
di
<=
25
)
{
lines
=
rdata
[
lix
][
di
-
1
].
lines
;
longquotient
=
rdata
[
lix
][
di
-
1
].
longq
;
if
(
horizontal
!=
0
)
valuequotient
=
rdata
[
lix
][
di
-
1
].
hvalq
;
else
valuequotient
=
rdata
[
lix
][
di
-
1
].
vvalq
;
}
double
m
=
Math
.
max
(
Math
.
abs
(
maxval
),
Math
.
abs
(
minval
));
switch
(
lix
)
{
case
0
:
{
if
(
m
<
0.01
)
format
=
"%g"
;
else
if
(
m
<
0.1
)
format
=
"%5.3f"
;
else
if
(
m
<
1
)
format
=
"%4.2f"
;
else
if
(
m
<
3
)
format
=
"%3.1f"
;
else
if
(
m
<=
20
)
format
=
"%2.0f"
;
else
if
(
m
<=
200
)
format
=
"%3.0f"
;
else
if
(
m
<
2000
)
format
=
"%4.0f"
;
else
if
(
m
<
20000
)
format
=
"%5.0f"
;
else
format
=
"%g"
;
break
;
}
case
1
:
{
if
(
m
<
0.01
)
format
=
"%g"
;
else
if
(
m
<
0.1
)
format
=
"%5.3f"
;
else
if
(
m
<
1
)
format
=
"%4.2f"
;
else
if
(
m
<=
4
)
format
=
"%3.1f"
;
else
if
(
m
<=
20
)
format
=
"%2.0f"
;
else
if
(
m
<=
200
)
format
=
"%3.0f"
;
else
if
(
m
<
2000
)
format
=
"%4.0f"
;
else
if
(
m
<
20000
)
format
=
"%5.0f"
;
else
format
=
"%g"
;
break
;
}
default
:
;
}
}
configure
();
draw
();
}
}
}
java/jpwr/jopg/src/GrowAxisArc.java
0 → 100644
View file @
ea385221
This diff is collapsed.
Click to expand it.
java/jpwr/jopg/src/GrowCtx.java
View file @
ea385221
...
@@ -630,7 +630,9 @@ public class GrowCtx implements GrowCtxIfc {
...
@@ -630,7 +630,9 @@ public class GrowCtx implements GrowCtxIfc {
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowToolbar
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowToolbar
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxis
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxisArc
)
{
cmn
.
appl
.
traceConnect
(
cmn
.
a
.
get
(
i
));
cmn
.
appl
.
traceConnect
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
...
@@ -665,7 +667,9 @@ public class GrowCtx implements GrowCtxIfc {
...
@@ -665,7 +667,9 @@ public class GrowCtx implements GrowCtxIfc {
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
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxis
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxisArc
)
{
cmn
.
appl
.
traceDisconnect
(
cmn
.
a
.
get
(
i
));
cmn
.
appl
.
traceDisconnect
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
...
@@ -697,7 +701,9 @@ public class GrowCtx implements GrowCtxIfc {
...
@@ -697,7 +701,9 @@ public class GrowCtx implements GrowCtxIfc {
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
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowXYCurve
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowPie
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
)
{
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowBarChart
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxis
||
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowAxisArc
)
{
cmn
.
appl
.
traceScan
(
cmn
.
a
.
get
(
i
));
cmn
.
appl
.
traceScan
(
cmn
.
a
.
get
(
i
));
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
if
(
cmn
.
a
.
get
(
i
).
type
()
==
Glow
.
eObjectType_GrowGroup
)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
((
GrowNode
)
cmn
.
a
.
get
(
i
)).
nc
.
a
.
size
();
j
++)
{
...
...
java/jpwr/jopg/src/os_templ/hw_templ/makefile
View file @
ea385221
...
@@ -46,6 +46,7 @@ local_java_sources := \
...
@@ -46,6 +46,7 @@ local_java_sources := \
GrowSlider.java,
\
GrowSlider.java,
\
GrowAxis.java,
\
GrowAxis.java,
\
GrowArc.java,
\
GrowArc.java,
\
GrowAxisArc.java,
\
GrowLine.java,
\
GrowLine.java,
\
GrowPolyline.java,
\
GrowPolyline.java,
\
GrowText.java,
\
GrowText.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