Class Spinner
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.wicketstuff.minis.behavior.spinner.Spinner
-
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,IClusterable
public class Spinner extends Behavior
This behavior is used to augment aTextFieldwith spinning abilities.
For customization of theSpinnertake a look at theconfigure(Properties)method.- Author:
- Gerolf Seitz
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Spinner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterRender(Component component)voidbeforeRender(Component component)voidbind(Component component)protected voidconfigure(Properties p)This method can be overridden to customize the Spinner.
The following options are used by the Spinner: interval The amount to increment (default=1) round The number of decimal points to which to round (default=0) min The lowest allowed value, false for no min (default=false) max The highest allowed value, false for no max (default=false) prefix String to prepend when updating (default='') suffix String to append when updating (default='') data An array giving a list of items through which to iterate onIncrement Function to call after incrementing onDecrement Function to call after decrementing afterUpdate Function to call after update of the value onStop Function to call on click or mouseup (default=false)protected ComponentgetSpinDownComponent()protected ComponentgetSpinUpComponent()voidrenderHead(Component c, IHeaderResponse response)-
Methods inherited from class org.apache.wicket.behavior.Behavior
canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind
-
-
-
-
Method Detail
-
beforeRender
public void beforeRender(Component component)
- Overrides:
beforeRenderin classBehavior
-
configure
protected void configure(Properties p)
This method can be overridden to customize the Spinner.
The following options are used by the Spinner:- interval The amount to increment (default=1)
- round The number of decimal points to which to round (default=0)
- min The lowest allowed value, false for no min (default=false)
- max The highest allowed value, false for no max (default=false)
- prefix String to prepend when updating (default='')
- suffix String to append when updating (default='')
- data An array giving a list of items through which to iterate
- onIncrement Function to call after incrementing
- onDecrement Function to call after decrementing
- afterUpdate Function to call after update of the value
- onStop Function to call on click or mouseup (default=false)
- Parameters:
p-
-
getSpinDownComponent
protected Component getSpinDownComponent()
- Returns:
- the component the is used to spin down.
-
getSpinUpComponent
protected Component getSpinUpComponent()
- Returns:
- the component that is used to spin up.
-
afterRender
public void afterRender(Component component)
- Overrides:
afterRenderin classBehavior
-
renderHead
public void renderHead(Component c, IHeaderResponse response)
- Specified by:
renderHeadin interfaceIComponentAwareHeaderContributor- Overrides:
renderHeadin classBehavior
-
-