public class GSlider extends GSliderAbstract implements ChangeListener, GDisplay
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GSlider(String orientation,
int minVal,
int maxVal,
int initVal,
int spacing)
Creates a GSlider widget based on a JSlider.
|
GSlider(String widgetId,
String orientation,
int minVal,
int maxVal,
int initVal,
int spacing)
Creates a GSlider widget based on a JSlider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
Component |
getComponent()
Returns the low level Swing Component encapsulated by the class if any, otherwise returns
null.
|
JSlider |
getJSlider()
Get the Swing JSlider object.
|
Number |
getMajorTickSpacing()
This method gets the major tick spacing.
|
Number |
getMaxVal()
Get the maximum value of the slider.
|
Number |
getMinVal()
Get the minimum value of the slider.
|
boolean |
getPaintLabels()
Tells if labels are to be painted..
|
boolean |
getPaintTicks()
Tells if the track (area the slider slides in) is to be painted.
|
Number |
getValue()
Get the value of the slider.
|
void |
setMajorTickSpacing(Number spacing)
This method sets the major tick spacing.
|
void |
setPaintLabels(boolean flag)
Determines whether labels are painted on the slider.
|
void |
setPaintTicks(boolean flag)
Determines whether the track is painted on the slider.
|
void |
setValue(Number value)
Set the value of the widget.
|
void |
stateChanged(ChangeEvent e) |
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GSlider(String orientation, int minVal, int maxVal, int initVal, int spacing)
orientation - of the slider, can have the value "VERTICAL" or "HORIZONTAL", default is "HORIZONTAL".minVal - minimum value.maxVal - maximum value.initVal - initial value.spacing - spacing between the ticks.public GSlider(String widgetId, String orientation, int minVal, int maxVal, int initVal, int spacing)
widgetId - widget identifier.orientation - of the slider, can have the value "VERTICAL" or "HORIZONTAL", default is "HORIZONTAL".minVal - minimum value.maxVal - maximum value.initVal - initial value.spacing - spacing between the ticks.public void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerpublic Component getComponent()
getComponent in class GComponentpublic JSlider getJSlider()
getJSlider in class GSliderAbstractpublic boolean getPaintTicks()
getPaintTicks in class GSliderAbstractpublic void setPaintTicks(boolean flag)
setPaintTicks in class GSliderAbstractflag - whether or not to paint the slider track.public boolean getPaintLabels()
getPaintLabels in class GSliderAbstractpublic void setPaintLabels(boolean flag)
setPaintLabels in class GSliderAbstractflag - whether or not to paint labels.public void setMajorTickSpacing(Number spacing)
setMajorTickSpacing in class GSliderAbstractspacing - new value for the majorTickSpacing property.public Number getMajorTickSpacing()
getMajorTickSpacing in class GSliderAbstractpublic Number getValue()
getValue in class GSliderAbstractpublic void setValue(Number value)
setValue in class GSliderAbstractvalue - new value of the widget.public void display()
throws GException
display in interface GDisplayGException - in case of problem while reading the value from file.public Number getMinVal()
getMinVal in class GSliderAbstractpublic Number getMaxVal()
getMaxVal in class GSliderAbstractCopyright © 2024. All rights reserved.