Extension SDK

oracle.ide.inspector
Class PropertySetCommand

java.lang.Object
  |
  +--oracle.ide.addin.AbstractCommand
        |
        +--oracle.ide.inspector.PropertySetCommand
All Implemented Interfaces:
Command

public class PropertySetCommand
extends AbstractCommand

The PropetySetCommand implements a property set, handling the undoing of the property set and sending out all relevant notifications.


Fields inherited from class oracle.ide.addin.AbstractCommand
cmdId, context, name, type
 
Fields inherited from interface oracle.ide.addin.Command
CANCEL, EXECUTING, NO_CHANGE, NO_UNDO, NORMAL, OK
 
Constructor Summary
PropertySetCommand(oracle.bali.inspector.multi.SelectionModel selection, java.lang.Object id, int col, java.lang.Object data)
          Constructor.
 
Method Summary
 int doit()
          Assign the new value to the object and send out proper notification.
 Document[] getAffectedDocuments()
          For commands of the NORMAL and NO_UNDO this method should return an array of documents affected by the execution of this command.
 java.lang.String getName()
          Gets the name of the command to display as the action to undo
 int undo()
          Restores the object to its previous state.
 
Methods inherited from class oracle.ide.addin.AbstractCommand
getContext, getData, getId, getType, setContext, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySetCommand

public PropertySetCommand(oracle.bali.inspector.multi.SelectionModel selection,
                          java.lang.Object id,
                          int col,
                          java.lang.Object data)
Constructor.
Parameters:
selection - SelectionModel of PropertyModel instances te be affected.
id - ID identifying the property row in which to set the data.
col - value identifying the property column in which to set the data.
data - the new value to apply.
Method Detail

doit

public int doit()
         throws java.lang.Exception
Assign the new value to the object and send out proper notification.

undo

public int undo()
         throws java.lang.Exception
Restores the object to its previous state.
Overrides:
undo in class AbstractCommand

getAffectedDocuments

public Document[] getAffectedDocuments()
Description copied from interface: Command
For commands of the NORMAL and NO_UNDO this method should return an array of documents affected by the execution of this command. This array should not include the primary document on which this command is operating, it should only include other documents affected as a side effect of executing this command. The affected documents undo stack will be flushed. The CommandProcessor uses the return value to clear the undo stack of the affected documents. Commands of type NO_CHANGE should return null.
Overrides:
getAffectedDocuments in class AbstractCommand
Following copied from interface: oracle.ide.addin.Command
Returns:
the documents affected by this command, otherwise, null.

getName

public java.lang.String getName()
Description copied from class: AbstractCommand
Gets the name of the command to display as the action to undo
Overrides:
getName in class AbstractCommand

Extension SDK