public static final class GralCurveView.Track extends java.lang.Object implements GralCurveViewTrack_ifc, GralSetValue_ifc
Modifier and Type | Field and Description |
---|---|
private int |
dataIx
Index of a variable
|
(package private) int |
identLastSelect |
private int |
ixList
The index of the track in the List of tracks.
|
GralColor |
lineColor
The color of the line.
|
int |
lineWidth
The brightness of the line.
|
java.lang.String |
name |
private java.lang.Object |
oContent |
private GralCurveView |
outer |
GralCurveView.TrackScale |
scale
Reference to the scaling to show the track.
|
private java.lang.String |
sDataPath |
int |
showSelected
The state to show. 0=hidden, don't show, but the values are stored.
1= show normal. 2= show lifted out (selected).
|
(package private) TimedValues |
timeValues
This is also for debug access to see the time to the values.
|
TimedValues.Track |
valueTrack
Contains all values maybe in different formats double, float, int, short
and also the name of the tracke, min and max.
|
protected VariableAccess_ifc |
variable
This value is set in
GralCurveView.refreshFromVariable(VariableContainer_ifc)
after setDataPath(String) is given. |
protected int[] |
XXXlastValueY
last values for paint.
|
int |
ypixLast
The value from last draw, do not calculate twice.
|
float |
YYYactValue |
version
Constructor and Description |
---|
Track(GralCurveView outer,
java.lang.String name,
int ixList) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getContentInfo()
Gets the application specific info.
|
int |
getDataIx() |
java.lang.String |
getDataPath()
Changes the data path
|
GralColor |
getLineColor()
Returns the set color for this line.
|
int |
getLinePercent()
Returns the position of the 0-line as value from 0 to 100 for this track.
|
float |
getOffset()
Returns the value which is shown at the 0-line.
|
float |
getScale7div()
Returns the scaling per division.
|
private float |
getValueCursor(int cursor) |
float |
getValueCursorLeft() |
float |
getValueCursorRight() |
float |
getValueLast() |
float |
getValueMax() |
float |
getValueMin() |
int |
getVisible()
Returns the state to show. 0=hidden, don't show, but the values are stored.
1= show normal. 2= show lifted out (selected).
|
void |
groupTrackScale(GralCurveViewTrack_ifc from)
Sets the scaling to sharing with another track.
|
boolean |
isGroupedTrackScale(GralCurveViewTrack_ifc with)
Checks whether the scaling is shared with the other given thread
|
void |
setContentInfo(java.lang.Object content)
Sets a application specific info.
|
void |
setDataIx(int dataIx) |
void |
setDataPath(java.lang.String sDataPath)
Sets the data path.
|
void |
setLineProperties(GralColor color,
int width,
int pattern)
Sets the properties for this track.
|
void |
setLongValue(long value)
Sets a value to show.
|
void |
setMinMax(float minValue,
float maxValue)
Maybe used for scaling, yet unused here.
|
void |
setText(java.lang.CharSequence text)
|
void |
setTrackScale(float scale7div,
float offset,
int line0)
Change the scaling of a track.
|
void |
setValue(float value)
Sets a value to show.
|
void |
setValue(java.lang.Object[] value)
Sets some values to show any content.
|
void |
setVisible(int mode)
Set the state to show. 0=hidden, don't show, but the values are stored.
1= show normal. 2= show lifted out (selected).
|
java.lang.String |
toString() |
void |
ungroupTrackScale()
Sets the scaling to a own instance of
GralCurveView.TrackScale . |
public final java.lang.String name
final TimedValues timeValues
public final TimedValues.Track valueTrack
TimedValues#timeShort
private final int ixList
GralCurveView#setSample(float[], int)
private final GralCurveView outer
private java.lang.String sDataPath
protected VariableAccess_ifc variable
GralCurveView.refreshFromVariable(VariableContainer_ifc)
after setDataPath(String)
is given.private java.lang.Object oContent
private int dataIx
public float YYYactValue
public GralCurveView.TrackScale scale
public GralColor lineColor
public int lineWidth
public int showSelected
protected final int[] XXXlastValueY
int identLastSelect
public int ypixLast
public Track(GralCurveView outer, java.lang.String name, int ixList)
public void setContentInfo(java.lang.Object content)
GralSetValue_ifc
setContentInfo
in interface GralSetValue_ifc
public java.lang.Object getContentInfo()
GralSetValue_ifc
GralSetValue_ifc.setContentInfo(Object)
.getContentInfo
in interface GralSetValue_ifc
public void setDataPath(java.lang.String sDataPath)
GralSetValue_ifc
setDataPath
in interface GralCurveViewTrack_ifc
setDataPath
in interface GralSetValue_ifc
public java.lang.String getDataPath()
GralSetValue_ifc
getDataPath
in interface GralCurveViewTrack_ifc
getDataPath
in interface GralSetValue_ifc
public int getDataIx()
getDataIx
in interface GralSetValue_ifc
public void setDataIx(int dataIx)
setDataIx
in interface GralSetValue_ifc
public void setValue(float value)
GralSetValue_ifc
setValue
in interface GralSetValue_ifc
public void setLongValue(long value)
GralSetValue_ifc
setLongValue
in interface GralSetValue_ifc
public void setValue(java.lang.Object[] value)
GralSetValue_ifc
setValue
in interface GralSetValue_ifc
value
- array of floatspublic void setMinMax(float minValue, float maxValue)
setMinMax
in interface GralSetValue_ifc
GralSetValue_ifc.setMinMax(float, float)
public int getLinePercent()
GralCurveViewTrack_ifc
getLinePercent
in interface GralCurveViewTrack_ifc
public float getOffset()
GralCurveViewTrack_ifc
getOffset
in interface GralCurveViewTrack_ifc
public float getScale7div()
GralCurveViewTrack_ifc
getScale7div
in interface GralCurveViewTrack_ifc
public GralColor getLineColor()
GralCurveViewTrack_ifc
getLineColor
in interface GralCurveViewTrack_ifc
public void setTrackScale(float scale7div, float offset, int line0)
setTrackScale
in interface GralCurveViewTrack_ifc
trackNr
- Number of the track in order of creation, 0 ist the first.scale7div
- value per divisionoffset
- value, which is shown at line0line0
- percent of 0-line in graphic.public void groupTrackScale(GralCurveViewTrack_ifc from)
setTrackScale(float, float, int)
influences all shared tracks immediately.
All shared tracks refer the same instance of GralCurveView.TrackScale
.groupTrackScale
in interface GralCurveViewTrack_ifc
from
- public boolean isGroupedTrackScale(GralCurveViewTrack_ifc with)
GralCurveViewTrack_ifc
isGroupedTrackScale
in interface GralCurveViewTrack_ifc
with
- The other track.public void ungroupTrackScale()
GralCurveView.TrackScale
. The track is independent now.ungroupTrackScale
in interface GralCurveViewTrack_ifc
public float getValueCursorLeft()
getValueCursorLeft
in interface GralCurveViewTrack_ifc
public float getValueCursorRight()
getValueCursorRight
in interface GralCurveViewTrack_ifc
private float getValueCursor(int cursor)
public float getValueLast()
getValueLast
in interface GralCurveViewTrack_ifc
public float getValueMin()
getValueMin
in interface GralCurveViewTrack_ifc
public float getValueMax()
getValueMax
in interface GralCurveViewTrack_ifc
public void setLineProperties(GralColor color, int width, int pattern)
GralCurveViewTrack_ifc
setLineProperties
in interface GralCurveViewTrack_ifc
color
- The color of line, null: no changewidth
- The thickness of the line. 0: no changepattern
- a Pattern of the line. Yet the pattern is not used (TODO). Value 0 doesn't change the current one.GralCurveViewTrack_ifc.setLineProperties(org.vishia.gral.ifc.GralColor, int, int)
public void setVisible(int mode)
GralCurveViewTrack_ifc
setVisible
in interface GralCurveViewTrack_ifc
public int getVisible()
GralCurveViewTrack_ifc
getVisible
in interface GralCurveViewTrack_ifc
public void setText(java.lang.CharSequence text)
GralSetValue_ifc
setText
in interface GralSetValue_ifc
public java.lang.String toString()
toString
in class java.lang.Object