com.tensegrity.gui.graphdocument
Class ModifiedVisualGraphAdapter

java.lang.Object
  extended bycom.tensegrity.gui.graphdocument.ModifiedVisualGraphAdapter
All Implemented Interfaces:
AttributableOnSetListener, BaseCompositeListener, CompositeGroupListener, CompositeLineListener, CompositeListener, CompositeViewListener, EventListenerTag, EventMediatorListener, ModifiedVisualGraphListener, VisualGraphListener

public abstract class ModifiedVisualGraphAdapter
extends java.lang.Object
implements ModifiedVisualGraphListener

An Adapter to track changes of a visualgraph. This methods delegates all change-relevant events to the modified(Object) method, where the event is passed as well. To use this class simply extend it and implement the modified(Object).

Version:
$Id: ModifiedVisualGraphAdapter.java,v 1.13 2006/04/13 10:10:58 MichaelKegel Exp $
Author:
Stepan Rutz, Gilles Iachelini

Constructor Summary
ModifiedVisualGraphAdapter()
          Empty default constructor for ModifiedVisualGraphAdapter.
 
Method Summary
 void attributesChanged(AttributableOnSetEvent attributableonsetevent)
          Invoked when an attribute in an AttributableOnSet object has changed.
 void compositeChanged(ChangedEvent event)
          This method is called whenever a Composite has been changed but for the change is no specialized callback defined.
 void compositeChanged(LineChangedEvent event)
          This method is called whenever a CompositeLine has been changed but for the change is no specialized callback defined.
 void compositeManipulating(LineManipulationEvent event)
           This method is called while a CompositeLine is being manipulated.
 void compositeMoving(LineMoveEvent event)
           This method is called while a CompositeLine is being moved around.
 void compositeMoving(MoveEvent event)
           This method is called while a Composite is being moved around.
 void compositePostManipulating(LineManipulationEvent event)
          This method is called after a CompositeLine has been manipulated.
 void compositePostMoving(LineMoveEvent event)
          This method is called after a CompositeLine has been moved.
 void compositePostMoving(MoveEvent event)
          This method is called after a Composite has been moved.
 void compositePostResizing(ResizeEvent event)
          This method is called after a Composite has been resized.
 void compositePreManipulating(LineManipulationEvent event)
          This method is called before the manipulation of a CompositeLine starts.
 void compositePreMoving(LineMoveEvent event)
          This method is called before a CompositeLine is being moved around.
 void compositePreMoving(MoveEvent event)
          This method is called before a Composite is being moved around.
 void compositePreResizing(ResizeEvent event)
          This method is called before a Composite is about to be resized.
 void compositeResizing(ResizeEvent event)
           This method is called while a Composite is being resized.
 void groupAddedComposite(GroupAddCompositeEvent event)
          This method is called whenever a Composite has been added to a CompositeGroup.
 void groupAddedComposites(GroupAddCompositesEvent event)
          This method is called whenever a List of Composites has been added to a CompositeGroup.
 void groupCompositeOrderChanged(GroupCompositeOrderChangeEvent event)
          This method is called whenever the internal order of BaseComposite objects changes.
 void groupFoldStateChanged(GroupFoldStateChange event)
          This method is called whenever the state of folding of a CompositeGroup has been changed.
 void groupFoldStatePreChange(GroupFoldStateChange event)
          This method is called whenever the state of folding of a CompositeGroup is up to be changed.
 void groupRemovedComposite(GroupRemoveCompositeEvent event)
          This method is called whenever a Composite has been removed from a CompositeGroup.
 void groupRemovedComposites(GroupRemoveCompositesEvent event)
          This method is called whenever a List of Composites has been removed from a CompositeGroup.
 void groupSelectionChanged(GroupSelectionChangeEvent event)
          This method is called whenever the selection within the CompositeGroup has been changed.
 void groupSizeAdjusted(GroupSizeAdjustmentEvent event)
          This method is called whenever the size of a CompositeGroup has been changed by the CompositeGroup itself.
 void isolatedVisualEdgeAdded(VisualGraphEvent visualgraphevent)
          An isolated VisualEdge was added to the VisualGraph.
 void isolatedVisualEdgeRemoved(VisualGraphEvent visualgraphevent)
          An isolated VisualEdge was removed from the VisualGraph.
 void layout(VisualGraphEvent visualgraphevent)
          The structure of the VisualGraph has changed by an action on the graph, so that the current layout of the graph has to be applied.
abstract  void modified(java.lang.Object event)
          The drain for all events.
 void mouseClick(BCMouseEvent event)
          This method is called when a mouse button has been pressed and released upon a BaseComposite.
 void mouseDown(BCMouseEvent event)
          This methods is called when a mouse button has been pressed upon a BaseComposite.
 void mouseEnter(BCMouseEvent event)
          This method is called when the mouse enters the BaseComposite.
 void mouseExit(BCMouseEvent event)
          This method is called when the mouse exits the BaseComposite.
 void mouseUp(BCMouseEvent event)
          This methods is called when a mouse button has been pressed upon a BaseComposite and it will be released.
 void postSelect(BCSelectEvent event)
          This method is called whenever a Composite has been selected.
 void preSelect(BCSelectEvent event)
          This method is called before a Composite is being selected.
 void viewAddedComposite(ViewAddCompositeEvent event)
          Called whenever a Composite was added.
 void viewAddedComposites(ViewAddCompositesEvent event)
          Called whenever multiple Composites are added.
 void viewCompositeOrderChanged(ViewCompositeOrderChangeEvent event)
          Called whenever the internal order of BaseComposite objects changes.
 void viewModeChanged(ViewModeChangeEvent event)
          Called whenever the mode of the CompositeView changed.
 void viewParameterChanged(ViewParameterChangeEvent event)
          Called whenever a parameter of the view changed.
 void viewRemovedComposite(ViewRemoveCompositeEvent event)
          Called whenever a Composite was removed.
 void viewRemovedComposites(ViewRemoveCompositesEvent event)
          Called whenever multiple Composites were remmoved.
 void viewScrolled(ViewScrolledEvent event)
          Called if the view position is changed during an action.
 void viewSelectionChanged(ViewSelectionChangeEvent event)
          Called whenever the selection of the view changed.
 void visualEdgeAdded(VisualGraphEvent visualgraphevent)
          A VisualEdge was added to the VisualGraph.
 void visualEdgeAttachRejected(VisualGraphEvent visualgraphevent)
          An attachment of a VisualEdge was rejected by the graph.
 void visualEdgeRemoved(VisualGraphEvent visualgraphevent)
          A VisualEdge was removed from the VisualGraph.
 void visualEdgeSplit(VisualGraphEvent visualgraphevent)
          An edge-split was performed.
 void visualNodeAdded(VisualGraphEvent visualgraphevent)
          A VisualNode was added to the VisualGraph.
 void visualNodeDeleteEdgeCascade(VisualGraphEvent visualgraphevent)
          An edge-cascade was performed.
 void visualNodeRemoved(VisualGraphEvent visualgraphevent)
          A VisualNode was added to the VisualGraph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiedVisualGraphAdapter

public ModifiedVisualGraphAdapter()
Empty default constructor for ModifiedVisualGraphAdapter.

Method Detail

modified

public abstract void modified(java.lang.Object event)
The drain for all events. All methods of this class are calling the modified method to enable users to react on all different events in one single way.

Parameters:
event - the event sent out be the VisualGraph.

attributesChanged

public void attributesChanged(AttributableOnSetEvent attributableonsetevent)
Description copied from interface: AttributableOnSetListener
Invoked when an attribute in an AttributableOnSet object has changed.

Specified by:
attributesChanged in interface AttributableOnSetListener
Parameters:
attributableonsetevent - the event carrying information.

preSelect

public void preSelect(BCSelectEvent event)
Description copied from interface: BaseCompositeListener
This method is called before a Composite is being selected.

Specified by:
preSelect in interface BaseCompositeListener
Parameters:
event - the SelectEvent
See Also:
BCSelectEvent

postSelect

public void postSelect(BCSelectEvent event)
Description copied from interface: BaseCompositeListener
This method is called whenever a Composite has been selected.

Specified by:
postSelect in interface BaseCompositeListener
Parameters:
event - the SelectEvent
See Also:
BCSelectEvent

mouseEnter

public void mouseEnter(BCMouseEvent event)
Description copied from interface: BaseCompositeListener
This method is called when the mouse enters the BaseComposite. Enter means that the hotspot of the mouse cursor lies within the bounding box of the BaseComposite

Specified by:
mouseEnter in interface BaseCompositeListener
Parameters:
event - the BCMouseEvent

mouseExit

public void mouseExit(BCMouseEvent event)
Description copied from interface: BaseCompositeListener
This method is called when the mouse exits the BaseComposite. Exit means that the hotspot of the mouse cursor lies no longer within the bounding box of the BaseComposite

Specified by:
mouseExit in interface BaseCompositeListener
Parameters:
event - the BCMouseEvent

mouseDown

public void mouseDown(BCMouseEvent event)
Description copied from interface: BaseCompositeListener
This methods is called when a mouse button has been pressed upon a BaseComposite.

Specified by:
mouseDown in interface BaseCompositeListener
Parameters:
event - the BCMouseEvent

mouseUp

public void mouseUp(BCMouseEvent event)
Description copied from interface: BaseCompositeListener
This methods is called when a mouse button has been pressed upon a BaseComposite and it will be released.

Specified by:
mouseUp in interface BaseCompositeListener
Parameters:
event - the BCMouseEvent

mouseClick

public void mouseClick(BCMouseEvent event)
Description copied from interface: BaseCompositeListener
This method is called when a mouse button has been pressed and released upon a BaseComposite.

Specified by:
mouseClick in interface BaseCompositeListener
Parameters:
event - the BCMouseEvent

compositeChanged

public void compositeChanged(LineChangedEvent event)
Description copied from interface: CompositeLineListener
This method is called whenever a CompositeLine has been changed but for the change is no specialized callback defined.

Specified by:
compositeChanged in interface CompositeLineListener
Parameters:
event - the LineChangedEvent
See Also:
LineChangedEvent

compositePreManipulating

public void compositePreManipulating(LineManipulationEvent event)
Description copied from interface: CompositeLineListener
This method is called before the manipulation of a CompositeLine starts.

Specified by:
compositePreManipulating in interface CompositeLineListener
Parameters:
event - the LineManipulationEvent event instance
See Also:
LineManipulationEvent

compositeManipulating

public void compositeManipulating(LineManipulationEvent event)
Description copied from interface: CompositeLineListener

This method is called while a CompositeLine is being manipulated.

Notice that this method is only called while interaction with the CompositeLine is taking place and not when manipulate it by the interface methods.

Specified by:
compositeManipulating in interface CompositeLineListener
Parameters:
event - the LineManipulationEvent event instance
See Also:
LineManipulationEvent

compositePostManipulating

public void compositePostManipulating(LineManipulationEvent event)
Description copied from interface: CompositeLineListener
This method is called after a CompositeLine has been manipulated.

Specified by:
compositePostManipulating in interface CompositeLineListener
Parameters:
event - the LineManipulationEvent event instance
See Also:
LineManipulationEvent

compositePreMoving

public void compositePreMoving(LineMoveEvent event)
Description copied from interface: CompositeLineListener
This method is called before a CompositeLine is being moved around.

Specified by:
compositePreMoving in interface CompositeLineListener
Parameters:
event - the LineMoveEvent event instance
See Also:
LineMoveEvent

compositeMoving

public void compositeMoving(LineMoveEvent event)
Description copied from interface: CompositeLineListener

This method is called while a CompositeLine is being moved around.

Notice that this method is only called while interaction with the CompositeLine is taking place and not when moving it by the interface methods.

Specified by:
compositeMoving in interface CompositeLineListener
Parameters:
event - the LineMoveEvent event instance
See Also:
LineMoveEvent

compositePostMoving

public void compositePostMoving(LineMoveEvent event)
Description copied from interface: CompositeLineListener
This method is called after a CompositeLine has been moved.

Specified by:
compositePostMoving in interface CompositeLineListener
Parameters:
event - the LineMoveEvent event instance
See Also:
LineMoveEvent

compositeChanged

public void compositeChanged(ChangedEvent event)
Description copied from interface: CompositeListener
This method is called whenever a Composite has been changed but for the change is no specialized callback defined.

Specified by:
compositeChanged in interface CompositeListener
Parameters:
event - the ChangedEvent
See Also:
ChangedEvent

compositePreResizing

public void compositePreResizing(ResizeEvent event)
Description copied from interface: CompositeListener
This method is called before a Composite is about to be resized. Throwing a CompositeEventVetoException prevents resizement of the Composite completely.

Specified by:
compositePreResizing in interface CompositeListener
Parameters:
event - the ResizeEvent
See Also:
ResizeEvent

compositeResizing

public void compositeResizing(ResizeEvent event)
Description copied from interface: CompositeListener

This method is called while a Composite is being resized. Throwing a CompositeEventVetoException prevents resizement of the Composite to the actual size. For instance this can be used to avoid that the Composite is being resized to a size that is not acceptable.

Notice that this method is only called while interaction with the Composite is taking place and not when resize it by the interface methods.

Specified by:
compositeResizing in interface CompositeListener
Parameters:
event - the ResizeEvent
See Also:
ResizeEvent

compositePostResizing

public void compositePostResizing(ResizeEvent event)
Description copied from interface: CompositeListener
This method is called after a Composite has been resized.

Specified by:
compositePostResizing in interface CompositeListener
Parameters:
event - the ResizeEvent
See Also:
ResizeEvent

compositePreMoving

public void compositePreMoving(MoveEvent event)
Description copied from interface: CompositeListener
This method is called before a Composite is being moved around. Throwing a CompositeEventVetoException prevents movement of the Composite completely.

Specified by:
compositePreMoving in interface CompositeListener
Parameters:
event - the LineMoveEvent
See Also:
MoveEvent

compositeMoving

public void compositeMoving(MoveEvent event)
Description copied from interface: CompositeListener

This method is called while a Composite is being moved around. Throwing a CompositeEventVetoException prevents movement of the Composite to the actual position. For instance this can be used to avoid that the Composite is being moved to a location that is not acceptable.

Notice that this method is only called while interaction with the Composite is taking place and not when moving it by the interface methods.

Specified by:
compositeMoving in interface CompositeListener
Parameters:
event - the MoveEvent
See Also:
MoveEvent

compositePostMoving

public void compositePostMoving(MoveEvent event)
Description copied from interface: CompositeListener
This method is called after a Composite has been moved.

Specified by:
compositePostMoving in interface CompositeListener
Parameters:
event - the MoveEvent
See Also:
MoveEvent

groupAddedComposite

public void groupAddedComposite(GroupAddCompositeEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever a Composite has been added to a CompositeGroup. The GroupAddCompositeEvent given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupAddedComposite in interface CompositeGroupListener
Parameters:
event - the event that carries the information

groupRemovedComposite

public void groupRemovedComposite(GroupRemoveCompositeEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever a Composite has been removed from a CompositeGroup. The GroupRemoveCompositeEvent given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupRemovedComposite in interface CompositeGroupListener
Parameters:
event - the event that carries the information

groupAddedComposites

public void groupAddedComposites(GroupAddCompositesEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever a List of Composites has been added to a CompositeGroup. The GroupAddCompositesEvent given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupAddedComposites in interface CompositeGroupListener
Parameters:
event - the event that carries the information

groupRemovedComposites

public void groupRemovedComposites(GroupRemoveCompositesEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever a List of Composites has been removed from a CompositeGroup. The GroupRemoveCompositesEvent given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupRemovedComposites in interface CompositeGroupListener
Parameters:
event - the event that carries the information

groupSelectionChanged

public void groupSelectionChanged(GroupSelectionChangeEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever the selection within the CompositeGroup has been changed. The GroupSelectionChangeEvent given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupSelectionChanged in interface CompositeGroupListener
Parameters:
event - the event that carries the information

groupCompositeOrderChanged

public void groupCompositeOrderChanged(GroupCompositeOrderChangeEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever the internal order of BaseComposite objects changes.

Specified by:
groupCompositeOrderChanged in interface CompositeGroupListener
Parameters:
event - the corresponding GroupCompositeOrderChangeEvent event.

groupSizeAdjusted

public void groupSizeAdjusted(GroupSizeAdjustmentEvent event)
Description copied from interface: CompositeGroupListener
This method is called whenever the size of a CompositeGroup has been changed by the CompositeGroup itself.
This event is related to the size-adjustment functionality of the CompositeGroup.

Specified by:
groupSizeAdjusted in interface CompositeGroupListener
Parameters:
event - the event that carries the information.

groupFoldStatePreChange

public void groupFoldStatePreChange(GroupFoldStateChange event)
Description copied from interface: CompositeGroupListener
This method is called whenever the state of folding of a CompositeGroup is up to be changed.

Specified by:
groupFoldStatePreChange in interface CompositeGroupListener
Parameters:
event - the event that carries the information.

groupFoldStateChanged

public void groupFoldStateChanged(GroupFoldStateChange event)
Description copied from interface: CompositeGroupListener
This method is called whenever the state of folding of a CompositeGroup has been changed. The GroupFoldStateChange event given by event carries the information a CompositeGroupListener could be interested in.

Specified by:
groupFoldStateChanged in interface CompositeGroupListener
Parameters:
event - the event that carries the information.

viewAddedComposite

public void viewAddedComposite(ViewAddCompositeEvent event)
Description copied from interface: CompositeViewListener
Called whenever a Composite was added.

Specified by:
viewAddedComposite in interface CompositeViewListener
Parameters:
event - the corresponding event.

viewRemovedComposite

public void viewRemovedComposite(ViewRemoveCompositeEvent event)
Description copied from interface: CompositeViewListener
Called whenever a Composite was removed.

Specified by:
viewRemovedComposite in interface CompositeViewListener
Parameters:
event - the corresponding event.

viewAddedComposites

public void viewAddedComposites(ViewAddCompositesEvent event)
Description copied from interface: CompositeViewListener
Called whenever multiple Composites are added.

Specified by:
viewAddedComposites in interface CompositeViewListener
Parameters:
event - the corresponding event.

viewRemovedComposites

public void viewRemovedComposites(ViewRemoveCompositesEvent event)
Description copied from interface: CompositeViewListener
Called whenever multiple Composites were remmoved.

Specified by:
viewRemovedComposites in interface CompositeViewListener
Parameters:
event - the corresponding event.

viewSelectionChanged

public void viewSelectionChanged(ViewSelectionChangeEvent event)
Description copied from interface: CompositeViewListener
Called whenever the selection of the view changed.

Specified by:
viewSelectionChanged in interface CompositeViewListener
Parameters:
event - the corresponding ViewSelectionChangeEvent event.

viewCompositeOrderChanged

public void viewCompositeOrderChanged(ViewCompositeOrderChangeEvent event)
Description copied from interface: CompositeViewListener
Called whenever the internal order of BaseComposite objects changes.

Specified by:
viewCompositeOrderChanged in interface CompositeViewListener
Parameters:
event - the corresponding ViewCompositeOrderChangeEvent event.

viewParameterChanged

public void viewParameterChanged(ViewParameterChangeEvent event)
Description copied from interface: CompositeViewListener
Called whenever a parameter of the view changed.

Specified by:
viewParameterChanged in interface CompositeViewListener
Parameters:
event - the corresponding ViewParameterChangeEvent event.

viewScrolled

public void viewScrolled(ViewScrolledEvent event)
Description copied from interface: CompositeViewListener
Called if the view position is changed during an action.

Specified by:
viewScrolled in interface CompositeViewListener
Parameters:
event - the corresponding ViewScrollingEvent event.

viewModeChanged

public void viewModeChanged(ViewModeChangeEvent event)
Description copied from interface: CompositeViewListener
Called whenever the mode of the CompositeView changed.

Specified by:
viewModeChanged in interface CompositeViewListener
Parameters:
event - the corresponding ViewModeChangeEvent event.

visualNodeAdded

public void visualNodeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualNode was added to the VisualGraph.

Specified by:
visualNodeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualNodeRemoved

public void visualNodeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualNode was added to the VisualGraph.

Specified by:
visualNodeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeAdded

public void visualEdgeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualEdge was added to the VisualGraph.

Specified by:
visualEdgeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeRemoved

public void visualEdgeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
A VisualEdge was removed from the VisualGraph.

Specified by:
visualEdgeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

isolatedVisualEdgeAdded

public void isolatedVisualEdgeAdded(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An isolated VisualEdge was added to the VisualGraph.

Specified by:
isolatedVisualEdgeAdded in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

isolatedVisualEdgeRemoved

public void isolatedVisualEdgeRemoved(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An isolated VisualEdge was removed from the VisualGraph.

Specified by:
isolatedVisualEdgeRemoved in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeAttachRejected

public void visualEdgeAttachRejected(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An attachment of a VisualEdge was rejected by the graph. This event is thrown to indicate that an edge could not be added if the library chooses to do so in certain contexts. If it however not thrown in all cases when a VisualEdge cannot be added. If for example an already added VisualEdge is added, this event is not thrown.

Specified by:
visualEdgeAttachRejected in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualEdgeSplit

public void visualEdgeSplit(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An edge-split was performed.

Specified by:
visualEdgeSplit in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

visualNodeDeleteEdgeCascade

public void visualNodeDeleteEdgeCascade(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
An edge-cascade was performed.

Specified by:
visualNodeDeleteEdgeCascade in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.

layout

public void layout(VisualGraphEvent visualgraphevent)
Description copied from interface: VisualGraphListener
The structure of the VisualGraph has changed by an action on the graph, so that the current layout of the graph has to be applied. Note: programmatically changes like node insertion might not invoke this callback

Specified by:
layout in interface VisualGraphListener
Parameters:
visualgraphevent - the VisualGraphEvent structure that contains the event information.


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