Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.model
Class NodeListener

java.lang.Object
  extended by oracle.ide.model.NodeListener
Direct Known Subclasses:
QuickDiffReference.DefaultNodeListener, TextBufferTracker, UnauditableFileModelAdapter.UnauditableElement

public class NodeListener
extends java.lang.Object

Callback interface for Node events.


Constructor Summary
NodeListener()
           
 
Method Summary
static void invokeLaterIfNeeded(java.lang.Runnable runnable)
          If the current thread is the event dispatch thread, the runnable is executed immediately and synchronously.
 void nodeClosed(NodeEvent e)
          Called after a Node has been closed.
 void nodeDeleted(NodeEvent e)
          Called after a Node has been deleted from disk and removed from the NodeFactory cache.
 void nodeDirtyStateChanged(NodeEvent e, boolean isNowDirty)
          Called when the dirty state of a Node has just changed.
 void nodeOpened(NodeEvent e)
          Called after a Node has been opened.
 void nodeRenamed(NodeEvent e, java.net.URL oldURL, java.net.URL newURL)
          Called after a Node has been renamed and recached under the new URL in the NodeFactory.
 void nodeReverted(NodeEvent e)
          Called when a Node has been reverted (reloaded) to its last saved state.
 void nodeSaved(NodeEvent e)
          Called after a Node has been saved.
 void nodeWillBeSaved(NodeEvent e)
          Called before a Node is about to be saved.
 void nodeWillClose(NodeEvent e)
          Called when a Node is about to be closed.
 void nodeWillOpen(NodeEvent e)
          Called when a Node is about to be opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeListener

public NodeListener()
Method Detail

nodeOpened

public void nodeOpened(NodeEvent e)
Called after a Node has been opened.

Parameters:
e - the object containing information about this event

nodeDirtyStateChanged

public void nodeDirtyStateChanged(NodeEvent e,
                                  boolean isNowDirty)
Called when the dirty state of a Node has just changed.

Parameters:
e - the object containing information about this event
isNowDirty - true if the Node's dirty flag has just been set; false if the Node's dirty flag has just been cleared.

nodeWillOpen

public void nodeWillOpen(NodeEvent e)
Called when a Node is about to be opened.

Parameters:
e - the object containing information about this event

nodeWillClose

public void nodeWillClose(NodeEvent e)
Called when a Node is about to be closed.

Parameters:
e - the object containing information about this event

nodeClosed

public void nodeClosed(NodeEvent e)
Called after a Node has been closed.

Parameters:
e - the object containing information about this event

nodeWillBeSaved

public void nodeWillBeSaved(NodeEvent e)
Called before a Node is about to be saved.

Parameters:
e - the object containing information about this event

nodeSaved

public void nodeSaved(NodeEvent e)
Called after a Node has been saved.

Parameters:
e - the object containing information about this event

nodeReverted

public void nodeReverted(NodeEvent e)
Called when a Node has been reverted (reloaded) to its last saved state.

Parameters:
e - the object containing information about this event

nodeDeleted

public void nodeDeleted(NodeEvent e)
Called after a Node has been deleted from disk and removed from the NodeFactory cache.

Parameters:
e - the object containing information about this event

nodeRenamed

public void nodeRenamed(NodeEvent e,
                        java.net.URL oldURL,
                        java.net.URL newURL)
Called after a Node has been renamed and recached under the new URL in the NodeFactory.

Parameters:
e - the object containing information about this event. Calling e.getNode() will return the old Node. To get the new Node, call NodeFactory.find(newURL). Both old and new Nodes remain available while NodeListeners are being called with the nodeRenamed event. In the case where renaming did not cause the Node type to change, both old Node and new Node will be the exact same object, so using the oldURL parameter is the only reliable way to know the URL of the Node before it was renamed. If the Node type did change, the old Node is removed from the NodeFactory cache immediately after all NodeListeners have been called with the nodeRenamed event.
oldURL - the old URL of the Node before the rename
newURL - the new URL of the Node after the rename

invokeLaterIfNeeded

public static final void invokeLaterIfNeeded(java.lang.Runnable runnable)
If the current thread is the event dispatch thread, the runnable is executed immediately and synchronously. Otherwise, the runnable is posted to the event queue via invokeLater.

Parameters:
runnable - The code to run.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.