| java.lang.Object org.wings.SComponent org.wings.SSlider
SSlider | public class SSlider extends SComponent implements SConstants,LowLevelEventListener(Code) | | A component that lets the user graphically select a value by sliding
a knob within a bounded interval.
The displayed slider is highly dependent on the graphics used,
see http://developer.yahoo.com/yui/slider/.
author: Christian Schyma |
Field Summary | |
protected ChangeListener | changeListener The changeListener (no suffix) is the listener we add to the
Sliders model. | protected int | majorTickSpacing The number of values between the major tick marks. | protected int | orientation | protected BoundedRangeModel | sliderModel The data model that handles the numeric maximum value,
minimum value, and current-position value for the slider. | protected boolean | snapToTicks If true, the knob (and the data value it represents)
resolve to the closest tick mark next to where the user
positioned the knob. |
Constructor Summary | |
public | SSlider() Creates a horizontal slider with the range 0 to 100 and
an initial value of 50. | public | SSlider(int orientation) Creates a slider using the specified orientation with the
range 0 to 100 and an initial value of 50. | public | SSlider(int min, int max) Creates a horizontal slider using the specified min and max
with an initial value equal to the average of the min plus max. | public | SSlider(int min, int max, int value) Creates a horizontal slider using the specified min, max and value. | public | SSlider(int orientation, int min, int max, int value) Creates a slider with the specified orientation and the
specified minimum, maximum, and initial values. |
majorTickSpacing | protected int majorTickSpacing(Code) | | The number of values between the major tick marks.
|
sliderModel | protected BoundedRangeModel sliderModel(Code) | | The data model that handles the numeric maximum value,
minimum value, and current-position value for the slider.
|
snapToTicks | protected boolean snapToTicks(Code) | | If true, the knob (and the data value it represents)
resolve to the closest tick mark next to where the user
positioned the knob. The default is false.
See Also: SSlider.setSnapToTicks |
SSlider | public SSlider()(Code) | | Creates a horizontal slider with the range 0 to 100 and
an initial value of 50.
|
SSlider | public SSlider(int orientation)(Code) | | Creates a slider using the specified orientation with the
range 0 to 100 and an initial value of 50.
|
SSlider | public SSlider(int min, int max)(Code) | | Creates a horizontal slider using the specified min and max
with an initial value equal to the average of the min plus max.
|
SSlider | public SSlider(int min, int max, int value)(Code) | | Creates a horizontal slider using the specified min, max and value.
|
createChangeListener | protected ChangeListener createChangeListener()(Code) | | Subclasses that want to handle model ChangeEvents differently
can override this method to return their own ChangeListener
implementation. The default ChangeListener just forwards
ChangeEvents to the ChangeListeners added directly to the slider.
See Also: SSlider.fireStateChanged |
fireFinalEvents | public void fireFinalEvents()(Code) | | |
fireIntermediateEvents | public void fireIntermediateEvents()(Code) | | |
fireStateChanged | protected void fireStateChanged()(Code) | | Notifies all listeners that have registered interest in
ChangeEvent s.
|
getChangeListeners | public ChangeListener[] getChangeListeners()(Code) | | Returns an array of all the ChangeListener s added
to this slider with addChangeListener .
all of the ChangeListener s added or an emptyarray if no listeners have been added |
getMajorTickSpacing | public int getMajorTickSpacing()(Code) | | This method returns the major tick spacing. The number that is returned
represents the distance, measured in values, between each major tick mark.
If you have a slider with a range from 0 to 50 and the major tick spacing
is set to 10, you will get major ticks next to the following values:
0, 10, 20, 30, 40, 50.
the number of values between major ticks See Also: SSlider.setMajorTickSpacing |
getMaximum | public int getMaximum()(Code) | | Returns the maximum value supported by the slider.
the value of the models maximum property See Also: SSlider.setMaximum |
getMinimum | public int getMinimum()(Code) | | Returns the minimum value supported by the slider.
the value of the models minimum property See Also: SSlider.setMinimum |
getOrientation | public int getOrientation()(Code) | | Return this slider's vertical or horizontal orientation.
VERTICAL or HORIZONTAL See Also: SSlider.setOrientation |
getSnapToTicks | public boolean getSnapToTicks()(Code) | | Returns true if the knob (and the data value it represents)
resolve to the closest tick mark next to where the user
positioned the knob.
true if the value snaps to the nearest tick mark, else false See Also: SSlider.setSnapToTicks |
getValue | public int getValue()(Code) | | Returns the sliders value.
the models value property See Also: SSlider.setValue |
isEpochCheckEnabled | public boolean isEpochCheckEnabled()(Code) | | |
processLowLevelEvent | public void processLowLevelEvent(String action, String[] values)(Code) | | |
setMajorTickSpacing | public void setMajorTickSpacing(int n)(Code) | | This method sets the major tick spacing. The number that is passed-in
represents the distance, measured in values, between each major tick mark.
If you have a slider with a range from 0 to 50 and the major tick spacing
is set to 10, you will get major ticks next to the following values:
0, 10, 20, 30, 40, 50.
See Also: SSlider.getMajorTickSpacing |
setMaxPixelConstraint | public void setMaxPixelConstraint(int max)(Code) | | The maximum number of pixels the slider thumb can be moved. Usefull when
using different slider thumb or bar graphics.
Parameters: max - pixels |
setSnapToTicks | public void setSnapToTicks(boolean b)(Code) | | Specifying true makes the knob (and the data value it represents)
resolve to the closest tick mark next to where the user
positioned the knob.
Parameters: b - true to snap the knob to the nearest tick mark See Also: SSlider.getSnapToTicks |
setValue | public void setValue(int n)(Code) | | Sets the sliders current value. This method just forwards
the value to the model.
See Also: SSlider.getValue |
Methods inherited from org.wings.SComponent | final public void addComponentListener(SComponentListener l)(Code)(Java Doc) public void addDynamicStyle(Style style)(Code)(Java Doc) final protected void addEventListener(Class<T> type, T listener)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) final public void addParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void addRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void addScriptListener(ScriptListener listener)(Code)(Java Doc) public void addStyle(String additionalCssClassName)(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected void fireComponentChangeEvent(SComponentEvent aEvent)(Code)(Java Doc) public void fireFinalEvents()(Code)(Java Doc) protected void fireKeyEvents()(Code)(Java Doc) final public void fireRenderEvent(int type)(Code)(Java Doc) public ActionMap getActionMap()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public SBorder getBorder()(Code)(Java Doc) public ComponentCG getCG()(Code)(Java Doc) final public Object getClientProperty(Object key)(Code)(Java Doc) public SPopupMenu getComponentPopupMenu()(Code)(Java Doc) public Style getDynamicStyle(Selector selector)(Code)(Java Doc) public Collection getDynamicStyles()(Code)(Java Doc) public int getFocusTraversalIndex()(Code)(Java Doc) public SFont getFont()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public int getHorizontalAlignment()(Code)(Java Doc) public InputMap getInputMap()(Code)(Java Doc) public InputMap getInputMap(int condition)(Code)(Java Doc) final protected int getListenerCount(Class type)(Code)(Java Doc) final protected Object[] getListenerList()(Code)(Java Doc) final public EventListener[] getListeners(Class<? extends EventListener> type)(Code)(Java Doc) public String getLowLevelEventId()(Code)(Java Doc) final public String getName()(Code)(Java Doc) final public SContainer getParent()(Code)(Java Doc) public SFrame getParentFrame()(Code)(Java Doc) public SDimension getPreferredSize()(Code)(Java Doc) public RequestURL getRequestURL()(Code)(Java Doc) public boolean getResidesInForm()(Code)(Java Doc) public List<ScriptListener> getScriptListenerList()(Code)(Java Doc) public ScriptListener[] getScriptListeners()(Code)(Java Doc) final public Session getSession()(Code)(Java Doc) public boolean getShowAsFormComponent()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) public String getToolTipText()(Code)(Java Doc) public int getVerticalAlignment()(Code)(Java Doc) public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc) protected static boolean isDifferent(Object oldObject, Object newObject)(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusOwner()(Code)(Java Doc) public boolean isRecursivelyVisible()(Code)(Java Doc) public boolean isReloadForced()(Code)(Java Doc) protected boolean isUpdatePossible()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) protected String paramString()(Code)(Java Doc) protected void processComponentEvent(SComponentListener listener, SComponentEvent e)(Code)(Java Doc) protected boolean processKeyEvents(String[] values)(Code)(Java Doc) protected void processLowLevelEvent(String name, String[] values)(Code)(Java Doc) final public void putClientProperty(Object key, Object value)(Code)(Java Doc) final void register()(Code)(Java Doc) public void reload()(Code)(Java Doc) final protected void reloadIfChange(Object oldVal, Object newVal)(Code)(Java Doc) final protected void reloadIfChange(int oldVal, int newVal)(Code)(Java Doc) final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code)(Java Doc) final protected void reloadIfChange(byte oldVal, byte newVal)(Code)(Java Doc) final protected void reloadIfChange(short oldVal, short newVal)(Code)(Java Doc) final protected void reloadIfChange(long oldVal, long newVal)(Code)(Java Doc) final protected void reloadIfChange(float oldVal, float newVal)(Code)(Java Doc) final protected void reloadIfChange(double oldVal, double newVal)(Code)(Java Doc) final protected void reloadIfChange(char oldVal, char newVal)(Code)(Java Doc) final public void removeComponentListener(SComponentListener l)(Code)(Java Doc) public void removeDynamicStyle(Selector selector)(Code)(Java Doc) final protected void removeEventListener(Class<T> type, T listener)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) final public void removeParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void removeRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void removeScriptListener(ScriptListener listener)(Code)(Java Doc) public void removeStyle(String cssStyleClassName)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void scrollRectToVisible(Rectangle aRect)(Code)(Java Doc) public void setActionMap(ActionMap actionMap)(Code)(Java Doc) public void setAttribute(String cssPropertyName, String value)(Code)(Java Doc) public void setAttribute(CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, SIcon icon)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, Color color)(Code)(Java Doc) public void setAttributes(Selector selector, CSSAttributeSet attributes)(Code)(Java Doc) public void setBackground(Color color)(Code)(Java Doc) public void setBorder(SBorder border)(Code)(Java Doc) public void setCG(ComponentCG newCG)(Code)(Java Doc) public void setComponentPopupMenu(SPopupMenu popupMenu)(Code)(Java Doc) public void setDynamicStyles(Collection dynamicStyles)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setFocusTraversalIndex(int index)(Code)(Java Doc) public void setFont(SFont font)(Code)(Java Doc) public void setForeground(Color color)(Code)(Java Doc) public void setHorizontalAlignment(int alignment)(Code)(Java Doc) public void setInputMap(InputMap inputMap)(Code)(Java Doc) public void setInputMap(int condition, InputMap inputMap)(Code)(Java Doc) public void setName(String uniqueName)(Code)(Java Doc) public void setNameRaw(String uncheckedName)(Code)(Java Doc) public void setParent(SContainer parent)(Code)(Java Doc) protected void setParentFrame(SFrame parentFrame)(Code)(Java Doc) public void setPreferredSize(SDimension preferredSize)(Code)(Java Doc) public void setReloadForced(boolean forced)(Code)(Java Doc) public void setShowAsFormComponent(boolean showAsFormComponent)(Code)(Java Doc) public void setStyle(String cssClassName)(Code)(Java Doc) public void setToolTipText(String t)(Code)(Java Doc) public void setVerticalAlignment(int alignment)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public String toString()(Code)(Java Doc) final void unregister()(Code)(Java Doc) public void update(Update update)(Code)(Java Doc) public void updateCG()(Code)(Java Doc) public void write(Device s) throws IOException(Code)(Java Doc)
|
|
|