com.esri.arcgis.systemUI
Class ControlsOperationStack

java.lang.Object
  extended bycom.esri.arcgis.systemUI.ControlsOperationStack
All Implemented Interfaces:
IOperationStack, ISupportErrorInfo, java.io.Serializable

public class ControlsOperationStack
extends java.lang.Object
implements IOperationStack, ISupportErrorInfo

Use this class to provide operation support to the ToolbarControl.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Description

Outside the context of ArcGIS applications such as ArcMap, you can add undo and redo capability by using the ControlsOperationStack class. Usually, you cocreate this class in conjunction with the ToolbarControl and add undo and redo buttons which manipulate the OperationStack via IOperationStack.

See Also:
Serialized Form

Constructor Summary
ControlsOperationStack()
          Constructs a ControlsOperationStack using ArcGIS Engine.
ControlsOperationStack(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
 void esri_do(IOperation operation)
          Performs the given operation and places it on the stack.
 IOperationStack getAsIOperationStack()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ISupportErrorInfo getAsISupportErrorInfo()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 int getCount()
          The number of operations on the stack.
 IOperation getItem(int index)
          The operation at the specified index.
 IOperation getRedoOperation()
          Redoes a specified operation.
 IOperation getUndoOperation()
          Undoes a specified operation.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 void redo()
          Redoes the next operation on the stack.
 void remove(int index)
          Removes an operation from the stack.
 void reset()
          Removes all operations from the stack.
 void undo()
          Undoes the previous operation on the stack.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlsOperationStack

public ControlsOperationStack()
                       throws java.io.IOException,
                              java.net.UnknownHostException
Constructs a ControlsOperationStack using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

ControlsOperationStack

public ControlsOperationStack(java.lang.Object obj)
                       throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a ControlsOperationStack using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ControlsOperationStack.
ControlsOperationStack theControlsOperationStack = (ControlsOperationStack) obj;

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()

getAsIOperationStack

public IOperationStack getAsIOperationStack()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsISupportErrorInfo

public ISupportErrorInfo getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

public boolean equals(java.lang.Object o)
Compare this object with another


hashCode

public int hashCode()
the hashcode for this object


getCount

public int getCount()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IOperationStack
The number of operations on the stack.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the number of operations on the OperationStack.

Specified by:
getCount in interface IOperationStack
Returns:
The count
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

public IOperation getItem(int index)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IOperationStack
The operation at the specified index.

Supported Platforms

Windows, Solaris, Linux

Description

The Item property is used to access a specific operation on the OperationStack. The operation at the beginning or top of the collection has an index of 0 and the operation at the end of the collection has an index of IOperationStack::Count - 1. 

Specified by:
getItem in interface IOperationStack
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.systemUI.IOperation
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws java.io.IOException,
                  AutomationException
Description copied from interface: IOperationStack
Removes all operations from the stack.

Supported Platforms

Windows, Solaris, Linux

Description

This method removes all operations from the OperationStack.

Specified by:
reset in interface IOperationStack
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

esri_do

public void esri_do(IOperation operation)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IOperationStack
Performs the given operation and places it on the stack.

Specified by:
esri_do in interface IOperationStack
Parameters:
operation - A reference to a com.esri.arcgis.systemUI.IOperation (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

undo

public void undo()
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IOperationStack
Undoes the previous operation on the stack.

Supported Platforms

Windows, Solaris, Linux

Description

The Undo method performs the undo of the 'current' operation on the OperationStack and moves the 'current' operation pointer back one operation on the OperationStack.

Specified by:
undo in interface IOperationStack
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

redo

public void redo()
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IOperationStack
Redoes the next operation on the stack.

Supported Platforms

Windows, Solaris, Linux

Description

The Redo method performs the redo of the 'next' operation on the OperationStack and moves the 'current' operation pointer forward one operation on the OperationStack.

Specified by:
redo in interface IOperationStack
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getUndoOperation

public IOperation getUndoOperation()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IOperationStack
Undoes a specified operation.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the 'current' operation on the OperationStack, without executing an undo.

Specified by:
getUndoOperation in interface IOperationStack
Returns:
A reference to a com.esri.arcgis.systemUI.IOperation
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getRedoOperation

public IOperation getRedoOperation()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IOperationStack
Redoes a specified operation.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the 'next' operation on the OperationStack, without executing an redo.

Specified by:
getRedoOperation in interface IOperationStack
Returns:
A reference to a com.esri.arcgis.systemUI.IOperation
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

remove

public void remove(int index)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IOperationStack
Removes an operation from the stack.

Supported Platforms

Windows, Solaris, Linux

Description

Removes the operation at the specified index from the OperationStack. The operation at the beginning of the collection has an index of 0 and the operation at the end of the collection has an index of IOperationStack::Count - 1. 

Specified by:
remove in interface IOperationStack
Parameters:
index - The index (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: ISupportErrorInfo

Supported Platforms

Windows, Solaris, Linux

Description

Indicates whether the interface supports IErrorInfo.

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.