com.threerings.opengl.gui
Class Slider
java.lang.Object
com.threerings.opengl.gui.Component
com.threerings.opengl.gui.Slider
- All Implemented Interfaces:
- ConfigUpdateListener<ManagedConfig>, UIConstants
public class Slider
- extends Component
- implements UIConstants
Displays a track with a little frob somewhere along its length that allows a user to select a
smoothly varying value between two bounds.
| Fields inherited from interface com.threerings.opengl.gui.UIConstants |
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
|
Constructor Summary |
Slider(GlContext ctx,
int orient,
BoundedRangeModel model)
Creates a slider with the specified orientation and range model. |
Slider(GlContext ctx,
int orient,
int min,
int max,
int value)
Creates a slider with the specified orientation, range and value. |
| Methods inherited from class com.threerings.opengl.gui.Component |
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getHitComponent, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setAlpha, setBackground, setBounds, setCursor, setEnabled, setHoverable, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, validate |
Slider
public Slider(GlContext ctx,
int orient,
int min,
int max,
int value)
- Creates a slider with the specified orientation, range and value.
- Parameters:
orient - either UIConstants.HORIZONTAL or UIConstants.VERTICAL.
Slider
public Slider(GlContext ctx,
int orient,
BoundedRangeModel model)
- Creates a slider with the specified orientation and range model. Note that the extent must
be set to zero.
- Parameters:
orient - either UIConstants.HORIZONTAL or UIConstants.VERTICAL.
getModel
public BoundedRangeModel getModel()
- Returns a reference to the slider's range model.
dispatchEvent
public boolean dispatchEvent(Event event)
- Description copied from class:
Component
- Instructs this component to process the supplied event. If the event is not processed, it
will be passed up to its parent component for processing. Derived classes should thus only
call
super.dispatchEvent for events that they did not "consume".
- Overrides:
dispatchEvent in class Component
- Returns:
- true if this event was consumed, false if not.
Copyright © 2011. All Rights Reserved.