com.esri.arcgis.controls
Class ToolbarMenu

java.lang.Object
  extended by com.esri.arcgis.controls.ToolbarMenu
All Implemented Interfaces:
IToolbarMenu, IToolbarMenu2, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, java.io.Serializable

public class ToolbarMenu
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IToolbarMenu, IToolbarMenu2, ISupportErrorInfo

COM Class 'ToolbarMenu'. Generated 3/19/2015 1:20:47 PM from 'C:\ArcGIS\COM\esriControls.olb'

Description 'A menu containing commands that can be used from a ToolbarControl or as a popup menu.' 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.controls.IToolbarMenu2
IID, IIDb38cb2be_d09d_4c5e_9865_d8825d17ebbf, xxDummy
 
Fields inherited from interface com.esri.arcgis.controls.IToolbarMenu
IIDe8f2ab83_e93b_4529_82f6_34b8e4544b9e
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
ToolbarMenu()
          Constructs a ToolbarMenu using ArcGIS Engine.
ToolbarMenu(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ToolbarMenu theToolbarMenu = (ToolbarMenu) obj;
 
Method Summary
 int addItem(java.lang.Object item, int subType, int index, boolean beginGroup, int style)
          Adds an item to the ToolbarMenu.
 int addMultiItem(java.lang.Object multiItem, int index, boolean beginGroup, int style)
          Adds a multi-item to the ToolbarMenu.
 int addSubMenu(java.lang.Object menuOrPalette, int index, boolean beginGroup)
          Adds a sub-menu to the ToolbarMenu.
 boolean equals(java.lang.Object o)
          Compare this object with another
 int find(java.lang.Object item)
          Returns the index of the first item containing the given command or menu.
 int getBitmap()
          The bitmap that is used as the icon on this ToolbarMenu.
 java.lang.String getCaption()
          The caption used by the ToolbarMenu.
static java.lang.String getClsid()
          getClsid.
 ICommandPool getCommandPool()
          The CommandPool used by the ToolbarMenu.
 int getCount()
          The number of items on the ToolbarMenu.
 java.lang.Object getHook()
          The object that is passed as a hook to the OnCreate event of each item's command.
 int getIconSize()
          The size in pixels of icons displayed on the ToolbarMenu.
 IToolbarItem getItem(int index)
          Returns the item at the specified index from the ToolbarMenu.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 IMenuDef getMenuDef()
          Returns the menu definition, this method is obsolete.
 Picture getMouseIcon()
          Custom mouse icon used if MousePointer is 99.
 int getMousePointer()
          The mouse pointer displayed over the ToolbarMenu.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isAlignLeft()
          Indicates if the ToolbarMenu displays aligned to the left or right.
 boolean isCustomize()
          Indicates if the ToolbarMenu is in customize mode.
 boolean isThemedDrawing()
          Indicates if the ToolbarMenu uses themed drawing.
 void moveItem(int startIndex, int finalIndex)
          Moves an item from one index to another.
 void popupMenu(int x, int y, int hWndParent)
          Pops up the menu at the position specified.
 void release()
          Release a ToolbarMenu.
 void remove(int index)
          Removes the item at the specified index from the ToolbarMenu.
 void removeAll()
          Removes all items from the ToolbarMenu.
 void setAlignLeft(boolean pVal)
          Indicates if the ToolbarMenu displays aligned to the left or right.
 void setBitmap(int pVal)
          The bitmap that is used as the icon on this ToolbarMenu.
 void setCaption(java.lang.String pCaption)
          The caption used by the ToolbarMenu.
 void setCommandPoolByRef(ICommandPool ppCommandPool)
          The CommandPool used by the ToolbarMenu.
 void setCustomize(boolean newVal)
          Indicates if the ToolbarMenu is in customize mode.
 void setHook(java.lang.Object pHook)
          Sets the object that is passed as a hook to the OnCreate event of each item's command.
 void setIconSize(int pVal)
          The size in pixels of icons displayed on the ToolbarMenu.
 void setMouseIconByRef(Picture ppMouseIcon)
          Custom mouse icon used if MousePointer is 99.
 void setMousePointer(int pVal)
          The mouse pointer displayed over the ToolbarMenu.
 void setThemedDrawing(boolean pVal)
          Indicates if the ToolbarMenu uses themed drawing.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolbarMenu

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

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

ToolbarMenu

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

Construct a ToolbarMenu using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ToolbarMenu.

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()
getClsid.


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 ToolbarMenu.

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

popupMenu

public void popupMenu(int x,
                      int y,
                      int hWndParent)
               throws java.io.IOException,
                      AutomationException
Pops up the menu at the position specified.

Specified by:
popupMenu in interface IToolbarMenu
Parameters:
x - The x (in)
y - The y (in)
hWndParent - The hWndParent (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 pCaption)
                throws java.io.IOException,
                       AutomationException
The caption used by the ToolbarMenu.

Specified by:
setCaption in interface IToolbarMenu
Parameters:
pCaption - The pCaption (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 used by the ToolbarMenu.

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

setCommandPoolByRef

public void setCommandPoolByRef(ICommandPool ppCommandPool)
                         throws java.io.IOException,
                                AutomationException
The CommandPool used by the ToolbarMenu.

Specified by:
setCommandPoolByRef in interface IToolbarMenu
Parameters:
ppCommandPool - A reference to a com.esri.arcgis.controls.ICommandPool (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCommandPool

public ICommandPool getCommandPool()
                            throws java.io.IOException,
                                   AutomationException
The CommandPool used by the ToolbarMenu.

Specified by:
getCommandPool in interface IToolbarMenu
Returns:
A reference to a com.esri.arcgis.controls.ICommandPool
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHook

public void setHook(java.lang.Object pHook)
             throws java.io.IOException,
                    AutomationException
Sets the object that is passed as a hook to the OnCreate event of each item's command.

Specified by:
setHook in interface IToolbarMenu
Parameters:
pHook - A reference to another Automation Object (IDispatch) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHook

public java.lang.Object getHook()
                         throws java.io.IOException,
                                AutomationException
The object that is passed as a hook to the OnCreate event of each item's command.

Specified by:
getHook in interface IToolbarMenu
Returns:
A reference to another Automation Object (IDispatch)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBitmap

public int getBitmap()
              throws java.io.IOException,
                     AutomationException
The bitmap that is used as the icon on this ToolbarMenu.

Specified by:
getBitmap in interface IToolbarMenu
Returns:
The pVal (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBitmap

public void setBitmap(int pVal)
               throws java.io.IOException,
                      AutomationException
The bitmap that is used as the icon on this ToolbarMenu.

Specified by:
setBitmap in interface IToolbarMenu
Parameters:
pVal - The pVal (A COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMenuDef

public IMenuDef getMenuDef()
                    throws java.io.IOException,
                           AutomationException
Returns the menu definition, this method is obsolete.

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

addItem

public int addItem(java.lang.Object item,
                   int subType,
                   int index,
                   boolean beginGroup,
                   int style)
            throws java.io.IOException,
                   AutomationException
Adds an item to the ToolbarMenu.

Specified by:
addItem in interface IToolbarMenu
Parameters:
item - A Variant (in)
subType - The subType (in, optional, pass 0 if not required)
index - The index (in, optional, pass -1 if not required)
beginGroup - The beginGroup (in, optional, pass false if not required)
style - A com.esri.arcgis.systemUI.esriCommandStyles constant (in, optional, pass 2 if not required)
Returns:
The itemIndex
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSubMenu

public int addSubMenu(java.lang.Object menuOrPalette,
                      int index,
                      boolean beginGroup)
               throws java.io.IOException,
                      AutomationException
Adds a sub-menu to the ToolbarMenu.

Specified by:
addSubMenu in interface IToolbarMenu
Parameters:
menuOrPalette - A Variant (in)
index - The index (in, optional, pass -1 if not required)
beginGroup - The beginGroup (in, optional, pass false if not required)
Returns:
The itemIndex
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

public void remove(int index)
            throws java.io.IOException,
                   AutomationException
Removes the item at the specified index from the ToolbarMenu.

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

removeAll

public void removeAll()
               throws java.io.IOException,
                      AutomationException
Removes all items from the ToolbarMenu.

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

getItem

public IToolbarItem getItem(int index)
                     throws java.io.IOException,
                            AutomationException
Returns the item at the specified index from the ToolbarMenu.

Specified by:
getItem in interface IToolbarMenu
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IToolbarItem
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 on the ToolbarMenu.

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

find

public int find(java.lang.Object item)
         throws java.io.IOException,
                AutomationException
Returns the index of the first item containing the given command or menu. Returns -1 if it is not found.

Specified by:
find in interface IToolbarMenu
Parameters:
item - A Variant (in)
Returns:
The pVal
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveItem

public void moveItem(int startIndex,
                     int finalIndex)
              throws java.io.IOException,
                     AutomationException
Moves an item from one index to another.

Specified by:
moveItem in interface IToolbarMenu
Parameters:
startIndex - The startIndex (in)
finalIndex - The finalIndex (in, optional, pass -1 if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMultiItem

public int addMultiItem(java.lang.Object multiItem,
                        int index,
                        boolean beginGroup,
                        int style)
                 throws java.io.IOException,
                        AutomationException
Adds a multi-item to the ToolbarMenu.

Specified by:
addMultiItem in interface IToolbarMenu2
Parameters:
multiItem - A Variant (in)
index - The index (in, optional, pass -1 if not required)
beginGroup - The beginGroup (in, optional, pass false if not required)
style - A com.esri.arcgis.systemUI.esriCommandStyles constant (in, optional, pass 2 if not required)
Returns:
The itemIndex
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomize

public void setCustomize(boolean newVal)
                  throws java.io.IOException,
                         AutomationException
Indicates if the ToolbarMenu is in customize mode.

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

isCustomize

public boolean isCustomize()
                    throws java.io.IOException,
                           AutomationException
Indicates if the ToolbarMenu is in customize mode.

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

isThemedDrawing

public boolean isThemedDrawing()
                        throws java.io.IOException,
                               AutomationException
Indicates if the ToolbarMenu uses themed drawing.

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

setThemedDrawing

public void setThemedDrawing(boolean pVal)
                      throws java.io.IOException,
                             AutomationException
Indicates if the ToolbarMenu uses themed drawing.

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

getMousePointer

public int getMousePointer()
                    throws java.io.IOException,
                           AutomationException
The mouse pointer displayed over the ToolbarMenu.

Specified by:
getMousePointer in interface IToolbarMenu2
Returns:
A com.esri.arcgis.controls.esriControlsMousePointer constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMousePointer

public void setMousePointer(int pVal)
                     throws java.io.IOException,
                            AutomationException
The mouse pointer displayed over the ToolbarMenu.

Specified by:
setMousePointer in interface IToolbarMenu2
Parameters:
pVal - A com.esri.arcgis.controls.esriControlsMousePointer constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIconSize

public int getIconSize()
                throws java.io.IOException,
                       AutomationException
The size in pixels of icons displayed on the ToolbarMenu.

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

setIconSize

public void setIconSize(int pVal)
                 throws java.io.IOException,
                        AutomationException
The size in pixels of icons displayed on the ToolbarMenu.

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

isAlignLeft

public boolean isAlignLeft()
                    throws java.io.IOException,
                           AutomationException
Indicates if the ToolbarMenu displays aligned to the left or right.

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

setAlignLeft

public void setAlignLeft(boolean pVal)
                  throws java.io.IOException,
                         AutomationException
Indicates if the ToolbarMenu displays aligned to the left or right.

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

setMouseIconByRef

public void setMouseIconByRef(Picture ppMouseIcon)
                       throws java.io.IOException,
                              AutomationException
Custom mouse icon used if MousePointer is 99.

Specified by:
setMouseIconByRef in interface IToolbarMenu2
Parameters:
ppMouseIcon - A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMouseIcon

public Picture getMouseIcon()
                     throws java.io.IOException,
                            AutomationException
Custom mouse icon used if MousePointer is 99.

Specified by:
getMouseIcon in interface IToolbarMenu2
Returns:
A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef)
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.