java.lang.Object
de.agilecoders.wicket.core.util.Behaviors
#### Description
Helper class for
Behaviors-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean#### Description checks whether given behavior class was added to given component beforestatic boolean#### Descriptionstatic boolean#### Description removes given behavior from given component if it was added before #### Usage if behavior was added to component: ```java myComponent.add(myBehavior); // ...
-
Method Details
-
remove
#### Description removes given behavior from given component if it was added before #### Usage if behavior was added to component: ```java myComponent.add(myBehavior); // ... Behaviors.remove(myComponent, myBehavior); // = true ``` if behavior wasn't added to component before: ```java Behaviors.remove(myComponent, myBehavior); // = false ```- Parameters:
component- TheComponentto remove behavior fromcheckBehavior- TheBehaviorto remove- Throws:
IllegalArgumentException- if component is null
-
contains
#### Description checks whether given behavior was added to given component before #### Usage if behavior was added to component: ```java myComponent.add(myBehavior); // ... Behaviors.contains(myComponent, myBehavior); // = true ``` if behavior wasn't added to component before: ```java Behaviors.contains(myComponent, myBehavior); // = false ```- Parameters:
component- TheComponentto check if behavior was setcheckBehavior- TheBehaviorto check- Throws:
IllegalArgumentException- if component or behavior is null
-
contains
#### Description checks whether given behavior class was added to given component before #### Usage if behavior was added to component: ```java myComponent.add(myBehavior); // ... Behaviors.contains(myComponent, MyBehavior.class); // = true ``` if behavior wasn't added to component before: ```java Behaviors.contains(myComponent, MyBehavior.class); // = false ```- Parameters:
component- TheComponentto check if behavior was setcheckBehavior- TheBehaviorclass to check- Throws:
IllegalArgumentException- if component or behavior is null
-