com.tensegrity.graph.rule.handler
Interface VisualNodeDropHandler


public interface VisualNodeDropHandler

This class is a functional handler that is optionally invoked by the API as a callback when a node is dropped onto a visualsubgraph. Visualsubgraphs often like to customize their behavior when a node is dropped onto them.

Version:
$Id: VisualNodeDropHandler.java,v 1.11 2004/07/21 16:00:56 sr Exp $
Author:
StepanRutz

Method Summary
 boolean nodeDrop(VisualNodeDropInfo info)
          Callback that is invoked when a node-drop occurs.
 boolean showGroupDropHighlight(VisualNodeGroupDropHighlightInfo info)
          Callback that is invoked when a highlight for a group-drop is about to be shown.
 

Method Detail

nodeDrop

public boolean nodeDrop(VisualNodeDropInfo info)
                 throws GraphException
Callback that is invoked when a node-drop occurs. Please note that the callback is invoked after the visualnode was added to the visualsubgraph that has been assigned the handler.

Parameters:
info - an object that carries the information needed to handle the node drop
Returns:
true if you want to reject the drop. In this case the API will position the node in its original position automatically. false should be returned to indicate that a manipulation was made in the callback implementation and that the API should not make further adjustments.
Throws:
GraphException - thrown by the callback to indicate that the API should rollback the operation if possible. This behavior cannot be guaranteed unfortunately.

showGroupDropHighlight

public boolean showGroupDropHighlight(VisualNodeGroupDropHighlightInfo info)
Callback that is invoked when a highlight for a group-drop is about to be shown. This method is invoked and allows the client to customize whether a highlight shall appear or not. Returning false from this method indicates that the API should suppress a group-drop highlight.

Parameters:
info - an object that carries the information needed to decide whether to show a group-drop-highlight or not.
Returns:
true if you want to display the highlight, otherwise false>


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