|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
visad.browser.RangeSlider
public class RangeSlider
A slider widget that allows users to select a lower and upper bound.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_NAME
Default variable name. |
static int |
FONT_BOTTOM_Y
Y-coordinate of bottom of font. |
static int |
FONT_HEIGHT
Height of font. |
static int |
FONT_TOP_Y
Y-coordinate of top of font. |
static int |
GRIP_BOTTOM_Y
Y-coordinate of bottom of grip. |
static int |
GRIP_HEIGHT
Height of grip. |
static int |
GRIP_MIDDLE_Y
Y-coordinate of middle of grip. |
static int |
GRIP_TOP_Y
Y-coordinate of top of grip. |
static int |
GRIP_WIDTH
Width of grip. |
protected float |
maxLimit
Maximum slider value. |
protected java.awt.Dimension |
maxSize
Maximum widget size. |
protected float |
maxValue
Percent through scale of max gripper. |
protected float |
minLimit
Minimum slider value. |
protected java.awt.Dimension |
minSize
Minimum widget size. |
protected float |
minValue
Percent through scale of min gripper. |
protected java.awt.Dimension |
prefSize
Preferred widget size. |
static int |
SLIDER_LINE_HEIGHT
Height of slider line. |
static int |
SLIDER_LINE_WIDTH
Width of slider line. |
static int |
SLIDER_PREF_HEIGHT
Preferred slider height. |
static int |
SLIDER_PREF_WIDTH
Preferred slider width. |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
RangeSlider(java.lang.String n,
float min,
float max)
Constructs a RangeSlider with the specified range of values. |
Method Summary | |
---|---|
java.awt.Dimension |
getMaximumSize()
Returns maximum size of range slider. |
java.awt.Dimension |
getMinimumSize()
Returns minimum size of range slider. |
float[] |
getMinMaxValues()
Gets minimum and maximum slider values. |
java.awt.Dimension |
getPreferredSize()
Returns preferred size of range slider. |
static void |
main(java.lang.String[] argv)
Main method for testing purposes. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Not used. |
void |
mouseDragged(java.awt.event.MouseEvent e)
MouseMotionListener method for moving slider. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Not used. |
void |
mouseExited(java.awt.event.MouseEvent e)
Not used. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Not used. |
void |
mousePressed(java.awt.event.MouseEvent e)
MouseListener method for moving slider. |
void |
mouseReleased(java.awt.event.MouseEvent e)
MouseListener method for moving slider. |
void |
paint(java.awt.Graphics g)
Draws the slider from scratch. |
void |
repaint()
Repaints anything that needs it. |
protected void |
resetValues(float min,
float max)
Resets the minimum and maximum values. |
void |
setBounds(float min,
float max)
Sets the slider's lo and hi bounds. |
void |
setBounds(int x,
int y,
int w,
int h)
Redraws the slider if the widget width changes. |
void |
setMaximumSize(java.awt.Dimension dim)
Sets preferred size of range slider. |
void |
setMinimumSize(java.awt.Dimension dim)
Sets minimum size of range slider. |
void |
setName(java.lang.String name)
Sets the slider's name. |
void |
setPreferredSize(java.awt.Dimension dim)
Sets preferred size of range slider. |
void |
setValues(float lo,
float hi)
Sets the slider's lo and hi values. |
void |
valuesUpdated()
Called whenever the min or max value is updated. |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_NAME
public static final int SLIDER_PREF_HEIGHT
public static final int SLIDER_PREF_WIDTH
public static final int GRIP_WIDTH
public static final int GRIP_HEIGHT
public static final int GRIP_TOP_Y
public static final int GRIP_BOTTOM_Y
public static final int GRIP_MIDDLE_Y
public static final int SLIDER_LINE_HEIGHT
public static final int SLIDER_LINE_WIDTH
public static final int FONT_HEIGHT
public static final int FONT_TOP_Y
public static final int FONT_BOTTOM_Y
protected float minValue
protected float maxValue
protected float minLimit
protected float maxLimit
protected java.awt.Dimension minSize
protected java.awt.Dimension prefSize
protected java.awt.Dimension maxSize
Constructor Detail |
---|
public RangeSlider(java.lang.String n, float min, float max)
Method Detail |
---|
public float[] getMinMaxValues()
protected void resetValues(float min, float max)
public void setName(java.lang.String name)
setName
in class java.awt.Component
public void setBounds(float min, float max)
public void setValues(float lo, float hi)
public void setBounds(int x, int y, int w, int h)
setBounds
in class java.awt.Component
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public void setMinimumSize(java.awt.Dimension dim)
setMinimumSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public void setPreferredSize(java.awt.Dimension dim)
setPreferredSize
in class java.awt.Component
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class java.awt.Component
public void setMaximumSize(java.awt.Dimension dim)
setMaximumSize
in class java.awt.Component
public void valuesUpdated()
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
public void repaint()
repaint
in class java.awt.Component
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |