|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.gui.display.AbstractDisplayStateHandler
net.sf.doolin.gui.display.ConditionalJEXLDisplayStateHandler
public class ConditionalJEXLDisplayStateHandler
Handler that evaluates a condition on a property of the context.
| Constructor Summary | |
|---|---|
ConditionalJEXLDisplayStateHandler()
|
|
| Method Summary | |
|---|---|
String |
getCondition()
|
DisplayState |
getDisplayState(ActionContext actionContext)
Gets the current DisplayState for the given action context |
DisplayState |
getIfFalseState()
Gets the if false state. |
DisplayState |
getIfTrueState()
Gets the if true state. |
String |
getPropertyPath()
Gets the property path. |
void |
setCondition(String condition)
Sets the JEXL condition, where 'model' is set for the context data |
void |
setIfFalseState(DisplayState ifFalseState)
Display state to return when condition is evaluated to false |
void |
setIfTrueState(DisplayState ifTrueState)
Display state to return when condition is evaluated to true |
void |
setPropertyPath(String propertyPath)
Sets the path to the property in the context. |
void |
subscribe(ActionContext actionContext,
Runnable task)
Subscribes a task that is executed each time this display state handler changes its state. |
| Methods inherited from class net.sf.doolin.gui.display.AbstractDisplayStateHandler |
|---|
connect, connect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConditionalJEXLDisplayStateHandler()
| Method Detail |
|---|
public String getCondition()
public DisplayState getDisplayState(ActionContext actionContext)
DisplayStateHandlerDisplayState for the given action context
actionContext - Action context.
public DisplayState getIfFalseState()
public DisplayState getIfTrueState()
public String getPropertyPath()
public void setCondition(String condition)
condition - JEXL expressionpublic void setIfFalseState(DisplayState ifFalseState)
false
ifFalseState - Display state to return when condition is evaluated to truepublic void setIfTrueState(DisplayState ifTrueState)
true
ifTrueState - Display state to return when condition is evaluated to truepublic void setPropertyPath(String propertyPath)
propertyPath - the new property path
public void subscribe(ActionContext actionContext,
Runnable task)
DisplayStateHandler
actionContext - Action context for this display state handlertask - Task to run each time the state change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||