|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.esri.arcgis.beans.toolbar.ToolbarBean
public class ToolbarBean
The ToolbarBean
is a wrapper class of ToolbarControl
to
facilitate the use of ToolbarControl
at the design time. Users could access
the actual control by getToolbarControl
method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ToolbarControl |
m_toolbarControl
|
static ImageIcon |
TOOLBARBEAN_ICON
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
ToolbarBean()
Default constructor |
Method Summary | |
---|---|
void |
aboutBox()
Displays a dialog of information about the ToolbarControl. |
int |
addItem(Object commandOrMenu,
int subtype,
int index,
boolean beginGroup,
int groupSpacing,
int style)
Adds an item to the ToolbarControl. |
void |
addIToolbarControlEventsListener(IToolbarControlEventsAdapter theListener)
|
int |
addMenuItem(Object menu,
int index,
boolean beginGroup,
int groupSpacing)
Adds a menu item to the ToolbarControl. |
int |
addToolbarDef(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[] iEnumConnectionPointsArray)
enumConnectionPoints |
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(Object commandOrMenu)
Returns the index of the first item containing the given command, menu or palette. |
void |
findConnectionPoint(GUID gUID,
IConnectionPoint[] iConnectionPointArray)
findConnectionPoint |
int |
getAppearance()
The appearance of the ToolbarControl. |
int |
getBackColor()
Background color of the ToolbarControl. |
int |
getBorderStyle()
The border style of the ToolbarControl. |
Object |
getBuddy()
The object that will have its current tool managed by the toolbar. |
BuddyControl |
getBuddyControl()
|
void |
getClassID(GUID[] gUIDArray)
getClassID |
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. |
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. |
String |
getItemsString()
Return the items String |
com.esri.arcgis.interop.Dispatch |
getJintegraDispatch()
|
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. |
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[] _ULARGE_INTEGERArray)
getSizeMax |
int |
getTextAlignment()
The caption placement for all items on the ToolbarControl. |
ToolbarControl |
getToolbarControl()
Returns the actula 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()
initNew |
void |
interfaceSupportsErrorInfo(GUID gUID)
interfaceSupportsErrorInfo |
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()
isDirty |
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)
load |
void |
loadItems(IStream iStream)
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 |
paint(Graphics g)
Paints this component. |
void |
release()
|
void |
removeAllItems()
The method will remove all tool items in the toolbar. |
void |
removeIToolbarControlEventsListener(IToolbarControlEventsAdapter theListener)
|
void |
save(IStream pStm,
int fClearDirty)
save |
void |
saveItems(IStream iStream)
Saves the ToolbarControl items into a stream. |
void |
setAlignLeft(boolean _boolean)
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right. |
void |
setAppearance(int appearance)
The appearance of the ToolbarControl. |
void |
setBackColor(int color)
Background color of the ToolbarControl. |
void |
setBorderStyle(int rhs1)
The border style of the ToolbarControl. |
void |
setBuddyControl(BuddyControl buddy)
|
void |
setBuddyControl(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(Object rhs1)
A property to associate data with a control. |
void |
setFadeColor(int color)
Background fade color of the ToolbarControl. |
void |
setFillDirection(int direction)
The fill direction of the ToolbarControl background color. |
void |
setIconSize(int size)
The size in pixels of icons displayed on the ToolbarControl. |
void |
setItemAppearance(int itemapp)
The appearance of the items on the ToolbarControl. |
void |
setItemsString(String items)
|
void |
setKeyIntercept(int key)
A property that specifies interception of key strokes that are normally handled by the container. |
void |
setLargeIcons(boolean large)
Indicates if large icons are shown on all items on the ToolbarControl. |
void |
setLayout(LayoutManager layout)
Overrides the setLayout method of super class. |
void |
setMenuTracking(boolean menuTracking)
Indicates if menu tracking is enabled on the ToolbarControl. |
void |
setMouseIconByRef(Picture picture)
Custom mouse icon used if MousePointer is 99. |
void |
setMousePointer(int pointer)
The mouse pointer displayed over the ToolbarControl. |
void |
setOperationStackByRef(IOperationStack rhs1)
The operation stack used for undo and redo functionality. |
void |
setOrientation(int orientation)
Indicates if the ToolbarControl is horizontally or vertically aligned. |
void |
setShowHiddenItems(boolean _boolean)
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible. |
void |
setTextAlignment(int align)
The caption placement for all items on the ToolbarControl. |
void |
setThemedDrawing(boolean _boolean)
Indicates if the ToolbarControl uses themed drawing. |
void |
setToolTips(boolean tooltips)
Indicates if the items tooltips are shown. |
void |
setTransparent(boolean _boolean)
Indicates if the ToolbarControl has a transparent background. |
void |
setUpdateInterval(int interval)
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.controls.IToolbarControlDefault |
---|
remove, removeAll |
Methods inherited from interface com.esri.arcgis.controls.IToolbarControl |
---|
remove, removeAll |
Field Detail |
---|
protected ToolbarControl m_toolbarControl
public static ImageIcon TOOLBARBEAN_ICON
Constructor Detail |
---|
public ToolbarBean()
Method Detail |
---|
public void setLayout(LayoutManager layout)
setLayout
method of super class.
setLayout
in class Container
layout
- LayoutManager - a LayoutManager object.public ToolbarControl getToolbarControl()
public void paint(Graphics g)
paint
in class JComponent
g
- the graphics context to use for paintingpublic void setItemsString(String items)
setItemsString
in interface IToolbarItems
string
- public String getItemsString()
getItemsString
in interface IToolbarItems
public void removeAllItems() throws IOException
IOException
public int getAppearance() throws IOException
Returns or sets the paint style of a ToolbarControl to either Flat or 3D. By default the appearance is flat.
getAppearance
in interface IToolbarControl
getAppearance
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAppearance(int appearance) throws IOException
setAppearance
in interface IToolbarControl
setAppearance
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsAppearance constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBorderStyle() throws IOException
Returns or sets the border style of a ToolbarControl. By default a border is not drawn.
getBorderStyle
in interface IToolbarControl
getBorderStyle
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBorderStyle(int rhs1) throws IOException
setBorderStyle
in interface IToolbarControl
setBorderStyle
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsBorderStyle constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMousePointer() throws IOException
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.
getMousePointer
in interface IToolbarControl
getMousePointer
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMousePointer(int pointer) throws IOException
setMousePointer
in interface IToolbarControl
setMousePointer
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsMousePointer constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean esri_isEnabled() throws IOException
esri_isEnabled
in interface IToolbarControl
esri_isEnabled
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void esri_setEnabled(boolean rhs1) throws IOException
esri_setEnabled
in interface IToolbarControl
esri_setEnabled
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getKeyIntercept() throws IOException
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).
getKeyIntercept
in interface IToolbarControl
getKeyIntercept
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setKeyIntercept(int key) throws IOException
setKeyIntercept
in interface IToolbarControl
setKeyIntercept
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBuddyControl(BuddyControl buddy) throws IOException
IOException
public BuddyControl getBuddyControl()
public void setItemAppearance(int itemapp) throws IOException
setItemAppearance
in interface IToolbarControl
setItemAppearance
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriControlsAppearance constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getItemAppearance() throws IOException
Returns or sets the paint style of each Item on the ToolbarControl to either Flat or 3D. By default the item appearance is flat.
getItemAppearance
in interface IToolbarControl
getItemAppearance
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTextAlignment(int align) throws IOException
setTextAlignment
in interface IToolbarControl
setTextAlignment
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriToolbarTextAlignment constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTextAlignment() throws IOException
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.
Captions are only displayed for those items with IToolbarItem::Style set to esriCommandStyleTextOnly or esriCommandStyleIconAndText.
getTextAlignment
in interface IToolbarControl
getTextAlignment
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUpdateInterval(int interval) throws IOException
setUpdateInterval
in interface IToolbarControl
setUpdateInterval
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getUpdateInterval() throws IOException
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.
Be aware that setting a small UpdateInterval may cause memory usage to increase and the system to become busy doing continual updates.
getUpdateInterval
in interface IToolbarControl
getUpdateInterval
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLargeIcons(boolean large) throws IOException
setLargeIcons
in interface IToolbarControl
setLargeIcons
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isLargeIcons() throws IOException
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.
When the IconSize property to set to a size => 32, LargeIcons returns true.
isLargeIcons
in interface IToolbarControl
isLargeIcons
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setToolTips(boolean tooltips) throws IOException
setToolTips
in interface IToolbarControl
setToolTips
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isToolTips() throws IOException
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.
isToolTips
in interface IToolbarControl
isToolTips
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMenuTracking(boolean menuTracking) throws IOException
setMenuTracking
in interface IToolbarControl
setMenuTracking
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isMenuTracking() throws IOException
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.
isMenuTracking
in interface IToolbarControl
isMenuTracking
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int addItem(Object commandOrMenu, int subtype, int index, boolean beginGroup, int groupSpacing, int style) throws IOException, AutomationException
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, IToolControl, IPaletteDef 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.
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.
addItem
in interface IToolbarControl
addItem
in interface IToolbarControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addIToolbarControlEventsListener(IToolbarControlEventsAdapter theListener) throws IOException
IOException
public void removeIToolbarControlEventsListener(IToolbarControlEventsAdapter theListener) throws IOException
IOException
public IToolbarItem getItem(int index) throws IOException, AutomationException
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.
To loop through a ToolBarControl's item collection use the GetItem property in conjunction with the Count property.
getItem
in interface IToolbarControl
getItem
in interface IToolbarControlDefault
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCount() throws IOException, AutomationException
Returns the number of items on the ToolbarControl.
getCount
in interface IToolbarControl
getCount
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void update(int index, boolean fullUpdate) throws IOException, AutomationException
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.
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.
update
in interface IToolbarControl
update
in interface IToolbarControlDefault
index
- The index (in, optional, pass -1 if not required)fullUpdate
- The fullUpdate (in, optional, pass false if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getBuddy() throws IOException, AutomationException
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.
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.
getBuddy
in interface IToolbarControl
getBuddy
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITool getCurrentTool() throws IOException, AutomationException
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.
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:
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.
getCurrentTool
in interface IToolbarControl
getCurrentTool
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getObject() throws IOException, AutomationException
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.
getObject
in interface IToolbarControl
getObject
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHWnd() throws IOException, AutomationException
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.
getHWnd
in interface IToolbarControl
getHWnd
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentToolByRef(ITool rhs1) throws IOException, AutomationException
setCurrentToolByRef
in interface IToolbarControl
setCurrentToolByRef
in interface IToolbarControlDefault
rhs1
- A reference to a com.esri.arcgis.systemUI.ITool (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int find(Object commandOrMenu) throws IOException, AutomationException
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.
To find an item using a Command implementing ICommandSubType pass a UID with its SubType property set.
find
in interface IToolbarControl
find
in interface IToolbarControlDefault
item
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICommandPool getCommandPool() throws IOException, AutomationException
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.
getCommandPool
in interface IToolbarControl
getCommandPool
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCommandPoolByRef(ICommandPool rhs1) throws IOException, AutomationException
setCommandPoolByRef
in interface IToolbarControl
setCommandPoolByRef
in interface IToolbarControlDefault
rhs1
- A reference to a com.esri.arcgis.controls.ICommandPool (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int addToolbarDef(Object toolbarDef, int startIndex, boolean group, int groupSpacing, int style) throws IOException, AutomationException
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.
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.
addToolbarDef
in interface IToolbarControl
addToolbarDef
in interface IToolbarControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCustomize() throws IOException, AutomationException
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.
isCustomize
in interface IToolbarControl
isCustomize
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomize(boolean rhs1) throws IOException, AutomationException
setCustomize
in interface IToolbarControl
setCustomize
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int hitTest(int x, int y, boolean nearest) throws IOException, AutomationException
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.
hitTest
in interface IToolbarControl
hitTest
in interface IToolbarControlDefault
x
- The x (in)y
- The y (in)nearest
- The nearest (in, optional, pass false if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveItem(int startIndex, int finalIndex) throws IOException, AutomationException
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.
moveItem
in interface IToolbarControl
moveItem
in interface IToolbarControlDefault
startIndex
- The startIndex (in)finalIndex
- The finalIndex (in, optional, pass -1 if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getItemRect(int index, int[] top, int[] left, int[] bottom, int[] right) throws IOException, AutomationException
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.
getItemRect
in interface IToolbarControl
getItemRect
in interface IToolbarControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IOperationStack getOperationStack() throws IOException, AutomationException
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.
getOperationStack
in interface IToolbarControl
getOperationStack
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOperationStackByRef(IOperationStack rhs1) throws IOException, AutomationException
setOperationStackByRef
in interface IToolbarControl
setOperationStackByRef
in interface IToolbarControlDefault
rhs1
- A reference to a com.esri.arcgis.systemUI.IOperationStack (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getCustomProperty() throws IOException, AutomationException
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.
getCustomProperty
in interface IToolbarControl
getCustomProperty
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomProperty(Object rhs1) throws IOException, AutomationException
setCustomProperty
in interface IToolbarControl
setCustomProperty
in interface IToolbarControlDefault
rhs1
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBuddyControl(Object pToolbarBuddy) throws IOException, AutomationException
Pass the SetBuddyControl method a MapControl, PageLayoutControl, SceneControl, GlobeControl or object implementing IToolbarBuddy. To clear the Buddy set the property to Nothing.
The ToolbarControl is passed as the hook parameter to the ICommand::OnCreate method of each item's command on the ToolbarControl. Each command will typically check the type of Buddy that has been set before becoming enabled. For example, a 'map zoom in' tool will only become enabled if the Buddy is a control that has a Map object ie. a MapControl or PageLayoutControl.
setBuddyControl
in interface IToolbarControl
setBuddyControl
in interface IToolbarControlDefault
pToolbarBuddy
- A reference to another Automation Object (IDispatch) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int addMenuItem(Object menu, int index, boolean beginGroup, int groupSpacing) throws IOException, AutomationException
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.
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.
addMenuItem
in interface IToolbarControl
addMenuItem
in interface IToolbarControlDefault
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pStm) throws IOException, AutomationException
load
in interface IPersistStreamInit
pStm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pStm, int fClearDirty) throws IOException, AutomationException
save
in interface IPersistStreamInit
pStm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
getJintegraDispatch
in interface com.esri.arcgis.interop.RemoteObjRef
public void release()
release
in interface com.esri.arcgis.interop.RemoteObjRef
public void setMouseIconByRef(Picture picture) throws IOException, AutomationException
setMouseIconByRef
in interface IToolbarControl
setMouseIconByRef
in interface IToolbarControlDefault
rhs1
- A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Picture getMouseIcon() throws IOException, AutomationException
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
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.
getMouseIcon
in interface IToolbarControl
getMouseIcon
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void aboutBox() throws IOException, AutomationException
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.
aboutBox
in interface IToolbarControl
aboutBox
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enumConnectionPoints(IEnumConnectionPoints[] iEnumConnectionPointsArray) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
enumConnectionPoints
in interface IConnectionPointContainer
ppEnum
- A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void findConnectionPoint(GUID gUID, IConnectionPoint[] iConnectionPointArray) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
findConnectionPoint
in interface IConnectionPointContainer
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] gUIDArray) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
isDirty
in interface IPersistStreamInit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] _ULARGE_INTEGERArray) throws IOException, AutomationException
getSizeMax
in interface IPersistStreamInit
pCbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initNew() throws IOException, AutomationException
initNew
in interface IPersistStreamInit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID gUID) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setBackColor(int color) throws IOException, AutomationException
setBackColor
in interface IToolbarControlDefault
rhs1
- The rhs1 (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getBackColor() throws IOException, AutomationException
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.
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.
getBackColor
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getOrientation() throws IOException, AutomationException
Returns or sets the orientation of a ToolbarControl. By default the orientation is horizontal.
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.
getOrientation
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOrientation(int orientation) throws IOException, AutomationException
setOrientation
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriToolbarOrientation constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isThemedDrawing() throws IOException, AutomationException
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.
isThemedDrawing
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setThemedDrawing(boolean _boolean) throws IOException, AutomationException
setThemedDrawing
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getFadeColor() throws IOException, AutomationException
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.
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.
getFadeColor
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFadeColor(int color) throws IOException, AutomationException
This method is not supported on Unix.
setFadeColor
in interface IToolbarControlDefault
rhs1
- The rhs1 (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getFillDirection() throws IOException, AutomationException
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.
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.
getFillDirection
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFillDirection(int direction) throws IOException, AutomationException
This method is not supported on Unix.
setFillDirection
in interface IToolbarControlDefault
rhs1
- A com.esri.arcgis.controls.esriToolbarFillDirection constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isTransparent() throws IOException, AutomationException
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.
The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.
isTransparent
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTransparent(boolean _boolean) throws IOException, AutomationException
setTransparent
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowHiddenItems() throws IOException, AutomationException
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 .
The 'hidden items menu' can only be displayed at runtime, when the ToolbarControl is not in Customize mode.
isShowHiddenItems
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowHiddenItems(boolean _boolean) throws IOException, AutomationException
setShowHiddenItems
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getIconSize() throws IOException, AutomationException
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.
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.
getIconSize
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setIconSize(int size) throws IOException, AutomationException
setIconSize
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAlignLeft() throws IOException, AutomationException
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.
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.
isAlignLeft
in interface IToolbarControlDefault
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAlignLeft(boolean _boolean) throws IOException, AutomationException
setAlignLeft
in interface IToolbarControlDefault
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void loadItems(IStream iStream) throws IOException, AutomationException
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.
loadItems
in interface IToolbarControlDefault
pStream
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void saveItems(IStream iStream) throws IOException, AutomationException
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.
saveItems
in interface IToolbarControlDefault
pStream
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |