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

E13403-04

oracle.jdeveloper.audit.transform
Class TextBufferCommand

java.lang.Object
  extended by oracle.ide.controller.Command
      extended by oracle.jdeveloper.audit.transform.TextBufferCommand

public class TextBufferCommand
extends Command

An Ide command which transforms a text buffer.


Field Summary
 
Fields inherited from class oracle.ide.controller.Command
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type
 
Constructor Summary
TextBufferCommand(java.lang.String name, TextBuffer buffer)
          Creates a text transform command.
 
Method Summary
 int doit()
          Executes the actions associated with a specific command.
 void insert(int offset, char[] text)
          Inserts text into the buffer.
 void insert(int offset, java.lang.String text)
          Inserts text into the buffer.
 void remove(int offset, int length)
          Removes text from the buffer.
 int undo()
          Called by the CommandProcessor to undo a command.
 
Methods inherited from class oracle.ide.controller.Command
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextBufferCommand

public TextBufferCommand(java.lang.String name,
                         TextBuffer buffer)
Creates a text transform command.

Parameters:
name - The name of the command.
buffer - The buffer to be transformed by this command.
Method Detail

insert

public void insert(int offset,
                   char[] text)
Inserts text into the buffer.

Parameters:
offset - The character offset before which to insert.
text - The text to insert.

insert

public void insert(int offset,
                   java.lang.String text)
Inserts text into the buffer.

Parameters:
offset - The character offset before which to insert.
text - The text to insert.

remove

public void remove(int offset,
                   int length)
Removes text from the buffer.

Parameters:
offset - The character offset before the first character to remove.
length - The number of characters to remove.

doit

public int doit()
         throws java.lang.Exception
Description copied from class: Command
Executes the actions associated with a specific command. When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.

Specified by:
doit in class Command
Throws:
java.lang.Exception

undo

public int undo()
         throws java.lang.Exception
Description copied from class: Command
Called by the CommandProcessor to undo a command. Does nothing in this implemenation. Commands that can be undone should provide the behavior here to undo whatever actions were carried out when the doit method was called When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.

Overrides:
undo in class Command
Throws:
java.lang.Exception

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

E13403-04

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