net.sf.doolin.gui.display
Class ValidationDisplayStateHandler

java.lang.Object
  extended by net.sf.doolin.gui.display.AbstractDisplayStateHandler
      extended by net.sf.doolin.gui.display.ValidationDisplayStateHandler
All Implemented Interfaces:
DisplayStateHandler

public class ValidationDisplayStateHandler
extends AbstractDisplayStateHandler

Display state handler based on the validation status of a GUI model.

Author:
Damien Coraboeuf
See Also:
ActionContext.getView(), GUIView.getViewData(), ActionContext.getValidationSupport(), ValidationSupport.getValidation()

Constructor Summary
ValidationDisplayStateHandler()
           
 
Method Summary
 DisplayState getDisplayState(ActionContext actionContext)
          Gets the current DisplayState for the given action context
 DisplayState getNotValidState()
          Gets the not valid state.
 void setNotValidState(DisplayState notValidState)
          State when the validation is not valid
 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

ValidationDisplayStateHandler

public ValidationDisplayStateHandler()
Method Detail

getNotValidState

public DisplayState getNotValidState()
Gets the not valid state.

Returns:
the not valid state

setNotValidState

public void setNotValidState(DisplayState notValidState)
State when the validation is not valid

Parameters:
notValidState - the new not valid state

getDisplayState

public DisplayState getDisplayState(ActionContext actionContext)
Description copied from interface: DisplayStateHandler
Gets the current DisplayState for the given action context

Parameters:
actionContext - Action context.
Returns:
Display state

subscribe

public void subscribe(ActionContext actionContext,
                      Runnable task)
Description copied from interface: DisplayStateHandler
Subscribes a task that is executed each time this display state handler changes its state.

Parameters:
actionContext - Action context for this display state handler
task - Task to run each time the state change


Copyright © 2011. All Rights Reserved.