com.esri.arcgis.framework
Class CommandItem

java.lang.Object
  extended by com.esri.arcgis.framework.CommandItem
All Implemented Interfaces:
ICommandItem, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, ISupportErrorInfo, java.io.Externalizable, java.io.Serializable

public class CommandItem
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, ICommandItem, IPersist, IPersistStream, ISupportErrorInfo, java.io.Externalizable

COM Class 'CommandItem'. Generated 3/19/2015 1:20:50 PM from 'C:\ArcGIS\COM\esriFramework.olb'

Description 'Command Item.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from interface com.esri.arcgis.framework.ICommandItem
IID, IID423b7723_b858_11d1_947b_080009eebecb, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IPersistStream
IID, IID00000109_0000_0000_c000_000000000046, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IPersist
IID0000010c_0000_0000_c000_000000000046
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
CommandItem(java.lang.Object obj)
          Construct a CommandItem using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void delete()
          Removes this object from the commandbar.
 boolean equals(java.lang.Object o)
          Compare this object with another
 void execute()
          Causes the command to execute.
 java.lang.String getAction()
          The name of the VBA macro this command should run when pressed.
 java.lang.String getCaption()
          The caption of this command item.
 java.lang.String getCategory()
          The name of the category with which this command item is associated.
 void getClassID(GUID[] pClassID)
          getClassID
 ICommand getCommand()
          A reference to the internal command object.
 java.lang.Object getFaceID()
          The bitmap that is used as the icon on this command item.
 int getHelpContextID()
          The help context ID associated with this command item.
 java.lang.String getHelpFile()
          The help file associated with this command item.
 IUID getID()
          The unique integer ID associated with this command item.
 int getIndex()
          The positional index of this command item within its menu or toolbar.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 java.lang.String getMessage()
          The status bar message for this command item.
 java.lang.String getName()
          The name of this command item.
 ICommandBar getParent()
          The menu or toolbar that this command item currently resides on.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int getStyle()
          The display style of this command item.
 java.lang.String getTag()
          The tag for this command item.
 java.lang.String getTooltip()
          The tooltip for this command item.
 int getType()
          The type of this command item.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isBuiltIn()
          Indicates whether this command item is built-in or if it was implemented through VBA.
 void isDirty()
          isDirty
 boolean isGroup()
          Indicates if this command item begins a menu or toolbar group.
 void load(IStream pstm)
          load
 void readExternal(java.io.ObjectInput in)
           
 void refresh()
          Causes the command to be redrawn.
 void release()
          Release a CommandItem.
 void reset()
          Restores this command item's properties to that of the original.
 void save(IStream pstm, int fClearDirty)
          save
 void setAction(java.lang.String macro)
          The name of the VBA macro this command should run when pressed.
 void setCaption(java.lang.String name)
          The caption of this command item.
 void setFaceID(java.lang.Object faceID)
          The bitmap that is used as the icon on this command item.
 void setGroup(boolean group)
          Indicates if this command item begins a menu or toolbar group.
 void setHelpContextID(int contextID)
          The help context ID associated with this command item.
 void setHelpFile(java.lang.String helpFile)
          The help file associated with this command item.
 void setMessage(java.lang.String message)
          The status bar message for this command item.
 void setName(java.lang.String name)
          The name of this command item.
 void setStyle(int style)
          The display style of this command item.
 void setTag(java.lang.String tag)
          The tag for this command item.
 void setTooltip(java.lang.String tooltip)
          The tooltip for this command item.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

CommandItem

public CommandItem(java.lang.Object obj)
            throws java.io.IOException
Construct a CommandItem using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to CommandItem.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
CommandItem o = (CommandItem)obj; // will not work

CommandItem o = new CommandItem(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
java.io.IOException - if there are interop problems CommandItem theCommandItem = (CommandItem) obj;
Method Detail

equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a CommandItem.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getAction

public java.lang.String getAction()
                           throws java.io.IOException,
                                  AutomationException
The name of the VBA macro this command should run when pressed.

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

setAction

public void setAction(java.lang.String macro)
               throws java.io.IOException,
                      AutomationException
The name of the VBA macro this command should run when pressed.

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

isBuiltIn

public boolean isBuiltIn()
                  throws java.io.IOException,
                         AutomationException
Indicates whether this command item is built-in or if it was implemented through VBA.

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

getCategory

public java.lang.String getCategory()
                             throws java.io.IOException,
                                    AutomationException
The name of the category with which this command item is associated.

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

getCommand

public ICommand getCommand()
                    throws java.io.IOException,
                           AutomationException
A reference to the internal command object.

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

delete

public void delete()
            throws java.io.IOException,
                   AutomationException
Removes this object from the commandbar.

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

setFaceID

public void setFaceID(java.lang.Object faceID)
               throws java.io.IOException,
                      AutomationException
The bitmap that is used as the icon on this command item.

Specified by:
setFaceID in interface ICommandItem
Parameters:
faceID - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFaceID

public java.lang.Object getFaceID()
                           throws java.io.IOException,
                                  AutomationException
The bitmap that is used as the icon on this command item.

Specified by:
getFaceID in interface ICommandItem
Returns:
A Variant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGroup

public void setGroup(boolean group)
              throws java.io.IOException,
                     AutomationException
Indicates if this command item begins a menu or toolbar group.

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

isGroup

public boolean isGroup()
                throws java.io.IOException,
                       AutomationException
Indicates if this command item begins a menu or toolbar group.

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

getHelpFile

public java.lang.String getHelpFile()
                             throws java.io.IOException,
                                    AutomationException
The help file associated with this command item.

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

setHelpFile

public void setHelpFile(java.lang.String helpFile)
                 throws java.io.IOException,
                        AutomationException
The help file associated with this command item.

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

getHelpContextID

public int getHelpContextID()
                     throws java.io.IOException,
                            AutomationException
The help context ID associated with this command item.

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

setHelpContextID

public void setHelpContextID(int contextID)
                      throws java.io.IOException,
                             AutomationException
The help context ID associated with this command item.

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

getID

public IUID getID()
           throws java.io.IOException,
                  AutomationException
The unique integer ID associated with this command item.

Specified by:
getID in interface ICommandItem
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIndex

public int getIndex()
             throws java.io.IOException,
                    AutomationException
The positional index of this command item within its menu or toolbar.

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

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
The name of this command item.

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

setName

public void setName(java.lang.String name)
             throws java.io.IOException,
                    AutomationException
The name of this command item.

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

setCaption

public void setCaption(java.lang.String name)
                throws java.io.IOException,
                       AutomationException
The caption of this command item.

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

getCaption

public java.lang.String getCaption()
                            throws java.io.IOException,
                                   AutomationException
The caption of this command item.

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

getParent

public ICommandBar getParent()
                      throws java.io.IOException,
                             AutomationException
The menu or toolbar that this command item currently resides on.

Specified by:
getParent in interface ICommandItem
Returns:
A reference to a com.esri.arcgis.framework.ICommandBar
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
Restores this command item's properties to that of the original.

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

getStyle

public int getStyle()
             throws java.io.IOException,
                    AutomationException
The display style of this command item.

Specified by:
getStyle in interface ICommandItem
Returns:
A com.esri.arcgis.systemUI.esriCommandStyles constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStyle

public void setStyle(int style)
              throws java.io.IOException,
                     AutomationException
The display style of this command item.

Specified by:
setStyle in interface ICommandItem
Parameters:
style - A com.esri.arcgis.systemUI.esriCommandStyles constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTag

public java.lang.String getTag()
                        throws java.io.IOException,
                               AutomationException
The tag for this command item.

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

setTag

public void setTag(java.lang.String tag)
            throws java.io.IOException,
                   AutomationException
The tag for this command item.

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

getTooltip

public java.lang.String getTooltip()
                            throws java.io.IOException,
                                   AutomationException
The tooltip for this command item.

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

setTooltip

public void setTooltip(java.lang.String tooltip)
                throws java.io.IOException,
                       AutomationException
The tooltip for this command item.

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

getType

public int getType()
            throws java.io.IOException,
                   AutomationException
The type of this command item.

Specified by:
getType in interface ICommandItem
Returns:
A com.esri.arcgis.framework.esriCommandTypes constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

public java.lang.String getMessage()
                            throws java.io.IOException,
                                   AutomationException
The status bar message for this command item.

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

setMessage

public void setMessage(java.lang.String message)
                throws java.io.IOException,
                       AutomationException
The status bar message for this command item.

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

execute

public void execute()
             throws java.io.IOException,
                    AutomationException
Causes the command to execute.

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

refresh

public void refresh()
             throws java.io.IOException,
                    AutomationException
Causes the command to be redrawn.

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

getClassID

public void getClassID(GUID[] pClassID)
                throws java.io.IOException,
                       AutomationException
getClassID

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
isDirty

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

load

public void load(IStream pstm)
          throws java.io.IOException,
                 AutomationException
load

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws java.io.IOException,
                 AutomationException
save

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws java.io.IOException,
                       AutomationException
getSizeMax

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

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

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException