Module wicket.bootstrap.core
Class LabelBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
de.agilecoders.wicket.core.markup.html.bootstrap.block.LabelBehavior
- All Implemented Interfaces:
Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,IClusterable
#### Description
A Label is a highlighted text with rounded corners. The
LabelType
defines the color of a labels background. The tag name of a label must be `span`.
documentation: http://getbootstrap.com/components/#labels
#### Usage
```java
// use constructor to set type:
component.add(new LabelBehavior(LabelType.Success));
// use setter to set type:
component.add(new LabelBehavior()
.setType(LabelType.Success));
```
```html
<span wicket:id="componentId">content</span>
```- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct.LabelBehavior(LabelType type) Construct.LabelBehavior(IModel<LabelType> type) Construct. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected Stringfinal LabelTypegetType()voidonComponentTag(Component component, ComponentTag tag) final LabelBehaviorsets the label typevoidMethods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag, renderHead
-
Constructor Details
-
LabelBehavior
public LabelBehavior()Construct. -
LabelBehavior
Construct.- Parameters:
type- The type of the label
-
LabelBehavior
Construct.- Parameters:
type- The type of the label as model
-
-
Method Details
-
onComponentTag
- Overrides:
onComponentTagin classBehavior
-
getType
- Returns:
- current label type
-
setType
sets the label type- Parameters:
type- the label type- Returns:
- this instance
-
className
- Returns:
- the css class name as string
-
bind
-
unbind
-