Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.ceditor
Class NodeUpdater

java.lang.Object
  extended by oracle.ide.ceditor.NodeUpdater
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, TextBufferListener

public final class NodeUpdater
extends java.lang.Object
implements java.awt.event.ActionListener, TextBufferListener

The NodeUpdater class is a class which takes care of the delayed notification in the idle time after a text buffer change occurs. This updater is responsible for tracking the text buffer for changes, and sending a delayed notification.

This is paired with NodeObserver to work correctly.


Field Summary
 
Fields inherited from interface oracle.javatools.buffer.TextBufferListener
EOL_TYPE_ATTRIBUTE, MODIFIED_ATTRIBUTE, READ_ONLY_ATTRIBUTE, RELOAD_END_ATTRIBUTE, RELOAD_START_ATTRIBUTE
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          This is invoked when an action is performed.
 void attributeUpdate(TextBuffer buffer, int attribute)
          Provides notification regarding a change to one of the buffer attributes.
protected  void finalize()
          The finalizer is used to ensure that the observer will close at some point.
static NodeUpdater getUpdater(Subject nodeSubject, TextBuffer textBuffer)
          Fetches an updater for the given node - all cached updaters are stored on the list as WeakReferences so that they can be GC'd correcty.
 void insertUpdate(TextBuffer buffer, int offset, int count, char[] insertedData)
          Provides notification about an insertion into the TextBuffer.
 void removeUpdate(TextBuffer buffer, int offset, int count, char[] removedData)
          Provides notification about a removal from the TextBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getUpdater

public static NodeUpdater getUpdater(Subject nodeSubject,
                                     TextBuffer textBuffer)
Fetches an updater for the given node - all cached updaters are stored on the list as WeakReferences so that they can be GC'd correcty.


finalize

protected void finalize()
                 throws java.lang.Throwable
The finalizer is used to ensure that the observer will close at some point.

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
This is invoked when an action is performed. In this case, it should only be a Timer event.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - the action event

insertUpdate

public void insertUpdate(TextBuffer buffer,
                         int offset,
                         int count,
                         char[] insertedData)
Provides notification about an insertion into the TextBuffer.

Specified by:
insertUpdate in interface TextBufferListener
Parameters:
buffer -
offset - the offset where the insert took place
count - the number of characters inserted (insertedData.length)
insertedData - the contents of the insertion

removeUpdate

public void removeUpdate(TextBuffer buffer,
                         int offset,
                         int count,
                         char[] removedData)
Provides notification about a removal from the TextBuffer.

Specified by:
removeUpdate in interface TextBufferListener
Parameters:
buffer -
offset - the offset where the removal took place
count - the number of characters removed (removedData.length)
removedData - the contents of the removal

attributeUpdate

public void attributeUpdate(TextBuffer buffer,
                            int attribute)
Provides notification regarding a change to one of the buffer attributes. The possible attributes are defined in this interface.

Specified by:
attributeUpdate in interface TextBufferListener
Parameters:
buffer -
attribute - the attribute that changed

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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