gui.run
Class RunSlider

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JSlider
                  extended by gui.run.RunSlider
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.SwingConstants
Direct Known Subclasses:
RunSlider.Angle180Slider, RunSlider.Angle360Slider, RunSlider.BiAngle360Slider, RunSlider.PercentageSlider, RunSlider.zeroTo255Slider, RunSlider.zeroTo90Slider

public abstract class RunSlider
extends javax.swing.JSlider
implements javax.swing.event.ChangeListener, java.lang.Runnable

See Also:
Serialized Form

Nested Class Summary
static class RunSlider.Angle180Slider
           
static class RunSlider.Angle360Slider
           
static class RunSlider.BiAngle360Slider
           
static class RunSlider.PercentageSlider
           
static class RunSlider.zeroTo255Slider
           
static class RunSlider.zeroTo90Slider
           
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RunSlider()
           
RunSlider(double min, double max, double defaultValue)
           
RunSlider(int orientation)
          Creates a slider using the specified orientation with the range 0 to 100 and an initial value of 50.
RunSlider(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.
RunSlider(int min, int max, double defaultValue)
          Creates a horizontal slider using the specified min, max and value.
RunSlider(int min, int max, double defaultValue, int orientation)
          Creates a horizontal slider using the specified min, max and value.
RunSlider(int orientation, int min, int max, int defaultValue)
           
 
Method Summary
static RunSlider getLabeledSlider(java.lang.String s, RunSlider rs)
           
 javax.swing.JLabel getValueLabel()
           
static void main(java.lang.String[] args)
           
 void setIdentifier(java.lang.String id)
           
 void setTickLabelFonts(java.awt.Font f)
          Set all the labels to the same font.
 void setValueLabel(javax.swing.JLabel vl)
           
 void stateChanged(javax.swing.event.ChangeEvent ae)
           
 
Methods inherited from class javax.swing.JSlider
addChangeListener, createStandardLabels, createStandardLabels, getAccessibleContext, getChangeListeners, getExtent, getInverted, getLabelTable, getMajorTickSpacing, getMaximum, getMinimum, getMinorTickSpacing, getModel, getOrientation, getPaintLabels, getPaintTicks, getPaintTrack, getSnapToTicks, getUI, getUIClassID, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setInverted, setLabelTable, setMajorTickSpacing, setMaximum, setMinimum, setMinorTickSpacing, setModel, setOrientation, setPaintLabels, setPaintTicks, setPaintTrack, setSnapToTicks, setUI, setValue, setValueIsAdjusting, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

RunSlider

public RunSlider(int orientation,
                 int min,
                 int max,
                 int defaultValue)

RunSlider

public RunSlider()

RunSlider

public RunSlider(int orientation)
Creates a slider using the specified orientation with the range 0 to 100 and an initial value of 50.


RunSlider

public RunSlider(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.


RunSlider

public RunSlider(int min,
                 int max,
                 double defaultValue)
Creates a horizontal slider using the specified min, max and value.


RunSlider

public RunSlider(int min,
                 int max,
                 double defaultValue,
                 int orientation)
Creates a horizontal slider using the specified min, max and value.


RunSlider

public RunSlider(double min,
                 double max,
                 double defaultValue)
Method Detail

setTickLabelFonts

public void setTickLabelFonts(java.awt.Font f)
Set all the labels to the same font.

Parameters:
f -

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent ae)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

getValueLabel

public javax.swing.JLabel getValueLabel()

setValueLabel

public void setValueLabel(javax.swing.JLabel vl)

setIdentifier

public void setIdentifier(java.lang.String id)

getLabeledSlider

public static RunSlider getLabeledSlider(java.lang.String s,
                                         RunSlider rs)

main

public static void main(java.lang.String[] args)