class org.aswing.JAdjuster extends Component
A component that combine a input text and a button to drop-down a popup slider to let user input/select a value.
Show Events | Hide Events
|
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
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 Also
The slider's value. It just forwards the value to the model.
See Also
- this.setValue()
- BoundedRangeModel.setValue()
function new(?columns:Int = 3, ?orientation:Int = 1): Void
Creates a adjuster with the specified columns input text and orientation
Defalut model is a instance of DefaultBoundedRangeModel
.
columns | (optional)the number of columns to use to calculate the input text preferred width |
orientation | (optional)the pop-up slider's orientation to either VERTICAL or HORIZONTAL. |
See Also
- org.aswing.DefaultIntegerBoundedRangeModel
function addActionListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void
Adds a action listener to this adjuster. Adjuster fire a AWEvent.ACT
event when user finished a adjusting.
listener | the listener |
priority | the priority |
useWeakReference | Determines whether the reference to the listener is strong or weak. |
See Also
- org.aswing.event.AWEvent.ACT
function addStateListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void
Adds a listener to listen the adjuster's state change event.
listener | the listener |
priority | the priority |
useWeakReference | Determines whether the reference to the listener is strong or weak. |
See Also
- org.aswing.event.InteractiveEvent.STATE_CHANGED
function getInputText(): JTextField
Returns the input text component, based on the LAF, the AdjusterUI should return the right text component to this.
returns | the input text component. |
See Also
- org.aswing.plaf.AdjusterUI
function getPopupSlider(): JSlider
Returns the pop-up slider component, based on the LAF, the AdjusterUI should return the right slider component to this.
returns | the input text component. |
See Also
- org.aswing.plaf.AdjusterUI
function removeActionListener(listener:Dynamic ->Void): Void
function removeStateListener(listener:Dynamic ->Void): Void
Removes a state listener.
listener | the listener to be removed. |
See Also
- org.aswing.event.InteractiveEvent.STATE_CHANGED
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.
See Also
- this.valueTranslator
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.
See Also
- this.valueParser