com.esri.arcgis.controls
Class IToolbarControl2Proxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.IToolbarControlProxy
          extended by com.esri.arcgis.controls.IToolbarControl2Proxy
All Implemented Interfaces:
IToolbarControl, IToolbarControl2, Externalizable, Serializable

public class IToolbarControl2Proxy
extends IToolbarControlProxy
implements IToolbarControl2, Serializable

Provides access to members that control the ToolbarControl.

Description

The IToolbarControl2 interface provides additional members for tasks related to the ToolbarControl, such as setting appearance properties, showing any hidden items on a hidden items menu, and saving and loading the contents of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  IToolbarControl2Proxy()
           
  IToolbarControl2Proxy(Object obj)
           
protected IToolbarControl2Proxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 int getBackColor()
          Background color of the ToolbarControl.
 int getFadeColor()
          Background fade color of the ToolbarControl.
 int getFillDirection()
          The fill direction of the ToolbarControl background color.
 int getIconSize()
          The size in pixels of icons displayed on the ToolbarControl.
 int getOrientation()
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 boolean isAlignLeft()
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 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 isTransparent()
          Indicates if the ToolbarControl has a transparent background.
 void loadItems(IStream pStream)
          Loads items into the ToolbarControl from a previously saved stream.
 void readExternal(ObjectInput in)
           
 void removeListener(String iidStr, Object theListener)
           
 void saveItems(IStream pStream)
          Saves the ToolbarControl items into a stream.
 void setAlignLeft(boolean pVal)
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 void setBackColor(int pclr)
          Background color of the ToolbarControl.
 void setFadeColor(int pVal)
          Background fade color of the ToolbarControl.
 void setFillDirection(int pVal)
          The fill direction of the ToolbarControl background color.
 void setIconSize(int pVal)
          The size in pixels of icons displayed on the ToolbarControl.
 void setOrientation(int pVal)
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 void setShowHiddenItems(boolean pVal)
          Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
 void setThemedDrawing(boolean pVal)
          Indicates if the ToolbarControl uses themed drawing.
 void setTransparent(boolean pVal)
          Indicates if the ToolbarControl has a transparent background.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.controls.IToolbarControlProxy
aboutBox, addItem, addMenuItem, addToolbarDef, esri_isEnabled, esri_setEnabled, find, getAppearance, getBorderStyle, getBuddy, getCommandPool, getCount, getCurrentTool, getCustomProperty, getHWnd, getItem, getItemAppearance, getItemRect, getKeyIntercept, getMouseIcon, getMousePointer, getObject, getOperationStack, getTextAlignment, getUpdateInterval, hitTest, isCustomize, isLargeIcons, isMenuTracking, isToolTips, moveItem, remove, removeAll, setAppearance, setBorderStyle, setBuddyControl, setCommandPoolByRef, setCurrentToolByRef, setCustomize, setCustomProperty, setItemAppearance, setKeyIntercept, setLargeIcons, setMenuTracking, setMouseIconByRef, setMousePointer, setOperationStackByRef, setTextAlignment, setToolTips, setUpdateInterval, update
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.controls.IToolbarControl
aboutBox, addItem, addMenuItem, addToolbarDef, esri_isEnabled, esri_setEnabled, find, getAppearance, getBorderStyle, getBuddy, getCommandPool, getCount, getCurrentTool, getCustomProperty, getHWnd, getItem, getItemAppearance, getItemRect, getKeyIntercept, getMouseIcon, getMousePointer, getObject, getOperationStack, getTextAlignment, getUpdateInterval, hitTest, isCustomize, isLargeIcons, isMenuTracking, isToolTips, moveItem, remove, removeAll, setAppearance, setBorderStyle, setBuddyControl, setCommandPoolByRef, setCurrentToolByRef, setCustomize, setCustomProperty, setItemAppearance, setKeyIntercept, setLargeIcons, setMenuTracking, setMouseIconByRef, setMousePointer, setOperationStackByRef, setTextAlignment, setToolTips, setUpdateInterval, update
 

Constructor Detail

IToolbarControl2Proxy

public IToolbarControl2Proxy()

IToolbarControl2Proxy

public IToolbarControl2Proxy(Object obj)
                      throws IOException
Throws:
IOException

IToolbarControl2Proxy

protected IToolbarControl2Proxy(Object obj,
                                String iid)
                         throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class IToolbarControlProxy
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class IToolbarControlProxy
Throws:
IOException

setBackColor

public void setBackColor(int pclr)
                  throws IOException,
                         AutomationException
Background color of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

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

getBackColor

public int getBackColor()
                 throws IOException,
                        AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

getOrientation

public int getOrientation()
                   throws IOException,
                          AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setOrientation

public void setOrientation(int pVal)
                    throws IOException,
                           AutomationException
Indicates if the ToolbarControl is horizontally or vertically aligned.

Product Availability

Available with ArcGIS Engine.

Specified by:
setOrientation in interface IToolbarControl2
Parameters:
pVal - A com.esri.arcgis.controls.esriToolbarOrientation constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isThemedDrawing

public boolean isThemedDrawing()
                        throws IOException,
                               AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setThemedDrawing

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

Product Availability

Available with ArcGIS Engine.

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

getFadeColor

public int getFadeColor()
                 throws IOException,
                        AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setFadeColor

public void setFadeColor(int pVal)
                  throws IOException,
                         AutomationException
Background fade color of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

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

getFillDirection

public int getFillDirection()
                     throws IOException,
                            AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setFillDirection

public void setFillDirection(int pVal)
                      throws IOException,
                             AutomationException
The fill direction of the ToolbarControl background color.

Product Availability

Available with ArcGIS Engine.

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

isTransparent

public boolean isTransparent()
                      throws IOException,
                             AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setTransparent

public void setTransparent(boolean pVal)
                    throws IOException,
                           AutomationException
Indicates if the ToolbarControl has a transparent background.

Product Availability

Available with ArcGIS Engine.

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

isShowHiddenItems

public boolean isShowHiddenItems()
                          throws IOException,
                                 AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setShowHiddenItems

public void setShowHiddenItems(boolean pVal)
                        throws IOException,
                               AutomationException
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.

Product Availability

Available with ArcGIS Engine.

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

getIconSize

public int getIconSize()
                throws IOException,
                       AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setIconSize

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

Product Availability

Available with ArcGIS Engine.

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

isAlignLeft

public boolean isAlignLeft()
                    throws IOException,
                           AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

setAlignLeft

public void setAlignLeft(boolean pVal)
                  throws IOException,
                         AutomationException
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.

Product Availability

Available with ArcGIS Engine.

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

loadItems

public void loadItems(IStream pStream)
               throws IOException,
                      AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

saveItems

public void saveItems(IStream pStream)
               throws IOException,
                      AutomationException
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.

Product Availability

Available with ArcGIS Engine.

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

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class IToolbarControlProxy
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class IToolbarControlProxy
Throws:
IOException
ClassNotFoundException