com.esri.arcgis.controls
Class ToolbarControl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.esri.arcgis.interop.Ocx
              extended bycom.esri.arcgis.controls.ToolbarControl
All Implemented Interfaces:
javax.accessibility.Accessible, IConnectionPointContainer, java.awt.image.ImageObserver, IPersist, IPersistStreamInit, ISupportErrorInfo, IToolbarControl, IToolbarControl2, IToolbarControlDefault, java.awt.MenuContainer, RemoteObjRef, java.io.Serializable

public class ToolbarControl
extends Ocx
implements IToolbarControlDefault, IToolbarControl, IToolbarControl2, IConnectionPointContainer, IPersistStreamInit, IPersist, ISupportErrorInfo

ESRI ToolbarControl

Product Availability

Available with ArcGIS Engine.

Description

The ToolbarControl hooks up command objects to the MapControl, PageLayoutControl, GlobeControl and SceneControl and provides properties, methods and events for: managing the general appearance; setting the buddy; adding and removing items; setting the current tool; and customization.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Ocx
rootParentContainers
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ToolbarControl()
          Constructs a ToolbarControl using ArcGIS Engine.
ToolbarControl(java.lang.Object o)
          Constructs a ToolbarControl.
 
Method Summary
 void aboutBox()
          Displays a dialog of information about the ToolbarControl.
 int addItem(java.lang.Object item, int subType, int index, boolean beginGroup, int groupSpacing, int style)
          Adds an item to the ToolbarControl.
 void addIToolbarControlEventsListener(IToolbarControlEvents theListener)
           
 int addMenuItem(java.lang.Object menu, int index, boolean beginGroup, int groupSpacing)
          Adds a menu item to the ToolbarControl.
 void addNotify()
           
 int addToolbarDef(java.lang.Object toolbarDef, int startIndex, boolean group, int groupSpacing, int style)
          Appends the contents of the toolbar definition, specified by Guid or ToolbarDef, to the toolbar control.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          Supported Platforms
 boolean equals(java.lang.Object o)
          Compare this object with another
 boolean esri_isEnabled()
          Indicates whether the ToolbarControl can respond to user generated events.
 void esri_setEnabled(boolean rhs1)
          Indicates whether the ToolbarControl can respond to user generated events.
 int find(java.lang.Object item)
          Returns the index of the first item containing the given command, menu or palette.
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          Supported Platforms
 int getAppearance()
          The appearance of the ToolbarControl.
 IConnectionPointContainer getAsIConnectionPointContainer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersist getAsIPersist()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersistStreamInit getAsIPersistStreamInit()
          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.
 IToolbarControl getAsIToolbarControl()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IToolbarControl2 getAsIToolbarControl2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IToolbarControlDefault getAsIToolbarControlDefault()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 int getBackColor()
          Background color of the ToolbarControl.
 int getBorderStyle()
          The border style of the ToolbarControl.
 java.lang.Object getBuddy()
          The object that will have its current tool managed by the toolbar.
 void getClassID(GUID[] pClassID)
          Supported Platforms
static java.lang.String getClsid()
           
 ICommandPool getCommandPool()
          The command pool used by the ToolbarControl to manage command objects.
 int getCount()
          The number of items on the ToolbarControl.
 ITool getCurrentTool()
          The current tool of the buddy.
 java.lang.Object getCustomProperty()
          A property to associate data with a control.
 int getFadeColor()
          Background fade color of the ToolbarControl.
 int getFillDirection()
          The fill direction of the ToolbarControl background color.
 int getHWnd()
          Handle to the window associated with the ToolbarControl.
 int getIconSize()
          The size in pixels of icons displayed on the ToolbarControl.
 IToolbarItem getItem(int index)
          Returns the item at the specified index from the ToolbarControl.
 int getItemAppearance()
          The appearance of the items on the ToolbarControl.
 void getItemRect(int index, int[] top, int[] left, int[] bottom, int[] right)
          Returns the dimensions of the item at the specified index.
 int getKeyIntercept()
          A property that specifies interception of key strokes that are normally handled by the container.
 Picture getMouseIcon()
          Custom mouse icon used if MousePointer is 99.
 int getMousePointer()
          The mouse pointer displayed over the ToolbarControl.
 java.lang.Object getObject()
          A property that returns the underlying control.
 IOperationStack getOperationStack()
          The operation stack used for undo and redo functionality.
 int getOrientation()
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 void getSizeMax(_ULARGE_INTEGER[] pCbSize)
          Supported Platforms
 int getTextAlignment()
          The caption placement for all items on the ToolbarControl.
 int getUpdateInterval()
          The frequency in millisecs that update method is called on the ToolbarControl.
 int hitTest(int x, int y, boolean nearest)
          Returns the index of the item at the specified x and y coordinates.
 void initNew()
          Supported Platforms
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 boolean isAlignLeft()
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 boolean isCustomize()
          Indicates if the ToolbarControl is in customize mode.
 void isDirty()
          Supported Platforms
 boolean isLargeIcons()
          Indicates if large icons are shown on all items on the ToolbarControl.
 boolean isMenuTracking()
          Indicates if menu tracking is enabled on the ToolbarControl.
 boolean isShowHiddenItems()
          Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
 boolean isThemedDrawing()
          Indicates if the ToolbarControl uses themed drawing.
 boolean isToolTips()
          Indicates if the items tooltips are shown.
 boolean isTransparent()
          Indicates if the ToolbarControl has a transparent background.
 void load(IStream pStm)
          Supported Platforms
 void loadItems(IStream pStream)
          Loads items into the ToolbarControl from a previously saved stream.
 void moveItem(int startIndex, int finalIndex)
          Moves an item from one index to another.
 void remove(int index)
          Removes the item at the specified index from the ToolbarControl.
 void removeAll()
          Removes all items from the ToolbarControl.
 void removeIToolbarControlEventsListener(IToolbarControlEvents theListener)
           
 void save(IStream pStm, int fClearDirty)
          Supported Platforms
 void saveItems(IStream pStream)
          Saves the ToolbarControl items into a stream.
 void setAlignLeft(boolean rhs1)
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 void setAppearance(int rhs1)
          The appearance of the ToolbarControl.
 void setBackColor(int rhs1)
          Background color of the ToolbarControl.
 void setBorderStyle(int rhs1)
          The border style of the ToolbarControl.
 void setBuddyControl(java.lang.Object pToolbarBuddy)
          Sets a control to be a buddy of the toolbar, this control must support IToolbarBuddy.
 void setCommandPoolByRef(ICommandPool rhs1)
          The command pool used by the ToolbarControl to manage command objects.
 void setCurrentToolByRef(ITool rhs1)
          The current tool of the buddy.
 void setCustomize(boolean rhs1)
          Indicates if the ToolbarControl is in customize mode.
 void setCustomProperty(java.lang.Object rhs1)
          A property to associate data with a control.
 void setFadeColor(int rhs1)
          Background fade color of the ToolbarControl.
 void setFillDirection(int rhs1)
          The fill direction of the ToolbarControl background color.
 void setIconSize(int rhs1)
          The size in pixels of icons displayed on the ToolbarControl.
 void setItemAppearance(int rhs1)
          The appearance of the items on the ToolbarControl.
 void setKeyIntercept(int rhs1)
          A property that specifies interception of key strokes that are normally handled by the container.
 void setLargeIcons(boolean rhs1)
          Indicates if large icons are shown on all items on the ToolbarControl.
 void setMenuTracking(boolean rhs1)
          Indicates if menu tracking is enabled on the ToolbarControl.
 void setMouseIconByRef(Picture rhs1)
          Custom mouse icon used if MousePointer is 99.
 void setMousePointer(int rhs1)
          The mouse pointer displayed over the ToolbarControl.
 void setOperationStackByRef(IOperationStack rhs1)
          The operation stack used for undo and redo functionality.
 void setOrientation(int rhs1)
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 void setShowHiddenItems(boolean rhs1)
          Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
 void setTextAlignment(int rhs1)
          The caption placement for all items on the ToolbarControl.
 void setThemedDrawing(boolean rhs1)
          Indicates if the ToolbarControl uses themed drawing.
 void setToolTips(boolean rhs1)
          Indicates if the items tooltips are shown.
 void setTransparent(boolean rhs1)
          Indicates if the ToolbarControl has a transparent background.
 void setUpdateInterval(int rhs1)
          The frequency in millisecs that update method is called on the ToolbarControl.
 void update(int index, boolean fullUpdate)
          Updates the enabled state of the specified item or all items if an index of -1 is specified.
 
Methods inherited from class com.esri.arcgis.interop.Ocx
checkIfVisible, getMinimumSize, getObjRef, getPreferredSize, paint, removeNotify, setBounds, setBounds, setSize, setSize, zz_doQueuedSets, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ToolbarControl

public ToolbarControl()
Constructs a ToolbarControl using ArcGIS Engine.


ToolbarControl

public ToolbarControl(java.lang.Object o)
Constructs a ToolbarControl.

Method Detail

getClsid

public static java.lang.String getClsid()

getAsIToolbarControlDefault

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


getAsIToolbarControl

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


getAsIToolbarControl2

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


getAsIConnectionPointContainer

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


getAsIPersistStreamInit

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


getAsIPersist

public IPersist getAsIPersist()
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


addIToolbarControlEventsListener

public void addIToolbarControlEventsListener(IToolbarControlEvents theListener)
                                      throws java.io.IOException
Throws:
java.io.IOException

removeIToolbarControlEventsListener

public void removeIToolbarControlEventsListener(IToolbarControlEvents theListener)
                                         throws java.io.IOException
Throws:
java.io.IOException

addNotify

public void addNotify()
Overrides:
addNotify in class Ocx

setBorderStyle

public void setBorderStyle(int rhs1)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IToolbarControlDefault
The border style of the ToolbarControl.

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

getBorderStyle

public int getBorderStyle()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IToolbarControlDefault
The border style of the ToolbarControl.

Description

Returns or sets the border style of a ToolbarControl. By default a border is not drawn.

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

esri_setEnabled

public void esri_setEnabled(boolean rhs1)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
Indicates whether the ToolbarControl can respond to user generated events.

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

esri_isEnabled

public boolean esri_isEnabled()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
Indicates whether the ToolbarControl can respond to user generated events.

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

setAppearance

public void setAppearance(int rhs1)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IToolbarControlDefault
The appearance of the ToolbarControl.

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

getAppearance

public int getAppearance()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
The appearance of the ToolbarControl.

Description

Returns or sets the paint style of a ToolbarControl to either Flat or 3D. By default the appearance is flat.

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

setMousePointer

public void setMousePointer(int rhs1)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
The mouse pointer displayed over the ToolbarControl.

Specified by:
setMousePointer in interface IToolbarControlDefault
Parameters:
rhs1 - 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.

getMousePointer

public int getMousePointer()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IToolbarControlDefault
The mouse pointer displayed over the ToolbarControl.

Description

Use this property when you want to indicate changes in functionality as the mouse pointer passes over the ToolbarControl. The esriPointerArrowHourglass setting (11) is useful for indicating that the user should wait for a process or operation to finish.

Specified by:
getMousePointer in interface IToolbarControlDefault
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.

setMouseIconByRef

public void setMouseIconByRef(Picture rhs1)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
Custom mouse icon used if MousePointer is 99.

Specified by:
setMouseIconByRef in interface IToolbarControlDefault
Parameters:
rhs1 - 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
Description copied from interface: IToolbarControlDefault
Custom mouse icon used if MousePointer is 99.

Description

The MouseIcon property provides a custom icon that is used when the MousePointer property is set to esriPointerArrowHourglass (99).

Dim pToolbarControl As IToolbarControlDefault
pToolbarControl = AxToolbarControl1.Object
Dim pIcon As Icon
pIcon = New Icon(GetType(Form1).Assembly.GetManifestResourceStream(GetType(Form1), "myIcon.ico"))
pToolbarControl.MouseIcon = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromIcon(pIcon)
pToolbarControl.MousePointer = esriControlsMousePointer.esriPointerCustom

Remarks

In most development evironments the control's property pages can be used to load either a cursor (.cur) or icon (.ico) file. A cursor contains a custom 'hotspot' location and can be any size. The 'hotspot' location for an icon file defaults to the center of the icon. This property cannot be used to load animated cursor (.ani) files.

To programatically create an object implementing IPictureDisp there is the win32 function OleLoadPicture or helper methods depending on the development environment. 

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

getHWnd

public int getHWnd()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IToolbarControlDefault
Handle to the window associated with the ToolbarControl.

Description

The operating environment identifies each window, form and control in an application by assigning it a handle, or hWnd. Many ArcObjects methods and Windows API calls require the hWnd as an argument.

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

aboutBox

public void aboutBox()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IToolbarControlDefault
Displays a dialog of information about the ToolbarControl.

Description

The AboutBox method causes a modal dialog box to display on top of the ToolbarControl, containing information about the version and creation date of the ToolbarControl as well as listing relevant legal and copyright information from ESRI.

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

addItem

public int addItem(java.lang.Object item,
                   int subType,
                   int index,
                   boolean beginGroup,
                   int groupSpacing,
                   int style)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IToolbarControlDefault
Adds an item to the ToolbarControl.

Description

Takes the specified command and creates a new item that is added to the ToolbarControl with its Command or Menu or Palette set, and returns the index of the first item added. Specifiy the command, menu or palette as either a IUid, ProgID, ICommand, IMenuDef, IToolbarMenu, IPaletteDef or IToolbarPalette. AddItem supports the following objects: ICommand, IMenuDef, IToolbarMenu, ICommandSubType, ITool, IToolControlIPaletteDef and IToolbarPalette. Visually items are represented on the ToolbarControl as buttons, tools, menus, text boxes and combo boxes. 

Supply a subType when passing an ICommandSubType. If no subType is supplied and the command is passed as a IUid or ProgID then ICommandSubType::GetCount determines the number of Item's to be added to the ToolbarControl. A subType must be supplied when passing an ICommandSubType as an ICommand, or the method will fail. By default subType is 0.

Index determines the position on the ToolbarControl that the item will be added to. By default this is -1 and represents the end of the ToolbarControl.

beginGroup determines whether a separator will appear before the item. By default beginGroup is False.

GroupSpacing determines the width in pixels of the separator.

Style determines the sytle of the item. By default Style is set to esriCommandStyleIconOnly.

Remarks

AddItem checks to see if the supplied command already exists in the CommandPool used by the ToolbarControl. If the command does not already exist, it is created and added to the CommandPool with a ICommandPool::UsageCount of 1, and is set as the IToolbarItem::Command. If the command already exists in the CommandPool, then the command instance is reused, its ICommandPool::UsageCount is incremented by 1 and the command is set as the IToolbarItem::Command. The ICommand::OnCreate method will be called the first time a command is added to the CommandPool.

Where possible always supply commands, menus and palettes as either Uid objects or ProgID's. Only supply commands as ICommand, IMenuDef or IPaletteDef  objects when a IUid or ProgID does not exist, and the class is compiled as part of the same project using the ToolbarControl. Passing a command menu or palette as an ICommand, IMenuDef or IPaletteDef object has the following limitation: Multiple instances of the same command can be added to the CommandPool, and each IToolbarItem::Command will point to a different command object. For example, setting a command implementing the ITool interface to be the CurrentTool would result in only one item appearing visually pressed on the on the ToolbarControl.

Specified by:
addItem in interface IToolbarControlDefault
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)
groupSpacing - The groupSpacing (in, optional, pass 0 if not required)
style - A com.esri.arcgis.systemUI.esriCommandStyles constant (in, optional, pass 1 if not required)
Returns:
The returnValue
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: IToolbarControlDefault
Removes the item at the specified index from the ToolbarControl.

Description

Removes the item at the specified index from the ToolbarControl. The item at the beginning of the collection to the left of the ToolbarControl has an index of 0.

Remarks

The Remove method will automatically find the IToolbarItem::Command in the CommandPool and decrement the ICommandPool::UsageCount by 1. If the  ICommandPool::UsageCount reaches 0 the command will be released from the CommandPool.

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

removeAll

public void removeAll()
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IToolbarControlDefault
Removes all items from the ToolbarControl.

Description

This method removes all items from the ToolbarControl.

Remarks

For each item removed the RemoveAll method will automatically find the IToolbarItem::Command in the CommandPool and decrement the ICommandPool::UsageCount by 1. If the  ICommandPool::UsageCount reaches 0 the command will be released from the CommandPool .

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

getItem

public IToolbarItem getItem(int index)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
Returns the item at the specified index from the ToolbarControl.

Description

The property is used to access a particular item on the ToolbarControl. The item at the beginning of the collection to the left of the ToolbarControl has an index of 0. Visually items are represented on the ToolbarControl as buttons, tools, menus, text boxes and combo boxes.

Remarks

To loop through a ToolBarControl's item collection use the GetItem property in conjunction with the Count property.

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

getCount

public int getCount()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IToolbarControlDefault
The number of items on the ToolbarControl.

Description

Returns the number of items on the ToolbarControl.

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

update

public void update(int index,
                   boolean fullUpdate)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IToolbarControlDefault
Updates the enabled state of the specified item or all items if an index of -1 is specified. Specify fullUpdate to update the group, group spacing, style and bitmap properties.

Description

The primary job of the Update method is to ensure that each item on the ToolbarControl is synchronised with the ICommand properties of the IToolbarItem::Command.

By default the index argument is -1, and each item on the ToolbarControl is updated. To update a specific item, specifiy its index. The item at the beginning of the collection to the left of the ToolbarControl has an index of 0.

By default the fullUpdate argument is false, and each item is updated to reflect its ICommand::Enabled, ICommand::Caption and ICommand::Checked properties. Pass true to Update to additionally update the following properties: ICommand::Bitmap, IToolbarItem::Style, IToolbarItem::Group and IToolbarItem::GroupSpacing properties.

By default the Update method is called automatically on a regular interval specified by the UpdateInterval to ensure that the ToolbarControl items reflect the current application state. This updates all items, but with a fullUpdate argument set to false.

Remarks

The Update method checks each commands ICommandPool::Created property. If the command has not been created the ICommandPoolEdit::Hook property is passed into the ICommand::OnCreate method. The hook it typically the ToolbarControl.

Specified by:
update in interface IToolbarControlDefault
Parameters:
index - The index (in, optional, pass -1 if not required)
fullUpdate - The fullUpdate (in, optional, pass false if not required)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getBuddy

public java.lang.Object getBuddy()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IToolbarControlDefault
The object that will have its current tool managed by the toolbar.

Description

The Buddy returns the object implementing IToolbarBuddy that was passed to the SetBuddyControl method. The Buddy is responsible for handling the CurrentTool.

The SetBuddyControl method will remove any wrapper object that a development environment has added to the control passed to it. As such, the object passed into the SetBuddyControl method may be different from the object returned by the Buddy.

Remarks

When an application is first started the Buddy may return Nothing until the first Update has happened. By default the Update method will be first called internally after an UpdateInterval (the default is 500 milliseconds). To avoid this delay call Update within the form load event.

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

getCurrentTool

public ITool getCurrentTool()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
The current tool of the buddy.

Description

This is a shortcut to the CurrentTool of the Buddy. The Buddy implements the IToolbarBuddy interface that has a CurrentTool property. If no Buddy is set the CurrentTool returns Nothing.

On a ToolbarControl there is only ever one CurrentTool, and this is the item that appears 'pushed in'. If another tool is selected it becomes the new CurrentTool and the previous tool is deactivated.

If multiple ToolbarControls share the same CommandPool and have the same Buddy the CurrentTool is synchronised through the Buddy so only one item on all the ToolbarControl's will be the CurrentTool.

Remarks

Always check that the Buddy has been set, before setting the CurrentTool or the method will fail.

When the CurrentTool is set the following events occur:

  1. The ITool::Deactivate event is triggered on the 'old' CurrentTool if one was set. If this event returns false a trappable error ocurrs. If this event returns true the 'old' CurrentTool is removed and replaced.
  2. The ICommand::OnClick event is triggered on the 'new' CurrentTool and its cursor is picked up.

Within an ITool implementation it is recommended that the ITool::Deactivate event returns true. This allows a 'new' CurrentTool to be set, and allows the release of the CurrentTool when an application is shutting down.

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

setCurrentToolByRef

public void setCurrentToolByRef(ITool rhs1)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IToolbarControlDefault
The current tool of the buddy.

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

isToolTips

public boolean isToolTips()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the items tooltips are shown.

Description

Determines whether each item on the ToolbarControl will display the ICommand::Tooltip property when the mouse cursor is held over the item. This property is true by default.

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

setToolTips

public void setToolTips(boolean rhs1)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the items tooltips are shown.

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

getItemAppearance

public int getItemAppearance()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
The appearance of the items on the ToolbarControl.

Description

Returns or sets the paint style of each Item on the ToolbarControl to either Flat or 3D. By default the item appearance is flat.

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

setItemAppearance

public void setItemAppearance(int rhs1)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
The appearance of the items on the ToolbarControl.

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

getUpdateInterval

public int getUpdateInterval()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
The frequency in millisecs that update method is called on the ToolbarControl.

Description

Specifies the frequency the ToolbarControl automatically calls the Update method (without a full update). Setting the UpdateInterval to 0 will stop the Update method been called automatically. By default the UpdateInterval is set to 500 milliseconds.

Remarks

Be aware that setting a small UpdateInterval may cause memory usage to increase and the system to become busy doing continual updates.

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

setUpdateInterval

public void setUpdateInterval(int rhs1)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
The frequency in millisecs that update method is called on the ToolbarControl.

Specified by:
setUpdateInterval in interface IToolbarControlDefault
Parameters:
rhs1 - The rhs1 (in)
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
Description copied from interface: IToolbarControlDefault
Returns the index of the first item containing the given command, menu or palette. Returns -1 if the command is not found.

Description

Returns the index of the first item on the ToolbarControl using the specified IUid , ProgID, ICommand, IMenuDef or IPaletteDef. If the specified command or menu cannot be found -1 is returned.

Remarks

To find an item using a Command implementing ICommandSubType pass a UID with its SubType property set.

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

getCommandPool

public ICommandPool getCommandPool()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IToolbarControlDefault
The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.

Description

The CommandPool manages the collection of commands used by the ToolbarControl. The AddItem, AddToolbarDef, Remove and RemoveAll methods all use the CommandPool.

Care must be taken by developers when using the CommandPool to ensure that the ICommandPool::UsageCount of any commands in the collection stay synchronised with the number of items using the command as the IToolbarItem::Command .

Note that if a new CommandPool is set commands are copied from the original CommandPool into the new one. If the same command exists in the original CommadPool and the new CommandPool, the command in the new CommandPool is used.

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

setCommandPoolByRef

public void setCommandPoolByRef(ICommandPool rhs1)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IToolbarControlDefault
The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.

Specified by:
setCommandPoolByRef in interface IToolbarControlDefault
Parameters:
rhs1 - 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.

addToolbarDef

public int addToolbarDef(java.lang.Object toolbarDef,
                         int startIndex,
                         boolean group,
                         int groupSpacing,
                         int style)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
Appends the contents of the toolbar definition, specified by Guid or ToolbarDef, to the toolbar control.

Description

Takes the specified toolbar definition and for each command specified an item is created and added to the ToolbarControl with an associated IToolbarItem::Command set. Specifiy the toolbar definition as either a IUid, ProgID, or IToolBarDef .

startIndex determines the position on the ToolbarControl each item will be added to. By default this is -1 and represents the end of the ToolbarControl.

Group determines whether separators will appear before the first and after the last item defined by the IToolBarDef . By default Group is False. Note this will override any IItemDef::Group property set in the IToolBarDef.

GroupSpacing determines the width of any separators, and applies to all items defined by the IToolBarDef .

Style applies to all items defined by the IToolBarDef. By default Style is set to esriCommandStyleIconOnly.

Where possible always supply toolbars as either Uid objects or ProgID's. Only supply toolbars as IToolBarDef objects when a IUid or ProgID does not exist, and the class is compiled as part of the same project using the ToolbarControl.

Remarks

For each command specified by the IToolBarDef, AddToolbarDef calls the AddItem method which checks to see if the supplied command already exists in the CommandPool. If the command does not already exist, it is added to the CommandPool with a ICommandPool::UsageCount of 1, and is set as the IToolbarItem::Command. If the command does already exist in the CommandPool its ICommandPool::UsageCount increments by 1 and the command is set as the IToolbarItem::Command. The ICommand::OnCreate method will only be called the first time a command is added to the CommandPool.

Specified by:
addToolbarDef in interface IToolbarControlDefault
Parameters:
toolbarDef - A Variant (in)
startIndex - The startIndex (in, optional, pass -1 if not required)
group - The group (in, optional, pass false if not required)
groupSpacing - The groupSpacing (in, optional, pass 4 if not required)
style - A com.esri.arcgis.systemUI.esriCommandStyles constant (in, optional, pass 1 if not required)
Returns:
The returnValue
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getTextAlignment

public int getTextAlignment()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
The caption placement for all items on the ToolbarControl.

Description

Returns or sets whether each item on the ToolbarControl will display the ICommand::Caption property aligned to the right or to the bottom of the item. By default the captions will be aligned to the right of items.

Remarks

Captions are only displayed for those items with IToolbarItem::Style set to esriCommandStyleTextOnly or esriCommandStyleIconAndText.

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

setTextAlignment

public void setTextAlignment(int rhs1)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
The caption placement for all items on the ToolbarControl.

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

isLargeIcons

public boolean isLargeIcons()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if large icons are shown on all items on the ToolbarControl.

Description

Determines whether each item on the ToolbarControl will display the ICommand::Bitmap property stretched to 32 x 32 pixels. This property is false by default and bitmaps are stretched to 16 x 16 pixels.

Remarks

When the IconSize property to set to a size => 32, LargeIcons returns true.

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

setLargeIcons

public void setLargeIcons(boolean rhs1)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if large icons are shown on all items on the ToolbarControl.

Specified by:
setLargeIcons in interface IToolbarControlDefault
Parameters:
rhs1 - The rhs1 (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
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl is in customize mode.

Description

Use this property to determine whether the ToolbarControl is in customize mode at run time. This property is false by default. The behaviour of ToolbarControl changes when in customize mode. 

Use the left mouse button to select an item on the ToolbarControl. Either drag the selected item to a new position on the ToolbarControl as indicated by the black verticle line, or drag and drop the item off the ToolbarControl to remove it.

Use the right mouse button to select an item and display the customize menu. Use the customize menu to either delete the item or set its Style, Group or GroupSpacing properties.

If the CustomizeDialog is displayed on the screen whilst the ToolbarControl is in customize mode, new items can be added to the ToolbarControl by either double clicking on an item in the CustomizeDialog or by dragging and dropping an item from the CustomizeDialog to the ToolbarControl.

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

setCustomize

public void setCustomize(boolean rhs1)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl is in customize mode.

Specified by:
setCustomize in interface IToolbarControlDefault
Parameters:
rhs1 - The rhs1 (in)
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
Description copied from interface: IToolbarControlDefault
Moves an item from one index to another.

Description

Moves the item at the specified startIndex, to the position at the specified finalIndex. If no finalIndex is supplied the item is moved to the end of the ToolbarControl.

Specified by:
moveItem in interface IToolbarControlDefault
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.

hitTest

public int hitTest(int x,
                   int y,
                   boolean nearest)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IToolbarControlDefault
Returns the index of the item at the specified x and y coordinates.

Description

Returns the index of the item at the specified x and y coordinates (in pixels). If no item is found, returns -1.

nearest specifies whether the index of the item nearest to the specified x and y coordinates is returned. By default nearest is false.

Specified by:
hitTest in interface IToolbarControlDefault
Parameters:
x - The x (in)
y - The y (in)
nearest - The nearest (in, optional, pass false if not required)
Returns:
The returnValue
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItemRect

public void getItemRect(int index,
                        int[] top,
                        int[] left,
                        int[] bottom,
                        int[] right)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IToolbarControlDefault
Returns the dimensions of the item at the specified index.

Description

Returns the dimensions in pixels of the item at the specified index on the ToolbarControl. An item's rectangle refers to the area on the ToolbarControl occupied by the button, text box or combo box. These rectangles are adjacent. For example, if the first item had a left value of 2, and a right value of 26, the second item would have a left value of 26.

Specified by:
getItemRect in interface IToolbarControlDefault
Parameters:
index - The index (in)
top - The top (in/out: use single element array)
left - The left (in/out: use single element array)
bottom - The bottom (in/out: use single element array)
right - The right (in/out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOperationStack

public IOperationStack getOperationStack()
                                  throws java.io.IOException,
                                         AutomationException
Description copied from interface: IToolbarControlDefault
The operation stack used for undo and redo functionality. If present commands can use it to store operations.

Description

The OperationStack used to manage undo and redo functionality. Operations are added to the operation stack by each item's Command, so that the operation can be rolled forward and then rolled back as desired. For example, when a graphic element is moved, the operation can be undone moving the graphic back to its original location.

By default the OperationStack will return Nothing. Typically, a developer creates a ControlsOperationStack and sets it into the ToolbarControl. 'Undo' and 'Redo' commands can be added to the ToolbarControl to step through the OperationStack.

Whether or not a command makes use of an OperationStack depends upon its implementation. For example, a command to nudge the position of a graphic element will create an object implementing IOperation and add it to the OperationStack using IOperationStack::Do.

Note, that commands that change the IActiveView::Extent do not need to implement an IOperation object, as the extent is automatically stored in the IActiveView::ExtentStack.

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

setOperationStackByRef

public void setOperationStackByRef(IOperationStack rhs1)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IToolbarControlDefault
The operation stack used for undo and redo functionality. If present commands can use it to store operations.

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

getCustomProperty

public java.lang.Object getCustomProperty()
                                   throws java.io.IOException,
                                          AutomationException
Description copied from interface: IToolbarControlDefault
A property to associate data with a control.

Description

Use the CustomProperty to associate any useful data with the ToolbarControl. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.

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

setCustomProperty

public void setCustomProperty(java.lang.Object rhs1)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
A property to associate data with a control.

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

setBuddyControl

public void setBuddyControl(java.lang.Object pToolbarBuddy)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
Sets a control to be a buddy of the toolbar, this control must support IToolbarBuddy.

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

isMenuTracking

public boolean isMenuTracking()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if menu tracking is enabled on the ToolbarControl.

Description

Indicates whether a menu or palette on the ToolbarControl will display automatically as the user moves the mouse over it, or whether the user must click on the arrow to the right of the menu or palette to display it.

An application's main menu toolbar would typically contain menu only items such as File, Edit, View and Help and would typically have MenuTracking enabled.

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

setMenuTracking

public void setMenuTracking(boolean rhs1)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if menu tracking is enabled on the ToolbarControl.

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

addMenuItem

public int addMenuItem(java.lang.Object menu,
                       int index,
                       boolean beginGroup,
                       int groupSpacing)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IToolbarControlDefault
Adds a menu item to the ToolbarControl.

Description

Takes the specified menu and creates a new item that is added to the ToolbarControl and returns the index of the menu item added. This is really a shortcut to AddItem.

Specifiy the menu as either a IUID , ProgID, IMenuDef or IToolbarMenu.

If AddIMenuItem is passed an IMenuDef, the menu definition is is used to build a new ToolbarMenu, and the IToolbarMenu::CommandPool is set to the IToolbarControlDefault::CommandPool. If AddMenuItem is passed an IToolbarMenu a new ToolbarItem is created and the IToolbarItem::Menu is set to the IToolbarMenu.

index determines the position on the ToolbarControl that the Item will be added to. By default this is -1 and represents the end of the ToolbarControl.

beginGroup determines whether a separator will appear before the Item. By default beginGroup is False.

GroupSpacing determines the width in pixels of the separator.

Remarks

AddItem checks to see if each command in the menu already exists in the CommandPool used by the ToolbarControl. If the command does not already exist, it is created and added to the CommandPool with a ICommandPool::UsageCount of 1. If the command already exists in the CommandPool its ICommandPool::UsageCount is incremented by 1. The ICommand::OnCreate method will be called the first time a command is added to the CommandPool.

Where possible always supply menus as either Uid objects or ProgID's. Only supply menu as IMenuDef objects when a IUid or ProgID does not exist, and the class is compiled as part of the same project using the ToolbarControl.

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

getObject

public java.lang.Object getObject()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IToolbarControlDefault
A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.

Description

In some development environments it is not possible to query interface directly on the control to other COM interfaces, beacuse the control is contained within a wrapper object. To get the real control use the Object property.

Specified by:
getObject in interface IToolbarControlDefault
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.

getKeyIntercept

public int getKeyIntercept()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IToolbarControlDefault
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

Description

Returns or sets keys on the keyboard that will be intercepted by the ToolbarControl, triggering the OnKeyDown and OnKeyUp events when pressed. These keys are often hidden from the ToolbarControl by the development environment container. By default the KeyIntercept is set to esriKeyInterceptNone.

Many development environment containers use the up, down, left and right arrow keys to change control focus on a form. These keys can also be useful for navigating around the display. To intercept the arrow keys and the Tab key combine the enum values using a logical OR operation (esriKeyInterceptArrowKeys OR esriKeyInterceptTabKey, which is 1 OR 4 = 5).

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

setKeyIntercept

public void setKeyIntercept(int rhs1)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

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

setBackColor

public void setBackColor(int rhs1)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
Background color of the ToolbarControl.

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

getBackColor

public int getBackColor()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IToolbarControlDefault
Background color of the ToolbarControl.

Description

Returns or sets the background color of the ToolbarControl. By default BackColor is set to the Windows System '3D Objects' color. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

If the BackColor is different to the FadeColor the ToolbarControl background will be shaded between the BackColor and FadeColor by the FillDirection.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

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

getOrientation

public int getOrientation()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl is horizontally or vertically aligned.

Description

Returns or sets the orientation of a ToolbarControl. By default the orientation is horizontal.

Remarks

When a ToolControl is added to a ToolbarControl with a vertical orientation, the ToolControl displays as a button. Clicking the button displays the ToolControl in a seperate window. The ToolControl window can be closed interactively by the end user, or programmatically using the ICompletionNotify::SetComplete method.

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

setOrientation

public void setOrientation(int rhs1)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl is horizontally or vertically aligned.

Specified by:
setOrientation in interface IToolbarControlDefault
Parameters:
rhs1 - A com.esri.arcgis.controls.esriToolbarOrientation constant (in)
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
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl uses themed drawing.

Description

Determines whether items on the ToolbarControl display themselves using the current Windows XP theme. This property is false by default, and items display themselves on the ToolbarControl with the Windows Classic look.

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

setThemedDrawing

public void setThemedDrawing(boolean rhs1)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl uses themed drawing.

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

getFadeColor

public int getFadeColor()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IToolbarControlDefault
Background fade color of the ToolbarControl.

Description

Returns or sets the fade color of the ToolbarControl. By default FadeColor is set to the Windows System '3D Objects' color. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

If the FadeColor is different to the BackColor the ToolbarControl background will be shaded between the BackColor and FadeColor by the FillDirection.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

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

setFadeColor

public void setFadeColor(int rhs1)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
Background fade color of the ToolbarControl.

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

getFillDirection

public int getFillDirection()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IToolbarControlDefault
The fill direction of the ToolbarControl background color.

Description

Returns or sets the fill direction used to shade the background color of the ToolbarControl between the BackColor and FadeColor. By default a horizontal fill direction will be set.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

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

setFillDirection

public void setFillDirection(int rhs1)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
The fill direction of the ToolbarControl background color.

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

isTransparent

public boolean isTransparent()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl has a transparent background.

Description

Determines whether the background of the ToolbarControl is transparent. This property is false by default.

When Transparent is true, the parent window containing the ToolbarControl must not clip children windows for transparency to work. This ensures the area of the window under the ToolbarControl gets painted.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

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

setTransparent

public void setTransparent(boolean rhs1)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl has a transparent background.

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

isShowHiddenItems

public boolean isShowHiddenItems()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.

Description

Determines whether any hidden items on the ToolbarControl are visible on a 'hidden items menu' when the button containing two chevrons is clicked by the end user. By default this property is false.

When ShowHiddenItems is false, the last visible item on the ToolbarControl may be partially visible only (and all subsequent items will be inaccessible) depending on the size of the ToolbarControl .

Remarks

The 'hidden items menu' can only be displayed at runtime, when the ToolbarControl is not in Customize mode.

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

setShowHiddenItems

public void setShowHiddenItems(boolean rhs1)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.

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

getIconSize

public int getIconSize()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IToolbarControlDefault
The size in pixels of icons displayed on the ToolbarControl.

Description

The size in pixels that each item on the ToolbarControl will display the ICommand::Bitmap property. By default bitmaps are stretched to a size of 16 x 16 pixels. The minimum IconSize allowed is 8.

Remarks

IconSize may not affect the size of an item on the ToolbarControl that contains an object implementing IToolControl. Whether the ToolControl responds to the resize depends on its implementation.

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

setIconSize

public void setIconSize(int rhs1)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IToolbarControlDefault
The size in pixels of icons displayed on the ToolbarControl.

Specified by:
setIconSize in interface IToolbarControlDefault
Parameters:
rhs1 - The rhs1 (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
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.

Description

Determines whether ToolbarMenu and ToolbarPalette items (and any sub menus they contain) on the ToolbarControl popup in a position aligned to the left of the ToolbarControl. This property is true by default.

Remarks

If a ToolbarMenu or ToolbarPalette is to popup in a position so close to edge of a screen display, that it will not be fully visible, the AlignLeft property will be ignored. The ToolbarMenu or ToolbarPalette will popup aligned in a direction that will ensure it is fully visible.

AlignLeft does not affect the alignment of an ICommand::Caption, IToolbarMenu::Caption or  IToolbarPalette::Caption displayed on a ToolbarItem. In order to change the direction text is displayed the RTL (right to left) display environment variable need changing. The AlignLeft property will override any RTL (right to left) display environment variables that affect the position of drop downs.

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

setAlignLeft

public void setAlignLeft(boolean rhs1)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IToolbarControlDefault
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.

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

loadItems

public void loadItems(IStream pStream)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IToolbarControlDefault
Loads items into the ToolbarControl from a previously saved stream.

Description

Loads the specified items into the ToolbarControl. Any items on the ToolbarControl before the LoadItems method is used, will be removed and replaced by the contents of the stream.

Use the LoadItems method in conjunction with the IBlobStream::LoadFromFile method to load any previously saved customizations made to the ToolbarControl by a user with the CustomizeDialog. The stream can be saved into a users profile using the SaveItems method, when an application exits, and the items loaded back into the ToolbarControl when the application is restarted using the LoadItems method.

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

saveItems

public void saveItems(IStream pStream)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IToolbarControlDefault
Saves the ToolbarControl items into a stream.

Description

Persists the any items on the ToolbarControl out as a MemoryBlobStream.

Use the SaveItems method in conjunction with the IBlobStream::SaveToFile method to save any customizations made to the ToolbarControl by a user with the CustomizeDialog. The stream can be saved into a users profile, when an application exits, and the items loaded back into the ToolbarControl when the application is restarted using the LoadItems method.

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

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IConnectionPointContainer

Supported Platforms

Windows, Solaris, Linux

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IConnectionPointContainer

Supported Platforms

Windows, Solaris, Linux

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IPersistStreamInit

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pStm)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPersistStreamInit

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStreamInit
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
Description copied from interface: IPersistStreamInit

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStreamInit
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
Description copied from interface: IPersistStreamInit

Supported Platforms

Windows, Solaris, Linux

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

initNew

public void initNew()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IPersistStreamInit

Supported Platforms

Windows, Solaris, Linux

Specified by:
initNew in interface IPersistStreamInit
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
Description copied from interface: IPersist

Supported Platforms

Windows, Solaris, Linux

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
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.