org.netbeans.api.visual 2.21.1

org.netbeans.api.visual.model
Interface ObjectSceneListener


public interface ObjectSceneListener

This interface represents a listener that is notified about changes in a object scene which is passed as the first parameter of every listener methods.

Implementers of this interface should try and make the implemented methods as brief as possible. These methods are called in the same thread that is handing the corresponding action, and taking too much time in these methods will slow the UI update down.


Method Summary
 void focusChanged(ObjectSceneEvent event, Object previousFocusedObject, Object newFocusedObject)
          Called to notify that the object-focus is changed.
 void highlightingChanged(ObjectSceneEvent event, Set<Object> previousHighlighting, Set<Object> newHighlighting)
          Called to notify that the object-highlighting is changed.
 void hoverChanged(ObjectSceneEvent event, Object previousHoveredObject, Object newHoveredObject)
          Called to notify that the object-hovering is changed.
 void objectAdded(ObjectSceneEvent event, Object addedObject)
          Called to notify that an object was added to an object scene.
 void objectRemoved(ObjectSceneEvent event, Object removedObject)
          Called to notify that an object was removed from an object scene.
 void objectStateChanged(ObjectSceneEvent event, Object changedObject, ObjectState previousState, ObjectState newState)
          Called to notify that the object state of an object is changed.
 void selectionChanged(ObjectSceneEvent event, Set<Object> previousSelection, Set<Object> newSelection)
          Called to notify that the object-selection is changed.
 

Method Detail

objectAdded

void objectAdded(ObjectSceneEvent event,
                 Object addedObject)
Called to notify that an object was added to an object scene. This is called when an object-widget mapping is registered in an ObjectScene only. At the moment of the call, the object is still not reqistered in the Graph*Scene classes yet. Therefore do not use the methods of Graph*Scene.

Parameters:
event -
addedObject -

objectRemoved

void objectRemoved(ObjectSceneEvent event,
                   Object removedObject)
Called to notify that an object was removed from an object scene. This is called when an object-widget mapping is unregistered in an ObjectScene and Graph*Scene classes. At the moment of the call, a widget (visual representation of the object) is still in the scene. Therefore do not rely on a tree of widgets of the scene.

Parameters:
event - the object scene event
removedObject - the removed object

objectStateChanged

void objectStateChanged(ObjectSceneEvent event,
                        Object changedObject,
                        ObjectState previousState,
                        ObjectState newState)
Called to notify that the object state of an object is changed. This method is always called before any other ObjectSceneListener method is called.

Parameters:
event - the object scene event
changedObject - the object with changed object state
previousState - the previous object state
newState - the new object state

selectionChanged

void selectionChanged(ObjectSceneEvent event,
                      Set<Object> previousSelection,
                      Set<Object> newSelection)
Called to notify that the object-selection is changed.

Parameters:
event - the object scene event
previousSelection - the set of previously selected objects
newSelection - the set of newly selected objects

highlightingChanged

void highlightingChanged(ObjectSceneEvent event,
                         Set<Object> previousHighlighting,
                         Set<Object> newHighlighting)
Called to notify that the object-highlighting is changed.

Parameters:
event - the object scene event
previousHighlighting - the set of previously highlighted objects
newHighlighting - the set of newly highlighted objects

hoverChanged

void hoverChanged(ObjectSceneEvent event,
                  Object previousHoveredObject,
                  Object newHoveredObject)
Called to notify that the object-hovering is changed.

Parameters:
event - the object scene event
previousHoveredObject - the previous hovered object; null if there was no hovered object
newHoveredObject - the new hovered object; null if there is no hovered object

focusChanged

void focusChanged(ObjectSceneEvent event,
                  Object previousFocusedObject,
                  Object newFocusedObject)
Called to notify that the object-focus is changed.

Parameters:
event - the object scene event
previousFocusedObject - the previously focused object; null if there was no focused object
newFocusedObject - the newly focused object; null if there is no focused object

org.netbeans.api.visual 2.21.1

Built on December 28 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.