com.tensegrity.graph.event
Interface ClipboardListener

All Known Implementing Classes:
ElementConflictListener

public interface ClipboardListener

The listener interface for receiving events that are originating from a VisualGraphView.

Implementations of this class can be registered to instances of VisualGraphView for fine-grained control over the clipboard related operations. Adding the listener done by invoking VisualGraphView.addClipboardListener(ClipboardListener). Removing is done by invoking VisualGraphView.removeClipboardListener(ClipboardListener).

Version:
$Id: ClipboardListener.java,v 1.6 2006/05/18 13:53:25 MichaelKegel Exp $
Author:
Stepan Rutz
See Also:
VisualGraphView

Method Summary
 void copyBegin(ClipboardEvent clipboardevent)
          This method is invoked when a copy operation starts.
 void copyEnd(ClipboardEvent clipboardevent)
          This method is invoked when a copy operation has ended.
 void cutBegin(ClipboardEvent clipboardevent)
          This method is invoked when a cut operation starts.
 void cutEnd(ClipboardEvent clipboardevent)
          This method is invoked when a cut operation has ended.
 void pasteBegin(ClipboardEvent clipboardevent)
          This method is invoked when a paste operation starts.
 void pasteEnd(ClipboardEvent clipboardevent)
          This method is invoked when a paste operation has ended.
 void vetoableCopyOnMove(VisualGraphView visualgraphview, CompositeHierarchy hierarchySelection, VisualGraphObject originalVisualGraphObject, VisualGraphObject copiedVisualGraphObject)
          This method is invoked once per VisualGraphObject that is copied-on-move (e.g. copied when the control key is pressed).
 void vetoablePaste(VisualGraphView visualgraphview, VisualGraphObjectContainer visualgraphobjectcontainer, VisualGraphObject visualgraphobject, VisualGraphView origin)
          This method is invoked once per VisualGraphObject that is about to be pasted.
 

Method Detail

vetoableCopyOnMove

public void vetoableCopyOnMove(VisualGraphView visualgraphview,
                               CompositeHierarchy hierarchySelection,
                               VisualGraphObject originalVisualGraphObject,
                               VisualGraphObject copiedVisualGraphObject)
                        throws VisualGraphEventVetoException
This method is invoked once per VisualGraphObject that is copied-on-move (e.g. copied when the control key is pressed).

Implementors of this method have the option to veto the copy-on-move for specific items by throwing a VisualGraphEventVetoException.

When vetoing the copy-on-move action the node is omitted from the copy-on-move processing and remains at its original place. Also the veto'ed item is unselected.

Notice: changes to the selection state of the original VisualGraphObject or the copied VisualGraphObject have no effect except when the copy-on-move action is vetoed.

Parameters:
visualgraphview - the VisualGraphView in which the event occurs.
hierarchySelection - the hierarchy of selected VisualGraphObjects.
Notice: selected children of a selected VisualSubgraph} do not appear in the hierarchy.
originalVisualGraphObject - the VisualGraphObject that has been copied.
copiedVisualGraphObject - the copy of the original VisualGraphObject.
Throws:
VisualGraphEventVetoException - thrown by the implementor to indicate that the item should not be copied-on-move.

vetoablePaste

public void vetoablePaste(VisualGraphView visualgraphview,
                          VisualGraphObjectContainer visualgraphobjectcontainer,
                          VisualGraphObject visualgraphobject,
                          VisualGraphView origin)
                   throws VisualGraphEventVetoException
This method is invoked once per VisualGraphObject that is about to be pasted.

Implementors of this method have the option to veto the copy-on-move for specific items by throwing a VisualGraphEventVetoException.

Parameters:
visualgraphview - the VisualGraphView on which the event occurs.
visualgraphobjectcontainer - the VisualGraphObjectContainer that is the target for the pasted VisualGraphObject.
visualgraphobject - the VisualGraphObject that is to be pasted.
origin - the VisualGraphView where the subject VisualGraphObject is originating from. (may be null)
Throws:
VisualGraphEventVetoException - thrown by the implementor to indicate that the item should not be pasted.

cutBegin

public void cutBegin(ClipboardEvent clipboardevent)
This method is invoked when a cut operation starts. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent

cutEnd

public void cutEnd(ClipboardEvent clipboardevent)
This method is invoked when a cut operation has ended. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent

copyBegin

public void copyBegin(ClipboardEvent clipboardevent)
This method is invoked when a copy operation starts. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent

copyEnd

public void copyEnd(ClipboardEvent clipboardevent)
This method is invoked when a copy operation has ended. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent

pasteBegin

public void pasteBegin(ClipboardEvent clipboardevent)
This method is invoked when a paste operation starts. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent

pasteEnd

public void pasteEnd(ClipboardEvent clipboardevent)
This method is invoked when a paste operation has ended. The needed information are given by the ClipboardEvent.

Parameters:
clipboardevent - the ClipboardEvent instance that carries the needed information
See Also:
ClipboardEvent


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