class org.aswing.JStepper extends Component

A component that combine a input text and two arrow button to let user change a number value step by step.

@author paling

Class Fields

static function DEFAULT_VALUE_PARSER(:String): Int

The default parser parse a int value from the string, if NaN, 0 will be returned.

static function DEFAULT_VALUE_TRANSLATOR(:Int): String

The default translator translate a int value to a integer string representation.

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from Component

var __fieldBindings__:FieldsBindSignal
var __methodBindings__:MethodsBindSignal
var alignmentX:Float
var alignmentY:Float
var background:ASColor
var backgroundDecorator:GroundDecorator
var border:Border
var bounds:IntRectangle
var clipBounds:IntRectangle
var constraints:Dynamic
var currentSize:IntDimension
var dragEnabled:Bool
var dropTrigger:Bool
var enabled:Bool
var focusable:Bool
var focusableSet:Bool
var font:ASFont
var foreground:ASColor
var foregroundDecorator:GroundDecorator
var location:IntPoint
var maximumSize:IntDimension
var mideground:ASColor
var minimumSize:IntDimension
var opaque:Bool
var opaqueSet:Bool
var preferredSize:IntDimension
var resizerMargin:Insets
var styleProxy:Component
var styleTune:StyleTune
var toolTipText:String
var transitFocusFactor:Float
var ui:ComponentUI
var uiElement:Bool
var visibility:Bool
function addDragAcceptableInitiator(com:Component):Void
function componentToGlobal(p:IntPoint):IntPoint
function getClientProperty(key:String, ?defaultValue:Dynamic):Dynamic
function getDefaultBasicUIClass():Class<Dynamic>
function getFocusManager():FocusManager
function getGlobalLocation(?rv:IntPoint):IntPoint
function getInsets():Insets
function getInternalFocusObject():InteractiveObject
function getKeyboardManager():KeyboardManager
function getMousePosition():IntPoint
function getPaintBounds():IntRectangle
function getParent():Container
function getRootPaneAncestor():JRootPane
function getUIClassID():String
function globalToComponent(p:IntPoint):IntPoint
function hitTestMouse():Bool
function invalidate():Void
function invalidatePreferSizeCaches():Void
function isCachePreferSizes():Bool
function isDragAcceptableInitiator(com:Component):Bool
function isFocusOwner():Bool
function isFontValidated():Bool
function isOnStage():Bool
function isShowing():Bool
function isValid():Bool
function isValidateRoot():Bool
function makeFocus():Void
function pack():Void
function paintFocusRect(?force:Bool):Void
function paintImmediately():Void
function parentReAppendChildren():Void
function putClientProperty(key:String, value:Dynamic):Void
function reAppendToParent(?constraints:Dynamic):Void
function removeDragAcceptableInitiator(com:Component):Void
function removeFromContainer():Void
function repaint():Void
function repaintAndRevalidate():Void
function requestFocus():Bool
function revalidate():Void
function setCachePreferSizes(b:Bool):Void
function setClipSize(size:IntDimension):Void
function setDragAcceptableInitiatorAppraiser(func:Dynamic ->Bool):Void
function setFontValidated(b:Bool):Void
function setGlobalLocation(gp:IntPoint):Void
function transferFocus():Bool
function transferFocusBackward():Bool
function updateUI():Void
function validate():Void

Inherited from AWSprite

function bringToBottom(child:DisplayObject):Void
function bringToTop(child:DisplayObject):Void
function containsChild(child:DisplayObject):Bool
function getHighestIndexUnderForeground():Int
function getLowestIndexAboveBackground():Int
function isClipMasked():Bool
function setChildIndex(child:DisplayObject, index:Int):Void
function setClipMaskRect(b:IntRectangle):Void
function setClipMasked(m:Bool):Void
function toString():String

Inherited from Sprite

var buttonMode:Bool
var dropTarget:DisplayObject
var graphics:Graphics
var hitArea:Sprite
var soundTransform:SoundTransform
var useHandCursor:Bool
function startDrag(?lockCenter:Bool, ?bounds:Rectangle):Void
function startTouchDrag(touchPointID:Int, ?lockCenter:Bool, ?bounds:Rectangle):Void
function stopDrag():Void
function stopTouchDrag(touchPointID:Int):Void

Inherited from DisplayObjectContainer

var mouseChildren:Bool
var numChildren:Int
var tabChildren:Bool
var textSnapshot:TextSnapshot
function addChild(child:DisplayObject):DisplayObject
function addChildAt(child:DisplayObject, index:Int):DisplayObject
function areInaccessibleObjectsUnderPoint(point:Point):Bool
function contains(child:DisplayObject):Bool
function getChildAt(index:Int):DisplayObject
function getChildByName(name:String):DisplayObject
function getChildIndex(child:DisplayObject):Int
function getObjectsUnderPoint(point:Point):Array<DisplayObject>
function removeChild(child:DisplayObject):DisplayObject
function removeChildAt(index:Int):DisplayObject
function setChildIndex(child:DisplayObject, index:Int):Void
function swapChildren(child1:DisplayObject, child2:DisplayObject):Void
function swapChildrenAt(index1:Int, index2:Int):Void

Inherited from InteractiveObject

var accessibilityImplementation:AccessibilityImplementation
var contextMenu:ContextMenu
var doubleClickEnabled:Bool
var focusRect:Dynamic
var mouseEnabled:Bool
var tabEnabled:Bool
var tabIndex:Int

Inherited from DisplayObject

var accessibilityProperties:AccessibilityProperties
var alpha:Float
var blendMode:BlendMode
var blendShader:Shader
var cacheAsBitmap:Bool
var filters:Array<BitmapFilter>
var height:Float
var loaderInfo:LoaderInfo
var mask:DisplayObject
var mouseX:Float
var mouseY:Float
var name:String
var opaqueBackground:Null<UInt>
var parent:DisplayObjectContainer
var root:DisplayObject
var rotation:Float
var rotationX:Float
var rotationY:Float
var rotationZ:Float
var scale9Grid:Rectangle
var scaleX:Float
var scaleY:Float
var scaleZ:Float
var scrollRect:Rectangle
var stage:Stage
var transform:Transform
var visible:Bool
var width:Float
var x:Float
var y:Float
var z:Float
function getBounds(targetCoordinateSpace:DisplayObject):Rectangle
function getRect(targetCoordinateSpace:DisplayObject):Rectangle
function globalToLocal(point:Point):Point
function globalToLocal3D(point:Point):Vector3D
function hitTestObject(obj:DisplayObject):Bool
function hitTestPoint(x:Float, y:Float, ?shapeFlag:Bool):Bool
function local3DToGlobal(point3d:Vector3D):Point
function localToGlobal(point:Point):Point

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

var columns:Int

The number of columns for the input text.

var editable:Bool

Whether the stepper is editable to adjust, both the input text and pop-up slider.

var maxChars:Int

The max number of chars for the text field

var model:BoundedRangeModel

The model that handles the slider's four fundamental properties: minimum, maximum, value, extent.

function new(?columns:Int = 3): Void

Creates a stepper with the specified columns input text. Defalut model is a instance of DefaultBoundedRangeModel @see org.aswing.DefaultBoundedRangeModel

columns

(optional)the number of columns to use to calculate the input text preferred width

function addActionListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void

Adds a action listener to this stepper. Adjuster fire a AWEvent.ACT event when user finished a adjusting.

 * @param listener the listener
 * @param priority the priority
 * @param useWeakReference Determines whether the reference to the listener is strong or weak.
 * @see org.aswing.event.AWEvent#ACT

function addStateListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void

Adds a listener to listen the stepper's state change event. @see org.aswing.event.InteractiveEvent#STATE_CHANGED

listener

the listener

priority

the priority

useWeakReference

Determines whether the reference to the listener is strong or weak.

function getExtent(): Int

Returns the "extent" -- the range of values "covered" by the knob. @see #setExtent() @see BoundedRangeModel#getExtent()

returns

an int representing the extent

function getMaximum(): Int

Returns the maximum value supported by the slider. @see #setMaximum() @see BoundedRangeModel#getMaximum()

returns

the maximum value supported by the slider

function getMinimum(): Int

Returns the minimum value supported by the slider (usually zero). @see #setMinimum() @see BoundedRangeModel#getMinimum()

returns

the minimum value supported by the slider

function getValue(): Int

Returns the slider's value. @see #setValue() @see BoundedRangeModel#getValue()

returns

the slider's value property.

function getValueIsAdjusting(): Bool

True if the slider knob is being dragged.

returns

the value of the model's valueIsAdjusting property

function removeActionListener(listener:Dynamic ->Void): Void

Removes a action listener. @see org.aswing.event.AWEvent#ACT

listener

the listener to be removed.

function removeStateListener(listener:Dynamic ->Void): Void

Removes a state listener. @see org.aswing.event.InteractiveEvent#STATE_CHANGED

listener

the listener to be removed.

function setExtent(extent:Int): Void

Sets the size of the range "covered" by the knob. Most look and feel implementations will change the value by this amount if the user clicks on either side of the knob.

@see #getExtent() @see BoundedRangeModel#setExtent()

function setMaximum(maximum:Int): Void

Sets the model's maximum property. @see #getMaximum() @see BoundedRangeModel#setMaximum()

maximum

the maximum to set.

function setMinimum(minimum:Int): Void

Sets the model's minimum property. @see #getMinimum() @see BoundedRangeModel#setMinimum()

minimum

the minimum to set.

function setValue(value:Int, ?programmatic:Bool = true): Void

Sets the slider's value. This method just forwards the value to the model. @see #getValue() @see BoundedRangeModel#setValue()

value

the value to set.

function setValueIsAdjusting(b:Bool): Void

Sets the model's valueIsAdjusting property. Slider look and feel implementations should set this property to true when a knob drag begins, and to false when the drag ends. The slider model will not generate ChangeEvents while valueIsAdjusting is true. @see BoundedRangeModel#setValueIsAdjusting()

function setValues(newValue:Int, newExtent:Int, newMin:Int, newMax:Int): Void

Sets the four BoundedRangeModel properties after forcing the arguments to obey the usual constraints: "minimum le value le value+extent le maximum" ("le" means less or equals)

function valueParser(:String): Int

A function(String):int to parse the value from the string in the input text.

Generally, if you changed parser, you should change a right valueTranslator to suit it.

function valueTranslator(:Int): String

A function(int):String to translator the value to the string representation in the input text.

Generally, if you changed translator, you should change a right valueParser to suit it.