com.esri.arcgis.systemUI
Class ControlsOperationStack

java.lang.Object
  extended by com.esri.arcgis.systemUI.ControlsOperationStack
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, IOperationStack, Serializable

public class ControlsOperationStack
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IOperationStack, ISupportErrorInfo

Use this class to provide operation support to the ToolbarControl.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
ControlsOperationStack()
          Constructs a ControlsOperationStack using ArcGIS Engine.
ControlsOperationStack(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ControlsOperationStack theControlsOperationStack = (ControlsOperationStack) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 void esri_do(IOperation operation)
          Performs the given operation and places it on the stack.
static String getClsid()
          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)
          interfaceSupportsErrorInfo
 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
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ControlsOperationStack

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

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

ControlsOperationStack

public ControlsOperationStack(Object obj)
                       throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ControlsOperationStack theControlsOperationStack = (ControlsOperationStack) obj;

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.

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

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getCount

public int getCount()
             throws IOException,
                    AutomationException
The number of operations on the stack.

Description

Returns the number of operations on the OperationStack.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getItem

public IOperation getItem(int index)
                   throws IOException,
                          AutomationException
The operation at the specified index.

Product Availability

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

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

reset

public void reset()
           throws IOException,
                  AutomationException
Removes all operations from the stack.

Description

This method removes all operations from the OperationStack.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

esri_do

public void esri_do(IOperation operation)
             throws IOException,
                    AutomationException
Performs the given operation and places it on the stack.

Product Availability

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

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

undo

public void undo()
          throws IOException,
                 AutomationException
Undoes the previous operation on the stack.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

redo

public void redo()
          throws IOException,
                 AutomationException
Redoes the next operation on the stack.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getUndoOperation

public IOperation getUndoOperation()
                            throws IOException,
                                   AutomationException
Undoes a specified operation.

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getRedoOperation

public IOperation getRedoOperation()
                            throws IOException,
                                   AutomationException
Redoes a specified operation.

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

remove

public void remove(int index)
            throws IOException,
                   AutomationException
Removes an operation from the stack.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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