yu.ac.bg.etf.javaqx.qswing
Class JQSlider

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
          extended byyu.ac.bg.etf.javaqx.qswing.JQSlider
All Implemented Interfaces:
Disposable, JQComponentProperties, JQSliderProperties, QSwingConstants

public class JQSlider
extends JQComponent
implements QSwingConstants, JQSliderProperties

Slider Component.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static int NO_TICKS
          Ticks position no thicks (the value is 0).
static int TICKS_ABOVE
          Ticks position thicks above (the value is 1).
static int TICKS_BELOW
          Ticks position thicks below (the value is 2).
static int TICKS_BOTH_LEFT
          Ticks position thicks left (the value is 1).
static int TICKS_BOTH_RIGHT
          Ticks position thicks right (the value is 2).
static int TICKS_BOTH_SIDES
          Ticks position thicks both sides (the value is 3).
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
listenerList
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.QSwingConstants
BOTTOM, CENTER, HORIZONTAL, LEADING, LEFT, RIGHT, TOP, TRAILING, VERTICAL
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQSliderProperties
PROPERTY_MODEL, PROPERTY_ORIENTATION, PROPERTY_PAINT_TICKS, PROPERTY_TICK_POSITION, PROPERTY_TICK_SPACING
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Constructor Summary
JQSlider()
          Constructs new JQSlider object.
JQSlider(BoundedRangeModel model)
          Constructs new JQSlider object.
JQSlider(int orientation)
          Constructs new JQSlider object.
JQSlider(int minimum, int maximum)
          Constructs new JQSlider object.
JQSlider(int minimum, int maximum, int value)
          Constructs new JQSlider object.
JQSlider(int orientation, int minimum, int maximum, int value)
          Constructs new JQSlider object.
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Adds change listener.
protected  void fireStateChanged()
          Fires state changed event.
 ChangeListener[] getChangeListeners()
          Returns change listeners.
 int getMaximum()
          Returns maximum slider value.
 int getMinimum()
          Returns minimum slider value.
 BoundedRangeModel getModel()
          Returns data model of the slider.
 int getOrientation()
          Returns orientation of the slider.
 boolean getPaintTicks()
          Returns true if slider ticks are painted.
 int getTickPosition()
          Returns tick position of the slider.
 int getTickSpacing()
          Returns tick spacing of the slider.
 int getValue()
          Returns current value of the slider.
 boolean getValueIsAdjusting()
          Returns true if the slider knob is being dragged.
protected  java.lang.String paramString()
          Returns parameters string.
 void removeChangeListener(ChangeListener listener)
          Removes change listener.
 void setMaximum(int maximum)
          Sets maximum slider value.
 void setMinimum(int minimum)
          Sets minimum slider value.
 void setModel(BoundedRangeModel model)
          Sets data model of the slider.
 void setOrientation(int orientation)
          Sets orientation.
 void setPaintTicks(boolean paintTicks)
          Sets whether of not slider ticks are painted.
 void setTickPosition(int tickPosition)
          Sets tick position.
 void setTickSpacing(int tickSpacing)
          Sets tick spacing.
 void setValue(int value)
          Sets current value of the slider.
 void setValueIsAdjusting(boolean adjusting)
          Sets the value of the valueIsAdjusting property.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, disableEvents, disposeComponent, disposeObject, enableEvents, eventEnabled, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getClientProperty, getComponentListeners, getComponentOrientation, getContextMenu, getCursor, getEventMask, getFocusListener, getFont, getFontMetrics, getForeground, getHeight, getInsets, getKeyListeners, getLocale, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getOwnedComponents, getOwner, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getResourceBundleName, getSize, getStatusTipText, getStyleSheet, getToolTipText, getToolTipText, getWhatsThisText, getWidth, getX, getY, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLeftToRight, isLocaleSet, isOpaque, isOwnerOf, isPainting, isResizable, isResourceBundleNameSet, isUpdatesEnabled, isValid, isVisible, localizeObject, localizeString, localizeString, localizeStrings, paintComponent, processComponentEvent, processContextMenuEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processStyleChange, putClientProperty, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, repaint, repaint, repaint, requestFocus, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setContextMenu, setCursor, setDefaultResourceBundleName, setDisplayable, setEnabled, setFixedSize, setFixedSize, setFocusable, setFont, setForeground, setInsets, setInsets, setLeftToRightComponentOrientation, setLocale, setLocation, setLocation, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setPreferredSize, setResizable, setResourceBundleName, setRightToLeftComponentOrientation, setSize, setSize, setStatusTipText, setStyleSheet, setStyleSheet, setToolTipText, setUpdatesEnabled, setVisible, setWhatsThisText, toString, unsetComponentOrientation, update, update, update, updateComponentOrientation, updateLocalization, validate
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_TICKS

public static final int NO_TICKS
Ticks position no thicks (the value is 0).

See Also:
Constant Field Values

TICKS_ABOVE

public static final int TICKS_ABOVE
Ticks position thicks above (the value is 1).

See Also:
Constant Field Values

TICKS_BELOW

public static final int TICKS_BELOW
Ticks position thicks below (the value is 2).

See Also:
Constant Field Values

TICKS_BOTH_SIDES

public static final int TICKS_BOTH_SIDES
Ticks position thicks both sides (the value is 3).

See Also:
Constant Field Values

TICKS_BOTH_LEFT

public static final int TICKS_BOTH_LEFT
Ticks position thicks left (the value is 1).

See Also:
Constant Field Values

TICKS_BOTH_RIGHT

public static final int TICKS_BOTH_RIGHT
Ticks position thicks right (the value is 2).

See Also:
Constant Field Values
Constructor Detail

JQSlider

public JQSlider()
Constructs new JQSlider object.


JQSlider

public JQSlider(int orientation)
Constructs new JQSlider object.

Parameters:
orientation - the orientation of the slider

JQSlider

public JQSlider(int minimum,
                int maximum)
Constructs new JQSlider object.

Parameters:
minimum - the minimum value of the slider
maximum - the maximum value of the slider

JQSlider

public JQSlider(int minimum,
                int maximum,
                int value)
Constructs new JQSlider object.

Parameters:
minimum - the minimum value of the slider
maximum - the maximum value of the slider
value - the current value of the slider

JQSlider

public JQSlider(int orientation,
                int minimum,
                int maximum,
                int value)
Constructs new JQSlider object.

Parameters:
orientation - the orientation of the slider
minimum - the minimum value of the slider
maximum - the maximum value of the slider
value - the current value of the slider

JQSlider

public JQSlider(BoundedRangeModel model)
Constructs new JQSlider object.

Parameters:
model - the model
Method Detail

getModel

public BoundedRangeModel getModel()
Returns data model of the slider.

Returns:
data model of the slider

setModel

public void setModel(BoundedRangeModel model)
Sets data model of the slider.

Parameters:
model - the data model

getValue

public int getValue()
Returns current value of the slider.

Returns:
current value of the slider

setValue

public void setValue(int value)
Sets current value of the slider.

Parameters:
value - the current value of the slider

getMinimum

public int getMinimum()
Returns minimum slider value.

Returns:
minimum slider value

setMinimum

public void setMinimum(int minimum)
Sets minimum slider value.

Parameters:
minimum - the maximum slider value

getMaximum

public int getMaximum()
Returns maximum slider value.

Returns:
maximum slider value

setMaximum

public void setMaximum(int maximum)
Sets maximum slider value.

Parameters:
maximum - the maximum slider value

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns true if the slider knob is being dragged.

Returns:
true if the slider knob is being dragged

setValueIsAdjusting

public void setValueIsAdjusting(boolean adjusting)
Sets the value of the valueIsAdjusting property.

Parameters:
adjusting - the value of the valueIsAdjusting property

getOrientation

public int getOrientation()
Returns orientation of the slider.

Returns:
orientation of the slider

setOrientation

public void setOrientation(int orientation)
Sets orientation.

Parameters:
orientation - the orientation

getTickPosition

public int getTickPosition()
Returns tick position of the slider.

Returns:
tick position of the slider

setTickPosition

public void setTickPosition(int tickPosition)
Sets tick position.

Parameters:
tickPosition - the tick position

getPaintTicks

public boolean getPaintTicks()
Returns true if slider ticks are painted.

Returns:
true if slider ticks are painted

setPaintTicks

public void setPaintTicks(boolean paintTicks)
Sets whether of not slider ticks are painted.

Parameters:
paintTicks - true if painted

getTickSpacing

public int getTickSpacing()
Returns tick spacing of the slider.

Returns:
tick spacing of the slider

setTickSpacing

public void setTickSpacing(int tickSpacing)
Sets tick spacing.

Parameters:
tickSpacing - the tick spacing

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds change listener.

Parameters:
listener - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes change listener.

Parameters:
listener - the component listener

getChangeListeners

public ChangeListener[] getChangeListeners()
Returns change listeners.

Returns:
change listeners

fireStateChanged

protected void fireStateChanged()
Fires state changed event.


paramString

protected java.lang.String paramString()
Returns parameters string.

Overrides:
paramString in class JQComponent
Returns:
parameters string


Copyright © 2007 ETF and contributors. All Rights Reserved.