net.sf.doolin.gui.display
Class MultiDisplayStateHandler

java.lang.Object
  extended by net.sf.doolin.gui.display.AbstractDisplayStateHandler
      extended by net.sf.doolin.gui.display.MultiDisplayStateHandler
All Implemented Interfaces:
DisplayStateHandler
Direct Known Subclasses:
AndDisplayStateHandler, OrDisplayStateHandler

public abstract class MultiDisplayStateHandler
extends AbstractDisplayStateHandler

Display state handler that operates an operation between several handlers.

Author:
Damien Coraboeuf

Constructor Summary
MultiDisplayStateHandler()
          Default constructor
MultiDisplayStateHandler(DisplayStateHandler... handlers)
          Constructor from an array
MultiDisplayStateHandler(List<DisplayStateHandler> handlers)
          Constructor from a list.
 
Method Summary
 List<DisplayStateHandler> getHandlers()
          Gets the handlers.
 void setDisplayStateHandler(DisplayStateHandler handler)
          Utility method to add one DisplayStateHandler to the list.
 void setHandlers(List<DisplayStateHandler> handlers)
          Sets the handlers.
 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
 
Methods inherited from interface net.sf.doolin.gui.display.DisplayStateHandler
getDisplayState
 

Constructor Detail

MultiDisplayStateHandler

public MultiDisplayStateHandler()
Default constructor


MultiDisplayStateHandler

public MultiDisplayStateHandler(DisplayStateHandler... handlers)
Constructor from an array

Parameters:
handlers - Array of handlers

MultiDisplayStateHandler

public MultiDisplayStateHandler(List<DisplayStateHandler> handlers)
Constructor from a list.

Parameters:
handlers - List of handlers
Method Detail

getHandlers

public List<DisplayStateHandler> getHandlers()
Gets the handlers.

Returns:
the handlers

setDisplayStateHandler

public void setDisplayStateHandler(DisplayStateHandler handler)
Utility method to add one DisplayStateHandler to the list.

Parameters:
handler - DisplayStateHandler to add

setHandlers

public void setHandlers(List<DisplayStateHandler> handlers)
Sets the handlers.

Parameters:
handlers - the new handlers

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.