net.sf.doolin.gui.display
Class NotDisplayStateHandler

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

public class NotDisplayStateHandler
extends AbstractDisplayStateHandler

Inverts the display state given by another display state handler.

Author:
Damien Coraboeuf

Constructor Summary
NotDisplayStateHandler(DisplayStateHandler handler)
          Constructor.
NotDisplayStateHandler(DisplayStateHandler handler, DisplayState notEnabledState)
          Constructor.
 
Method Summary
 DisplayState getDisplayState(ActionContext actionContext)
          Gets the current DisplayState for the given action 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

NotDisplayStateHandler

public NotDisplayStateHandler(DisplayStateHandler handler)
Constructor.

Parameters:
handler - Handler to negate

NotDisplayStateHandler

public NotDisplayStateHandler(DisplayStateHandler handler,
                              DisplayState notEnabledState)
Constructor.

Parameters:
handler - Handler to negate
notEnabledState - State when not enabled
Method Detail

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.