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

E13403-07

oracle.javatools.buffer
Class ForwardingTextBufferListener

java.lang.Object
  extended by oracle.javatools.buffer.ForwardingTextBufferListener
All Implemented Interfaces:
java.util.EventListener, TextBufferListener

public class ForwardingTextBufferListener
extends java.lang.Object
implements TextBufferListener

A support class to forward text buffer events for a decorating text buffer.

This class implements the weak listener semantics documented by the TextBuffer interface. However, it should be noted that those semantics essentially no longer apply for text buffers obtained from a an IDE TextNode because the text node keeps a duplicate list of listeners with strong references.


Field Summary
 
Fields inherited from interface oracle.javatools.buffer.TextBufferListener
EOL_TYPE_ATTRIBUTE, MODIFIED_ATTRIBUTE, READ_ONLY_ATTRIBUTE, RELOAD_END_ATTRIBUTE, RELOAD_START_ATTRIBUTE
 
Constructor Summary
ForwardingTextBufferListener(TextBuffer buffer)
           
 
Method Summary
 void addTextBufferListener(TextBufferListener listener)
           
 void attributeUpdate(TextBuffer buffer, int attribute)
          Provides notification regarding a change to one of the buffer attributes.
 void insertUpdate(TextBuffer buffer, int offset, int count, char[] insertedData)
          Provides notification about an insertion into the TextBuffer.
 void removeTextBufferListener(TextBufferListener listener)
           
 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForwardingTextBufferListener

public ForwardingTextBufferListener(TextBuffer buffer)
Method Detail

addTextBufferListener

public void addTextBufferListener(TextBufferListener listener)

removeTextBufferListener

public void removeTextBufferListener(TextBufferListener listener)

attributeUpdate

public void attributeUpdate(TextBuffer buffer,
                            int attribute)
Description copied from interface: TextBufferListener
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 - the TextBuffer that changed.
attribute - the attribute that changed

insertUpdate

public void insertUpdate(TextBuffer buffer,
                         int offset,
                         int count,
                         char[] insertedData)
Description copied from interface: TextBufferListener
Provides notification about an insertion into the TextBuffer.

Specified by:
insertUpdate in interface TextBufferListener
Parameters:
buffer - the TextBuffer that changed.
offset - the offset where the insert took place
count - the number of characters inserted (insertedData.length)
insertedData - an array of the removed characters.

removeUpdate

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

Specified by:
removeUpdate in interface TextBufferListener
Parameters:
buffer - the TextBuffer that changed.
offset - the offset of the first removed character.
count - the number of characters removed (removedData.length)
removedData - an array of the removed characters

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.