com.esri.arcgis.framework
Class CommandBar

java.lang.Object
  extended by com.esri.arcgis.framework.CommandBar
All Implemented Interfaces:
ICommandBar, ICommandItem, IWindowPosition, com.esri.arcgis.interop.RemoteObjRef, java.io.Serializable

public class CommandBar
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, ICommandItem, ICommandBar, IWindowPosition

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

Description 'CommandBar object.' 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
 
Fields inherited from interface com.esri.arcgis.framework.ICommandItem
IID, IID423b7723_b858_11d1_947b_080009eebecb, xxDummy
 
Fields inherited from interface com.esri.arcgis.framework.ICommandBar
IID, IID32e9d003_b867_11d1_947b_080009eebecb, xxDummy
 
Fields inherited from interface com.esri.arcgis.framework.IWindowPosition
IID, IID88c995ae_64a7_43f5_bf12_88ac179b25a6, xxDummy
 
Constructor Summary
CommandBar(java.lang.Object obj)
          Construct a CommandBar using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 ICommandItem add(IUID cmdID, java.lang.Object index)
          Adds a new command to this commandbar.
 ICommandItem createMacroItem(java.lang.String name, java.lang.Object faceID, java.lang.String action, java.lang.Object index)
          Creates a new macro item on this commandbar at the specified position.
 ICommandBar createMenu(java.lang.String name, java.lang.Object index)
          Creates a new blank menu on this commandbar at the specified position.
 void delete()
          Removes this object from the commandbar.
 void dock(int dockFlags, ICommandBar referenceBar)
          Docks or undocks this commandbar.
 boolean equals(java.lang.Object o)
          Compare this object with another
 void execute()
          Causes the command to execute.
 ICommandItem find(java.lang.Object identifier, boolean noRecurse)
          Finds a command on this commandbar.
 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.
 ICommand getCommand()
          A reference to the internal command object.
 int getCount()
          The number of items contained within this commandbar.
 java.lang.Object getFaceID()
          The bitmap that is used as the icon on this command item.
 int getHeight()
          The height of the window.
 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.
 ICommandItem getItem(int index)
          The command item on this commandbar at the specified index.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 int getLeft()
          The distance between the internal left edge of the window and screen.
 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.
 int getState()
          The state of the window.
 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 getTop()
          The distance between the internal top edge of the window and screen.
 int getType()
          The type of this command item.
 int getWidth()
          The width of the window.
 int hashCode()
          the hashcode for this object
 boolean isBuiltIn()
          Indicates whether this command item is built-in or if it was implemented through VBA.
 boolean isGroup()
          Indicates if this command item begins a menu or toolbar group.
 boolean isVisible()
          Indicates if this commandbar is visible.
 void move(int left, int top, int width, int height)
          Moves and optionally resizes the windows in a single function.
 ICommandItem popup(int x, int y)
          Displays this commandbar as a popup menu at the specified location.
 void refresh()
          Causes the command to be redrawn.
 void release()
          Release a CommandBar.
 void reset()
          Restores this command item's properties to that of the original.
 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 setHeight(int height)
          The height of the window.
 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 setLeft(int left)
          The distance between the internal left edge of the window and screen.
 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 setState(int windowState)
          The state of the window.
 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 setTop(int top)
          The distance between the internal top edge of the window and screen.
 void setWidth(int width)
          The width of the window.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandBar

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

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

Throws:
java.io.IOException - if there are interop problems CommandBar theCommandBar = (CommandBar) 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 CommandBar.

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.

add

public ICommandItem add(IUID cmdID,
                        java.lang.Object index)
                 throws java.io.IOException,
                        AutomationException
Adds a new command to this commandbar.

Specified by:
add in interface ICommandBar
Parameters:
cmdID - A reference to a com.esri.arcgis.system.IUID (in)
index - A Variant (in, optional, pass null if not required)
Returns:
A reference to a com.esri.arcgis.framework.ICommandItem
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createMenu

public ICommandBar createMenu(java.lang.String name,
                              java.lang.Object index)
                       throws java.io.IOException,
                              AutomationException
Creates a new blank menu on this commandbar at the specified position.

Specified by:
createMenu in interface ICommandBar
Parameters:
name - The name (in)
index - A Variant (in, optional, pass null if not required)
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.

createMacroItem

public ICommandItem createMacroItem(java.lang.String name,
                                    java.lang.Object faceID,
                                    java.lang.String action,
                                    java.lang.Object index)
                             throws java.io.IOException,
                                    AutomationException
Creates a new macro item on this commandbar at the specified position.

Specified by:
createMacroItem in interface ICommandBar
Parameters:
name - The name (in)
faceID - A Variant (in, optional, pass null if not required)
action - The action (in, optional, pass null if not required)
index - A Variant (in, optional, pass null if not required)
Returns:
A reference to a com.esri.arcgis.framework.ICommandItem
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

public int getCount()
             throws java.io.IOException,
                    AutomationException
The number of items contained within this commandbar.

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

find

public ICommandItem find(java.lang.Object identifier,
                         boolean noRecurse)
                  throws java.io.IOException,
                         AutomationException
Finds a command on this commandbar.

Specified by:
find in interface ICommandBar
Parameters:
identifier - A Variant (in)
noRecurse - The noRecurse (in, optional, pass false if not required)
Returns:
A reference to a com.esri.arcgis.framework.ICommandItem
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

public ICommandItem getItem(int index)
                     throws java.io.IOException,
                            AutomationException
The command item on this commandbar at the specified index.

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

popup

public ICommandItem popup(int x,
                          int y)
                   throws java.io.IOException,
                          AutomationException
Displays this commandbar as a popup menu at the specified location.

Specified by:
popup in interface ICommandBar
Parameters:
x - The x (in, optional, pass 0 if not required)
y - The y (in, optional, pass 0 if not required)
Returns:
A reference to a com.esri.arcgis.framework.ICommandItem
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

dock

public void dock(int dockFlags,
                 ICommandBar referenceBar)
          throws java.io.IOException,
                 AutomationException
Docks or undocks this commandbar.

Specified by:
dock in interface ICommandBar
Parameters:
dockFlags - A com.esri.arcgis.framework.esriDockFlags constant (in)
referenceBar - A reference to a com.esri.arcgis.framework.ICommandBar (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isVisible

public boolean isVisible()
                  throws java.io.IOException,
                         AutomationException
Indicates if this commandbar is visible.

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

setLeft

public void setLeft(int left)
             throws java.io.IOException,
                    AutomationException
The distance between the internal left edge of the window and screen.

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

getLeft

public int getLeft()
            throws java.io.IOException,
                   AutomationException
The distance between the internal left edge of the window and screen.

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

setTop

public void setTop(int top)
            throws java.io.IOException,
                   AutomationException
The distance between the internal top edge of the window and screen.

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

getTop

public int getTop()
           throws java.io.IOException,
                  AutomationException
The distance between the internal top edge of the window and screen.

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

setWidth

public void setWidth(int width)
              throws java.io.IOException,
                     AutomationException
The width of the window.

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

getWidth

public int getWidth()
             throws java.io.IOException,
                    AutomationException
The width of the window.

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

setHeight

public void setHeight(int height)
               throws java.io.IOException,
                      AutomationException
The height of the window.

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

getHeight

public int getHeight()
              throws java.io.IOException,
                     AutomationException
The height of the window.

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

move

public void move(int left,
                 int top,
                 int width,
                 int height)
          throws java.io.IOException,
                 AutomationException
Moves and optionally resizes the windows in a single function.

Specified by:
move in interface IWindowPosition
Parameters:
left - The left (in)
top - The top (in)
width - The width (in, optional, pass 0 if not required)
height - The height (in, optional, pass 0 if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setState

public void setState(int windowState)
              throws java.io.IOException,
                     AutomationException
The state of the window.

Specified by:
setState in interface IWindowPosition
Parameters:
windowState - A com.esri.arcgis.framework.esriWindowState constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getState

public int getState()
             throws java.io.IOException,
                    AutomationException
The state of the window.

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