public class ValueSliderComponent extends java.lang.Object implements Removable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
callingObject
readout for value
|
Constructor and Description |
---|
ValueSliderComponent(java.lang.Object co,
int min,
int max,
java.lang.String property,
java.lang.String label)
Create a ValueSliderComponent
|
ValueSliderComponent(java.lang.Object co,
int min,
int max,
java.lang.String property,
java.lang.String label,
float scale,
boolean andSet)
Create a ValueSliderComponent
|
ValueSliderComponent(java.lang.Object co,
int min,
int max,
java.lang.String property,
java.lang.String label,
float scale,
boolean andSet,
java.lang.String tip)
Create a ValueSliderComponent
|
Modifier and Type | Method and Description |
---|---|
void |
doRemove()
Remove the reference to the displayControl
|
javax.swing.JComponent |
getContents(boolean withLabel)
Get the GUI contents
|
boolean |
getObjectHasInitialized()
Has the calling object been initialized? Subclasses should
override if necessary.
|
float |
getValue()
Get the value of the widget
|
void |
logException(java.lang.String msg,
java.lang.Exception exc)
Shortcut to logging facility for subclasses to use
|
void |
setEnabled(boolean enable)
Enable or disable the widget.
|
void |
setPaintLabels(boolean value)
Set the property on the slider
|
void |
setPaintTicks(boolean value)
Set the property on the slider
|
void |
setSnapToTicks(boolean value)
Set the property on the slider
|
void |
setValue(float value)
Set the value on the widget.
|
void |
setValue(int value)
Set the value on the widget.
|
public ValueSliderComponent(java.lang.Object co, int min, int max, java.lang.String property, java.lang.String label)
co
- calling objectmin
- minimum slider valuemax
- maximum slider valueproperty
- Object's property to setlabel
- label for the widgetpublic ValueSliderComponent(java.lang.Object co, int min, int max, java.lang.String property, java.lang.String label, float scale, boolean andSet)
co
- calling objectmin
- minimum slider valuemax
- maximum slider valueproperty
- Object's property to setlabel
- label for the widgetscale
- scale factor for the valuesandSet
- set the property on the calling object if truepublic ValueSliderComponent(java.lang.Object co, int min, int max, java.lang.String property, java.lang.String label, float scale, boolean andSet, java.lang.String tip)
co
- calling objectmin
- minimum slider valuemax
- maximum slider valueproperty
- calling object property to setlabel
- label for the widgetscale
- scale factor for the valuesandSet
- set the property on the calling object if truetip
- tool tip text for the widgetpublic javax.swing.JComponent getContents(boolean withLabel)
withLabel
- true if the component should include the labelpublic void setValue(int value)
value
- new valuepublic void setValue(float value)
value
- new valuepublic float getValue()
public void setEnabled(boolean enable)
enable
- true to enablepublic void setSnapToTicks(boolean value)
value
- true to snap slider to tickspublic void setPaintTicks(boolean value)
value
- true to paint slider tickspublic void setPaintLabels(boolean value)
value
- true to paint slider labelspublic boolean getObjectHasInitialized()
public void logException(java.lang.String msg, java.lang.Exception exc)
msg
- error messageexc
- error Exception