Module wicket.bootstrap.core
Class ButtonBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior
de.agilecoders.wicket.core.markup.html.bootstrap.button.ButtonBehavior
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,IClusterable
Default button behavior that controls the size and type
of a button.
- Author:
- miha
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct.ButtonBehavior(Buttons.Size size) Construct.ButtonBehavior(Buttons.Type type) Construct.ButtonBehavior(Buttons.Type type, Buttons.Size size) Construct.ButtonBehavior(IModel<Buttons.Type> buttonType, IModel<Buttons.Size> buttonSize) Construct. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetSize()getType()voidonComponentTag(Component component, ComponentTag tag) final ButtonBehaviorsetSize(Buttons.Size size) sets the size of buttonfinal ButtonBehaviorsetType(Buttons.Type type) sets the type of buttonMethods inherited from class de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior
addTo, getBootstrapSettings, instance, removeFrom, renderHead, renderHeadMethods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, bind, canCallListener, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, unbind
-
Constructor Details
-
ButtonBehavior
public ButtonBehavior()Construct. UsesButtons.Size.MediumandButtons.Type.Secondary. -
ButtonBehavior
Construct. UsesButtons.Type.Secondary.- Parameters:
size- Size of button
-
ButtonBehavior
Construct. UsesButtons.Size.Medium.- Parameters:
type- Type of button
-
ButtonBehavior
Construct.- Parameters:
type- Type of buttonsize- Size of button
-
ButtonBehavior
Construct.- Parameters:
buttonType- Type of buttonbuttonSize- Size of button
-
-
Method Details
-
getSize
- Returns:
- size of button
-
getType
- Returns:
- type of button
-
setType
sets the type of button- Parameters:
type- type to use- Returns:
- this instance for chaining
-
setSize
sets the size of button- Parameters:
size- size to use- Returns:
- this instance for chaining
-
onComponentTag
- Overrides:
onComponentTagin classBehavior
-
detach
-