public class HSliderBar extends SliderBar
HSliderBar listens for the following key events. Holding down a key will repeat the action until the key is released.
SliderBar.KeyTimer, SliderBar.LabelFormatter
curValue, images, keyTimer, knobImage, labelElements, labelFormatter, lineElement, lineOffset, maxValue, minValue, numLabels, numTicks, sliderListeners, slidingKeyboard, slidingMouse, stepSize, styleBaseName, tickElements
Constructor and Description |
---|
HSliderBar(double minValue,
double maxValue)
Create a slider bar.
|
HSliderBar(double minValue,
double maxValue,
SliderBar.LabelFormatter labelFormatter)
Create a slider bar.
|
HSliderBar(double minValue,
double maxValue,
SliderBar.LabelFormatter labelFormatter,
com.google.gwt.user.client.ui.AbstractImagePrototype[] images)
Create a slider bar.
|
HSliderBar(double minValue,
double maxValue,
SliderBar.LabelFormatter labelFormatter,
com.google.gwt.user.client.ui.AbstractImagePrototype[] images,
String styleBaseName)
Create a slider bar.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawKnob()
Draw the knob where it is supposed to be relative to the line.
|
protected void |
drawLabels()
Draw the labels along the line.
|
protected void |
drawTicks()
Draw the tick along the line.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
Listen for events that will move the knob.
|
void |
onResize(int width,
int height)
This method is called when the dimensions of the parent element change.
|
void |
shiftLeft(int numSteps)
Shift to the left (smaller value).
|
void |
shiftRight(int numSteps)
Shift to the right (greater value).
|
protected void |
startSliding(boolean highlight,
boolean fireEvent)
Start sliding the knob.
|
protected void |
stopSliding(boolean unhighlight,
boolean fireEvent)
Stop sliding the knob.
|
addSliderListener, formatLabel, getCurrentValue, getKnobPercent, getLabelFormatter, getMaxValue, getMinValue, getNumLabels, getNumTicks, getStepSize, getTotalRange, highlight, onLoad, redraw, removeSliderListener, resetCurrentValue, setCurrentValue, setCurrentValue, setLabelFormatter, setMaxValue, setMinValue, setNumLabels, setNumTicks, setStepSize, unhighlight
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus, setTabIndex
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getElement, isAttached
forEach, spliterator
public HSliderBar(double minValue, double maxValue)
minValue
- the minimum value in the rangemaxValue
- the maximum value in the rangepublic HSliderBar(double minValue, double maxValue, SliderBar.LabelFormatter labelFormatter)
minValue
- the minimum value in the rangemaxValue
- the maximum value in the rangelabelFormatter
- the label formatterpublic HSliderBar(double minValue, double maxValue, SliderBar.LabelFormatter labelFormatter, com.google.gwt.user.client.ui.AbstractImagePrototype[] images)
minValue
- the minimum value in the rangemaxValue
- the maximum value in the rangelabelFormatter
- the label formatterimages
- the images to use for the sliderpublic HSliderBar(double minValue, double maxValue, SliderBar.LabelFormatter labelFormatter, com.google.gwt.user.client.ui.AbstractImagePrototype[] images, String styleBaseName)
minValue
- the minimum value in the rangemaxValue
- the maximum value in the rangelabelFormatter
- the label formatterimages
- the images to use for the sliderstyleBaseName
- the base name from which CSS style
names for the slider are derivedpublic void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
event
- the event that occurredpublic void onResize(int width, int height)
width
- the new client width of the elementheight
- the new client height of the elementpublic void shiftLeft(int numSteps)
numSteps
- the number of steps to shiftpublic void shiftRight(int numSteps)
numSteps
- the number of steps to shiftprotected void drawKnob()
protected void drawLabels()
drawLabels
in class SliderBar
protected void drawTicks()
protected void startSliding(boolean highlight, boolean fireEvent)
startSliding
in class SliderBar
highlight
- true to change the stylefireEvent
- true to fire the eventprotected void stopSliding(boolean unhighlight, boolean fireEvent)
stopSliding
in class SliderBar
unhighlight
- true to change the stylefireEvent
- true to fire the eventCopyright © 2017. All Rights Reserved.