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
aee83ace
Commit
aee83ace
authored
Nov 02, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attributes for minvalue, maxvalue and insensitivity
parent
302d4689
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
150 additions
and
4 deletions
+150
-4
java/jpwr/jop/src/GeDynSlider.java
java/jpwr/jop/src/GeDynSlider.java
+75
-2
src/jpwr/jop/src/GeDynSlider.java
src/jpwr/jop/src/GeDynSlider.java
+75
-2
No files found.
java/jpwr/jop/src/GeDynSlider.java
View file @
aee83ace
/*
/*
* Proview $Id: GeDynSlider.java,v 1.
4 2005-09-01 14:57:50
claes Exp $
* Proview $Id: GeDynSlider.java,v 1.
5 2005-11-02 13:59:08
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -31,6 +31,9 @@ public class GeDynSlider extends GeDynElem {
...
@@ -31,6 +31,9 @@ public class GeDynSlider extends GeDynElem {
double
maxValue
;
double
maxValue
;
double
minPos
;
double
minPos
;
double
maxPos
;
double
maxPos
;
String
minValueAttr
;
String
maxValueAttr
;
String
insensitiveAttr
;
boolean
attrFound
;
boolean
attrFound
;
PwrtRefId
subid
;
PwrtRefId
subid
;
...
@@ -43,9 +46,16 @@ public class GeDynSlider extends GeDynElem {
...
@@ -43,9 +46,16 @@ public class GeDynSlider extends GeDynElem {
Point
offset
=
new
Point
();
Point
offset
=
new
Point
();
float
original_width
=
0
;
float
original_width
=
0
;
float
original_height
=
0
;
float
original_height
=
0
;
int
minValueP
;
int
maxValueP
;
int
insensitiveP
;
PwrtRefId
minValueSubid
;
PwrtRefId
maxValueSubid
;
PwrtRefId
insensitiveSubid
;
public
GeDynSlider
(
GeDyn
dyn
,
String
attribute
,
double
minValue
,
double
maxValue
,
public
GeDynSlider
(
GeDyn
dyn
,
String
attribute
,
double
minValue
,
double
maxValue
,
int
direction
,
double
minPos
,
double
maxPos
)
{
int
direction
,
double
minPos
,
double
maxPos
,
String
minValueAttr
,
String
maxValueAttr
,
String
insensitiveAttr
)
{
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_Slider
);
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_Slider
);
this
.
attribute
=
attribute
;
this
.
attribute
=
attribute
;
this
.
minValue
=
minValue
;
this
.
minValue
=
minValue
;
...
@@ -53,6 +63,9 @@ public class GeDynSlider extends GeDynElem {
...
@@ -53,6 +63,9 @@ public class GeDynSlider extends GeDynElem {
this
.
direction
=
direction
;
this
.
direction
=
direction
;
this
.
minPos
=
minPos
;
this
.
minPos
=
minPos
;
this
.
maxPos
=
maxPos
;
this
.
maxPos
=
maxPos
;
this
.
minValueAttr
=
minValueAttr
;
this
.
maxValueAttr
=
maxValueAttr
;
this
.
insensitiveAttr
=
insensitiveAttr
;
}
}
public
void
setMinValue
(
double
minValue
)
{
public
void
setMinValue
(
double
minValue
)
{
this
.
minValue
=
minValue
;
this
.
minValue
=
minValue
;
...
@@ -85,15 +98,70 @@ public class GeDynSlider extends GeDynElem {
...
@@ -85,15 +98,70 @@ public class GeDynSlider extends GeDynElem {
typeId
=
ret
.
typeId
;
typeId
=
ret
.
typeId
;
}
}
}
}
minValueP
=
0
;
if
(
minValueAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
minValueAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
minValueP
=
ret
.
id
;
minValueSubid
=
ret
.
refid
;
}
}
}
maxValueP
=
0
;
if
(
maxValueAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
maxValueAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
maxValueP
=
ret
.
id
;
maxValueSubid
=
ret
.
refid
;
}
}
}
insensitiveP
=
0
;
if
(
insensitiveAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
insensitiveAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
insensitiveP
=
ret
.
id
;
insensitiveSubid
=
ret
.
refid
;
}
}
}
}
}
public
void
disconnect
()
{
public
void
disconnect
()
{
if
(
attrFound
)
if
(
attrFound
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
if
(
minValueP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
minValueSubid
);
if
(
maxValueP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
maxValueSubid
);
if
(
insensitiveP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
insensitiveSubid
);
}
}
public
void
scan
()
{
public
void
scan
()
{
if
(
!
attrFound
||
moveActive
)
if
(
!
attrFound
||
moveActive
)
return
;
return
;
if
(
minValueP
!=
0
&&
maxValueP
!=
0
)
{
double
minVal
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
minValueP
);
double
maxVal
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
maxValueP
);
if
(
(
minVal
!=
minValue
||
maxVal
!=
maxValue
)
&&
maxVal
!=
minVal
)
{
minValue
=
minVal
;
maxValue
=
maxVal
;
firstScan
=
true
;
}
}
float
width
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getWidth
();
float
width
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getWidth
();
float
height
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getHeight
();
float
height
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getHeight
();
if
(
original_width
==
0
)
{
if
(
original_width
==
0
)
{
...
@@ -188,6 +256,11 @@ public class GeDynSlider extends GeDynElem {
...
@@ -188,6 +256,11 @@ public class GeDynSlider extends GeDynElem {
// dyn.repaintNow = true;
// dyn.repaintNow = true;
break
;
break
;
case
GeDyn
.
eEvent_SliderMoved
:
case
GeDyn
.
eEvent_SliderMoved
:
if
(
insensitiveP
!=
0
)
{
boolean
insensitive
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
insensitiveP
);
if
(
insensitive
)
return
;
}
float
value
;
float
value
;
double
minPos
;
double
minPos
;
double
maxPos
;
double
maxPos
;
...
...
src/jpwr/jop/src/GeDynSlider.java
View file @
aee83ace
/*
/*
* Proview $Id: GeDynSlider.java,v 1.
4 2005-09-01 14:57:50
claes Exp $
* Proview $Id: GeDynSlider.java,v 1.
5 2005-11-02 13:59:08
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -31,6 +31,9 @@ public class GeDynSlider extends GeDynElem {
...
@@ -31,6 +31,9 @@ public class GeDynSlider extends GeDynElem {
double
maxValue
;
double
maxValue
;
double
minPos
;
double
minPos
;
double
maxPos
;
double
maxPos
;
String
minValueAttr
;
String
maxValueAttr
;
String
insensitiveAttr
;
boolean
attrFound
;
boolean
attrFound
;
PwrtRefId
subid
;
PwrtRefId
subid
;
...
@@ -43,9 +46,16 @@ public class GeDynSlider extends GeDynElem {
...
@@ -43,9 +46,16 @@ public class GeDynSlider extends GeDynElem {
Point
offset
=
new
Point
();
Point
offset
=
new
Point
();
float
original_width
=
0
;
float
original_width
=
0
;
float
original_height
=
0
;
float
original_height
=
0
;
int
minValueP
;
int
maxValueP
;
int
insensitiveP
;
PwrtRefId
minValueSubid
;
PwrtRefId
maxValueSubid
;
PwrtRefId
insensitiveSubid
;
public
GeDynSlider
(
GeDyn
dyn
,
String
attribute
,
double
minValue
,
double
maxValue
,
public
GeDynSlider
(
GeDyn
dyn
,
String
attribute
,
double
minValue
,
double
maxValue
,
int
direction
,
double
minPos
,
double
maxPos
)
{
int
direction
,
double
minPos
,
double
maxPos
,
String
minValueAttr
,
String
maxValueAttr
,
String
insensitiveAttr
)
{
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_Slider
);
super
(
dyn
,
GeDyn
.
mDynType_No
,
GeDyn
.
mActionType_Slider
);
this
.
attribute
=
attribute
;
this
.
attribute
=
attribute
;
this
.
minValue
=
minValue
;
this
.
minValue
=
minValue
;
...
@@ -53,6 +63,9 @@ public class GeDynSlider extends GeDynElem {
...
@@ -53,6 +63,9 @@ public class GeDynSlider extends GeDynElem {
this
.
direction
=
direction
;
this
.
direction
=
direction
;
this
.
minPos
=
minPos
;
this
.
minPos
=
minPos
;
this
.
maxPos
=
maxPos
;
this
.
maxPos
=
maxPos
;
this
.
minValueAttr
=
minValueAttr
;
this
.
maxValueAttr
=
maxValueAttr
;
this
.
insensitiveAttr
=
insensitiveAttr
;
}
}
public
void
setMinValue
(
double
minValue
)
{
public
void
setMinValue
(
double
minValue
)
{
this
.
minValue
=
minValue
;
this
.
minValue
=
minValue
;
...
@@ -85,15 +98,70 @@ public class GeDynSlider extends GeDynElem {
...
@@ -85,15 +98,70 @@ public class GeDynSlider extends GeDynElem {
typeId
=
ret
.
typeId
;
typeId
=
ret
.
typeId
;
}
}
}
}
minValueP
=
0
;
if
(
minValueAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
minValueAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
minValueP
=
ret
.
id
;
minValueSubid
=
ret
.
refid
;
}
}
}
maxValueP
=
0
;
if
(
maxValueAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
maxValueAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
maxValueP
=
ret
.
id
;
maxValueSubid
=
ret
.
refid
;
}
}
}
insensitiveP
=
0
;
if
(
insensitiveAttr
!=
null
)
{
attrName
=
dyn
.
getAttrName
(
insensitiveAttr
);
if
(
attrName
.
compareTo
(
""
)
!=
0
)
{
GdhrRefObjectInfo
ret
=
dyn
.
en
.
gdh
.
refObjectInfo
(
attrName
);
if
(
ret
.
evenSts
())
System
.
out
.
println
(
"FillLevel: "
+
attrName
);
else
{
insensitiveP
=
ret
.
id
;
insensitiveSubid
=
ret
.
refid
;
}
}
}
}
}
public
void
disconnect
()
{
public
void
disconnect
()
{
if
(
attrFound
)
if
(
attrFound
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
dyn
.
en
.
gdh
.
unrefObjectInfo
(
subid
);
if
(
minValueP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
minValueSubid
);
if
(
maxValueP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
maxValueSubid
);
if
(
insensitiveP
!=
0
)
dyn
.
en
.
gdh
.
unrefObjectInfo
(
insensitiveSubid
);
}
}
public
void
scan
()
{
public
void
scan
()
{
if
(
!
attrFound
||
moveActive
)
if
(
!
attrFound
||
moveActive
)
return
;
return
;
if
(
minValueP
!=
0
&&
maxValueP
!=
0
)
{
double
minVal
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
minValueP
);
double
maxVal
=
dyn
.
en
.
gdh
.
getObjectRefInfoFloat
(
maxValueP
);
if
(
(
minVal
!=
minValue
||
maxVal
!=
maxValue
)
&&
maxVal
!=
minVal
)
{
minValue
=
minVal
;
maxValue
=
maxVal
;
firstScan
=
true
;
}
}
float
width
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getWidth
();
float
width
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getWidth
();
float
height
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getHeight
();
float
height
=
((
JComponent
)
dyn
.
comp
).
getParent
().
getHeight
();
if
(
original_width
==
0
)
{
if
(
original_width
==
0
)
{
...
@@ -188,6 +256,11 @@ public class GeDynSlider extends GeDynElem {
...
@@ -188,6 +256,11 @@ public class GeDynSlider extends GeDynElem {
// dyn.repaintNow = true;
// dyn.repaintNow = true;
break
;
break
;
case
GeDyn
.
eEvent_SliderMoved
:
case
GeDyn
.
eEvent_SliderMoved
:
if
(
insensitiveP
!=
0
)
{
boolean
insensitive
=
dyn
.
en
.
gdh
.
getObjectRefInfoBoolean
(
insensitiveP
);
if
(
insensitive
)
return
;
}
float
value
;
float
value
;
double
minPos
;
double
minPos
;
double
maxPos
;
double
maxPos
;
...
...
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