de.matthiasmann.twl
Class ValueAdjusterInt

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.ValueAdjuster
          extended by de.matthiasmann.twl.ValueAdjusterInt

public class ValueAdjusterInt
extends ValueAdjuster

A value adjuster for integers.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
 
Fields inherited from class de.matthiasmann.twl.ValueAdjuster
STATE_EDIT_ACTIVE
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
ValueAdjusterInt()
           
ValueAdjusterInt(IntegerModel model)
           
 
Method Summary
protected  void addModelCallback()
           
protected  void afterAddToGUI(GUI gui)
          Called after this widget has been added to a GUI tree.
protected  void beforeRemoveFromGUI(GUI gui)
          Called when this widget is removed from the GUI tree.
protected  void doDecrement()
           
protected  void doIncrement()
           
protected  java.lang.String formatText()
           
 int getMaxValue()
           
 int getMinValue()
           
 IntegerModel getModel()
           
 int getValue()
           
protected  void onDragCancelled()
           
protected  void onDragStart()
           
protected  void onDragUpdate(int dragDelta)
           
protected  void onEditCanceled()
           
protected  boolean onEditEnd(java.lang.String text)
           
protected  java.lang.String onEditStart()
           
protected  void removeModelCallback()
           
 void setMinMaxValue(int minValue, int maxValue)
           
 void setModel(IntegerModel model)
           
 void setValue(int value)
           
protected  boolean shouldStartEdit(char ch)
           
protected  void syncWithModel()
           
protected  java.lang.String validateEdit(java.lang.String text)
           
 
Methods inherited from class de.matthiasmann.twl.ValueAdjuster
applyTheme, applyThemeValueAdjuster, cancelEdit, cancelOrAcceptEdit, getDisplayPrefix, getMinHeight, getMinWidth, getPreferredInnerHeight, getPreferredInnerWidth, handleEvent, isAcceptValueOnFocusLoss, isUseMouseWheel, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layout, onDragEnd, setAcceptValueOnFocusLoss, setDisplayPrefix, setDisplayText, setTooltipContent, setUseMouseWheel, setVisible, startEdit, widgetDisabled
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, adjustSize, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, childVisibilityChanged, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, insertChild, invalidateLayout, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, paintWidget, positionChanged, reapplyTheme, removeAllChildren, removeChild, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, sizeChanged, updateTintAnimation, updateTooltip, validateLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueAdjusterInt

public ValueAdjusterInt()

ValueAdjusterInt

public ValueAdjusterInt(IntegerModel model)
Method Detail

getMaxValue

public int getMaxValue()

getMinValue

public int getMinValue()

setMinMaxValue

public void setMinMaxValue(int minValue,
                           int maxValue)

getValue

public int getValue()

setValue

public void setValue(int value)

getModel

public IntegerModel getModel()

setModel

public void setModel(IntegerModel model)

onEditStart

protected java.lang.String onEditStart()
Specified by:
onEditStart in class ValueAdjuster

onEditEnd

protected boolean onEditEnd(java.lang.String text)
Specified by:
onEditEnd in class ValueAdjuster

validateEdit

protected java.lang.String validateEdit(java.lang.String text)
Specified by:
validateEdit in class ValueAdjuster

onEditCanceled

protected void onEditCanceled()
Specified by:
onEditCanceled in class ValueAdjuster

shouldStartEdit

protected boolean shouldStartEdit(char ch)
Specified by:
shouldStartEdit in class ValueAdjuster

onDragStart

protected void onDragStart()
Specified by:
onDragStart in class ValueAdjuster

onDragUpdate

protected void onDragUpdate(int dragDelta)
Specified by:
onDragUpdate in class ValueAdjuster

onDragCancelled

protected void onDragCancelled()
Specified by:
onDragCancelled in class ValueAdjuster

doDecrement

protected void doDecrement()
Specified by:
doDecrement in class ValueAdjuster

doIncrement

protected void doIncrement()
Specified by:
doIncrement in class ValueAdjuster

formatText

protected java.lang.String formatText()
Specified by:
formatText in class ValueAdjuster

syncWithModel

protected void syncWithModel()
Specified by:
syncWithModel in class ValueAdjuster

afterAddToGUI

protected void afterAddToGUI(GUI gui)
Description copied from class: Widget
Called after this widget has been added to a GUI tree.

Overrides:
afterAddToGUI in class ValueAdjuster
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

beforeRemoveFromGUI

protected void beforeRemoveFromGUI(GUI gui)
Description copied from class: Widget
Called when this widget is removed from the GUI tree. After this call getGUI() will return null.

Overrides:
beforeRemoveFromGUI in class ValueAdjuster
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

removeModelCallback

protected void removeModelCallback()

addModelCallback

protected void addModelCallback()