Extension SDK 10.1.2

oracle.ide.inspector
Class PropertySetCommand

java.lang.Object
  extended byoracle.ide.addin.AbstractCommand
      extended byoracle.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.


Field Summary
 
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()
          Get the collection of any other Document instances that are affected by this Command.
 java.lang.String getName()
          Get the name of this Command for display in the Undo/Redo menu items.
 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.

Returns:
Completion status of the operation.
Throws:
java.lang.Exception - the Command failed to complete successfully.

undo

public int undo()
         throws java.lang.Exception
Restores the object to its previous state.

Specified by:
undo in interface Command
Overrides:
undo in class AbstractCommand
Returns:
Completion status of the operation.
Throws:
java.lang.Exception - the Command failed to undo successfully.

getAffectedDocuments

public Document[] getAffectedDocuments()
Get the collection of any other Document instances that are affected by this Command.

Specified by:
getAffectedDocuments in interface Command
Overrides:
getAffectedDocuments in class AbstractCommand
Returns:
An array of other affected Documents.

getName

public java.lang.String getName()
Get the name of this Command for display in the Undo/Redo menu items.

Specified by:
getName in interface Command
Overrides:
getName in class AbstractCommand
Returns:
The name of this Command.

Extension SDK

 

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