org.knime.core.node.property.hilite
Class HiLiteManager

java.lang.Object
  extended by org.knime.core.node.property.hilite.HiLiteManager

public final class HiLiteManager
extends Object

A manager for hilite events between one source (from) HiLiteHandler and a number of target handlers (to). This class provides one source hilite handler instantiated within the constructor. The target hilite handlers can be added individually.

This class hosts two listeners one which is registered with the source handler and one which is registered with all target handlers. These listeners are called when something changes either on the source (from) or target side (to), and then invoke the corresponding handlers on the other side to hilite, unhilite, and clear hilite.

Author:
Thomas Gabriel, University of Konstanz

Constructor Summary
HiLiteManager()
          Creates a new manager.
 
Method Summary
 void addToHiLiteHandler(HiLiteHandler targetHandler)
          Adds a new target HiLiteHandler to the list of registered hilite handlers and adds the private target listener if the list of hilit keys is empty.
 HiLiteHandler getFromHiLiteHandler()
          The source hilite handler.
 Set<HiLiteHandler> getToHiLiteHandlers()
          An unmodifiable set of target hilite handlers.
 void removeAllToHiliteHandlers()
          Removes all target hilite handlers from this translator.
 void removeToHiLiteHandler(HiLiteHandler targetHandler)
          Removes the given target HiLiteHandler from the list of registered hilite handlers and removes the private target listener from if the list of hilit keys is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiLiteManager

public HiLiteManager()
Creates a new manager.

Method Detail

removeToHiLiteHandler

public void removeToHiLiteHandler(HiLiteHandler targetHandler)
Removes the given target HiLiteHandler from the list of registered hilite handlers and removes the private target listener from if the list of hilit keys is empty.

Parameters:
targetHandler - the target hilite handler to remove

addToHiLiteHandler

public void addToHiLiteHandler(HiLiteHandler targetHandler)
Adds a new target HiLiteHandler to the list of registered hilite handlers and adds the private target listener if the list of hilit keys is empty.

Parameters:
targetHandler - the target hilite handler to add

getToHiLiteHandlers

public Set<HiLiteHandler> getToHiLiteHandlers()
An unmodifiable set of target hilite handlers.

Returns:
the set of target hilite handlers

removeAllToHiliteHandlers

public void removeAllToHiliteHandlers()
Removes all target hilite handlers from this translator. To be used from the node that instantiates this instance when a new connection is made.


getFromHiLiteHandler

public HiLiteHandler getFromHiLiteHandler()
The source hilite handler.

Returns:
source hilite handler


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.