com.tensegrity.graph.rule.handler
Interface VisualNodeOverlayIndicationHandler


public interface VisualNodeOverlayIndicationHandler

The VisualNodeOverlayIndicationHandler class is a functional handler that is optionally invoked by the GraphAPI as a callback when a VisualNode is dropped onto another VisualNode.

An instance of the VisualNodeOverlayIndicationHandler is registered at an instance of the VisualNodeOverlayIndicationHandlerRegistry.

When a visualnode-overlay occurs while user interaction the handler is called by the GraphAPI. In this case he has to provide a Collection of indicators. These indicators must be an instance of Composite. The indicators have to have the correct size and the correct position. The attributes of the indicators are not configured by the GraphAPI.
The values of the attributes can be calculate by using the given VisualNodeOverlayIndicationInfo, which provides the necessary information.

For the VisualNodeOverlayIndicationHandler it is possible to decide whether the highlighting of a visualnode-overlay should recurse into VisualSubgraphs or not. This is because VisualSubgraphs often like to customize their behavior when a VisualNode is dropped onto them.

Version:
$Id: VisualNodeOverlayIndicationHandler.java,v 1.9 2005/04/04 07:22:54 MichaelKegel Exp $
Author:
StepanRutz
See Also:
VisualNodeOverlayIndicationInfo, VisualNodeOverlayIndicationHandlerRegistry

Method Summary
 boolean recurseIntoVisualSubgraphs()
          This method in invoked by the GraphAPI and allows the implementing class to control whether highlighting should recurse into VisualSubgraphs for this particular VisualNodeOverlayIndicationHandler.
 java.util.Collection visualNodeOverlay(VisualNodeOverlayIndicationInfo info)
           Callback that is invoked when a visualnode-overlay occurs.
 

Method Detail

visualNodeOverlay

public java.util.Collection visualNodeOverlay(VisualNodeOverlayIndicationInfo info)

Callback that is invoked when a visualnode-overlay occurs. The callback has to return a list of Composites that indicate the overlay.

The returned Collection can be null or empty, which indicates the GraphAPI that a highlighting should not be done.

The provided indicators are then automatically displayed in the view.

Parameters:
info - an instance of VisualNodeOverlayIndicationInfo parameter holder class.
Returns:
a collection of indicators

recurseIntoVisualSubgraphs

public boolean recurseIntoVisualSubgraphs()
This method in invoked by the GraphAPI and allows the implementing class to control whether highlighting should recurse into VisualSubgraphs for this particular VisualNodeOverlayIndicationHandler.

Returns:
true to indicate to caller that recursion into nested items is desired, otherwise false.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.