net.sf.doolin.gui.display
Class ConditionalStateAdapter

java.lang.Object
  extended by net.sf.doolin.gui.display.AbstractStateAdapter<Object>
      extended by net.sf.doolin.gui.display.ConditionalStateAdapter
All Implemented Interfaces:
StateAdapter<Object>, Adapter<Object,DisplayState>

public class ConditionalStateAdapter
extends AbstractStateAdapter<Object>

State adapter based on a condition

Author:
Damien Coraboeuf

Constructor Summary
ConditionalStateAdapter()
           
 
Method Summary
 DisplayState convertSubjectToTarget(Object subjectValue)
          Conversion from the subject to the target
 DisplayState getIfFalseState()
          Gets the if false state.
 DisplayState getIfTrueState()
          Gets the if true state.
 Object getOperand()
          Gets the operand.
 ConditionalOperator getOperator()
          Gets the operator.
 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 setOperator(ConditionalOperator operator)
          Sets the operator to use.
 
Methods inherited from class net.sf.doolin.gui.display.AbstractStateAdapter
convertTargetToSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalStateAdapter

public ConditionalStateAdapter()
Method Detail

convertSubjectToTarget

public DisplayState convertSubjectToTarget(Object subjectValue)
Description copied from interface: Adapter
Conversion from the subject to the target

Parameters:
subjectValue - Subject value
Returns:
Target value

getIfFalseState

public DisplayState getIfFalseState()
Gets the if false state.

Returns:
the if false state

getIfTrueState

public DisplayState getIfTrueState()
Gets the if true state.

Returns:
the if true state

getOperand

public Object getOperand()
Gets the operand.

Returns:
the operand

getOperator

public ConditionalOperator getOperator()
Gets the operator.

Returns:
the operator

setIfFalseState

public void setIfFalseState(DisplayState ifFalseState)
Display state to return when condition is evaluated to false

Parameters:
ifFalseState - Display state to return when condition is evaluated to true

setIfTrueState

public void setIfTrueState(DisplayState ifTrueState)
Display state to return when condition is evaluated to true

Parameters:
ifTrueState - Display state to return when condition is evaluated to true

setOperand

public void setOperand(Object operand)
Sets the operand for the operator.

Parameters:
operand - the new operand

setOperator

public void setOperator(ConditionalOperator operator)
Sets the operator to use.

Parameters:
operator - the new operator


Copyright © 2011. All Rights Reserved.