|
||||||||||
| 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.ConditionalDisplayStateHandler
public class ConditionalDisplayStateHandler
Handler that evaluates a condition on a property of the context.
| Constructor Summary | |
|---|---|
ConditionalDisplayStateHandler()
|
|
| Method Summary | |
|---|---|
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. |
Object |
getOperand()
Gets the operand. |
String |
getOperandPath()
Gets the path to the property that contains the operand. |
String |
getOperandValue()
Gets the operand value as a String. |
ConditionalOperator |
getOperator()
Gets the operator. |
protected Object |
getOtherValue(Object data)
Gets the value for the operand. |
String |
getPropertyPath()
Gets the property path. |
boolean |
isReadOnly()
Returns if the target property is read-only |
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 |
setOperand(Object operand)
Sets the operand for the operator. |
void |
setOperandPath(String operandPath)
Sets the path to the property that contains the operand value |
void |
setOperandValue(String operandValue)
Sets the operand value as a String. |
void |
setOperator(ConditionalOperator operator)
Sets the operator to use. |
void |
setPropertyPath(String propertyPath)
Sets the path to the property in the context. |
void |
setReadOnly(boolean readOnly)
Sets if the target property is read-only |
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 ConditionalDisplayStateHandler()
| Method Detail |
|---|
public DisplayState getDisplayState(ActionContext actionContext)
DisplayStateHandlerDisplayState for the given action context
actionContext - Action context.
public DisplayState getIfFalseState()
public DisplayState getIfTrueState()
public Object getOperand()
public String getOperandPath()
public String getOperandValue()
String.
public ConditionalOperator getOperator()
public String getPropertyPath()
public boolean isReadOnly()
true if the target property is read-onlypublic 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 setOperand(Object operand)
operand - the new operandpublic void setOperandPath(String operandPath)
operandPath - Property pathpublic void setOperandValue(String operandValue)
String.
operandValue - Operand valuepublic void setOperator(ConditionalOperator operator)
operator - the new operatorpublic void setPropertyPath(String propertyPath)
propertyPath - the new property pathpublic void setReadOnly(boolean readOnly)
readOnly - true if the target property is read-only
public void subscribe(ActionContext actionContext,
Runnable task)
DisplayStateHandler
actionContext - Action context for this display state handlertask - Task to run each time the state changeprotected Object getOtherValue(Object data)
String
data - Bean to get the property from (if needed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||