com.esri.arcgis.controls
Class TOCControl

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

public class TOCControl
extends Ocx
implements ITOCControlDefault, ITOCControl, ITOCControl2, IConnectionPointContainer, IPersistStreamInit, IPersist, ISupportErrorInfo

ESRI TOCControl

Product Availability

Available with ArcGIS Engine.

Description

The TOCControl displays a 'Table of Contents' view of maps, layers and layer symbology available from the IActiveView and IBasicMap interfaces. The TOCControl works in conjunction with a 'buddy' control or an object implementing IActiveView. A MapControl, PageLayoutControl, SceneControl or GlobeControl can be a 'buddy'. The TOCControl obtains access to the 'buddy' through the ITOCBuddy interface. The TOCControl manages layer visibility and label editing.

Remarks

There is no need to declare the TOCControl's outbound interface as described below in most development environments, because the interface is automaticlly implemented.

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
TOCControl()
          Constructs a TOCControl using ArcGIS Engine.
TOCControl(java.lang.Object o)
          Constructs a TOCControl.
 
Method Summary
 void aboutBox()
          Displays a dialog of information about the TOCControl.
 void addITOCControlEventsListener(ITOCControlEvents theListener)
           
 void addNotify()
           
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          Supported Platforms
 boolean equals(java.lang.Object o)
          Compare this object with another
 boolean esri_isEnabled()
          Indicates whether the TOCControl can respond to user generated events.
 void esri_setEnabled(boolean rhs1)
          Indicates whether the TOCControl can respond to user generated events.
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          Supported Platforms
 IActiveView getActiveView()
          The ActiveView used to populate the TOCControl.
 int getAppearance()
          The appearance of the TOCControl.
 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.
 ITOCControl getAsITOCControl()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ITOCControl2 getAsITOCControl2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 ITOCControlDefault getAsITOCControlDefault()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 int getBorderStyle()
          The border style of the TOCControl.
 java.lang.Object getBuddy()
          The object whose ActiveView is used to populate the TOCControl.
 void getClassID(GUID[] pClassID)
          Supported Platforms
static java.lang.String getClsid()
           
 java.lang.Object getCustomProperty()
          A property to associate data with a control.
 int getHWnd()
          Handle to the window associated with the TOCControl.
 int getKeyIntercept()
          A property that specifies interception of key strokes that are normally handled by the container.
 int getLabelEdit()
          Label editing state.
 int getLayerVisibilityEdit()
          Layer visibility editing state.
 Picture getMouseIcon()
          Custom mouse icon used if MousePointer is 99.
 int getMousePointer()
          The mouse pointer displayed over the TOCControl.
 java.lang.Object getObject()
          A property that returns the underlying control.
 void getSelectedItem(int[] itemType, IBasicMap[] basicMap, ILayer[] layer, java.lang.Object[] unk, java.lang.Object[] data)
          Returns the selected item in the TOCControl.
 void getSizeMax(_ULARGE_INTEGER[] pCbSize)
          Supported Platforms
 void hitTest(int x, int y, int[] itemType, IBasicMap[] basicMap, ILayer[] layer, java.lang.Object[] unk, java.lang.Object[] data)
          Returns the item in the TOCControl at the specified coordinates.
 void initNew()
          Supported Platforms
 void interfaceSupportsErrorInfo(GUID riid)
          Supported Platforms
 void isDirty()
          Supported Platforms
 boolean isEnableLayerDragDrop()
          Indicates if layers can be dragged and dropped in the control.
 void load(IStream pStm)
          Supported Platforms
 void removeITOCControlEventsListener(ITOCControlEvents theListener)
           
 void save(IStream pStm, int fClearDirty)
          Supported Platforms
 void selectItem(java.lang.Object unk, java.lang.Object data)
          Sets the selected item in the TOCControl.
 void setActiveView(IActiveView activeView)
          Sets the ActiveView used to populate the TOCControl.
 void setAppearance(int rhs1)
          The appearance of the TOCControl.
 void setBorderStyle(int rhs1)
          The border style of the TOCControl.
 void setBuddyControl(java.lang.Object pTOCBuddy)
          Sets a control to be a buddy of the toolbar, this control must support ITOCBuddy.
 void setCustomProperty(java.lang.Object rhs1)
          A property to associate data with a control.
 void setEnableLayerDragDrop(boolean rhs1)
          Indicates if layers can be dragged and dropped in the control.
 void setKeyIntercept(int rhs1)
          A property that specifies interception of key strokes that are normally handled by the container.
 void setLabelEdit(int rhs1)
          Label editing state.
 void setLayerVisibilityEdit(int rhs1)
          Layer visibility editing state.
 void setMouseIconByRef(Picture rhs1)
          Custom mouse icon used if MousePointer is 99.
 void setMousePointer(int rhs1)
          The mouse pointer displayed over the TOCControl.
 void update()
          Updates the contents of the TOCControl to match its ActiveView.
 
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

TOCControl

public TOCControl()
Constructs a TOCControl using ArcGIS Engine.


TOCControl

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

Method Detail

getClsid

public static java.lang.String getClsid()

getAsITOCControlDefault

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


getAsITOCControl

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


getAsITOCControl2

public ITOCControl2 getAsITOCControl2()
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


addITOCControlEventsListener

public void addITOCControlEventsListener(ITOCControlEvents theListener)
                                  throws java.io.IOException
Throws:
java.io.IOException

removeITOCControlEventsListener

public void removeITOCControlEventsListener(ITOCControlEvents theListener)
                                     throws java.io.IOException
Throws:
java.io.IOException

addNotify

public void addNotify()
Overrides:
addNotify in class Ocx

esri_setEnabled

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

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

esri_isEnabled

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

Specified by:
esri_isEnabled in interface ITOCControlDefault
Returns:
The returnValue
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: ITOCControlDefault
Handle to the window associated with the TOCControl.

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 ITOCControlDefault
Returns:
The returnValue
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: ITOCControlDefault
The mouse pointer displayed over the TOCControl.

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

getMousePointer

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

Description

Use this property when you want to indicate changes in functionality as the mouse pointer passes over the TOCControl. 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 ITOCControlDefault
Returns:
A com.esri.arcgis.controls.esriControlsMousePointer constant
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setMouseIconByRef

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

Specified by:
setMouseIconByRef in interface ITOCControlDefault
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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getMouseIcon

public Picture getMouseIcon()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ITOCControlDefault
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).

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

getAppearance

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

Description

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

Specified by:
getAppearance in interface ITOCControlDefault
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.

setAppearance

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

Specified by:
setAppearance in interface ITOCControlDefault
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.

setBorderStyle

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

Specified by:
setBorderStyle in interface ITOCControlDefault
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: ITOCControlDefault
The border style of the TOCControl.

Description

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

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

aboutBox

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

Description

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

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

getActiveView

public IActiveView getActiveView()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: ITOCControlDefault
The ActiveView used to populate the TOCControl.

Description

This is the ActiveView of the Buddy that is used by the TOCControl to populate itself with maps, layers and symbols. The ActiveView is set by the SetBuddyControl or SetActiveView methods.

Specified by:
getActiveView in interface ITOCControlDefault
Returns:
A reference to a com.esri.arcgis.carto.IActiveView
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: ITOCControlDefault
The object whose ActiveView is used to populate the TOCControl.

Description

The Buddy returns the object implementing ITOCBuddy that was passed to the SetBuddyControl method. The Buddy is responsible for handling the ActiveView, and enables the TOCControl to populate itself with maps, layers and symbols.

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.

Specified by:
getBuddy in interface ITOCControlDefault
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.

hitTest

public void hitTest(int x,
                    int y,
                    int[] itemType,
                    IBasicMap[] basicMap,
                    ILayer[] layer,
                    java.lang.Object[] unk,
                    java.lang.Object[] data)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: ITOCControlDefault
Returns the item in the TOCControl at the specified coordinates.

Description

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the TOCControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the TOCControl (the top left hand corner).

ItemType specifies an enumeration indicating the type of item (none, map, layer, heading or legend class).

Map specifies an IMap object.

Layer specifies an ILayer object.

Unk specifies an ILegendGroup object.

Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class. An index of -1 refers to the heading if it is present.

Specified by:
hitTest in interface ITOCControlDefault
Parameters:
x - The x (in)
y - The y (in)
itemType - A com.esri.arcgis.controls.esriTOCControlItem constant (in/out: use single element array)
basicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in/out: use single element array)
layer - A reference to a com.esri.arcgis.carto.ILayer (in/out: use single element array)
unk - A reference to another Object (IUnknown) (in/out: use single element array)
data - A Variant (in/out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

update

public void update()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: ITOCControlDefault
Updates the contents of the TOCControl to match its ActiveView.

Description

Updates the contents of the TOCControl based upon the ActiveView. Use the Update method after programmatically changing layer visibility and names, or changing any legend settings.

Remarks

The TOCControl will automatically update its contents in response to IActiveViewEvents fired from the Buddy and the ITOCBuddyEvents::ActiveViewReplaced event that indicates a new document has been loaded into the Buddy or the object encapsulated by the Buddy has been replaced. 

Use the Update method to update a Map which is not the FocusMap, as the IActiveViewEvents will only be triggered for the FocusMap.

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

setActiveView

public void setActiveView(IActiveView activeView)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: ITOCControlDefault
Sets the ActiveView used to populate the TOCControl.

Specified by:
setActiveView in interface ITOCControlDefault
Parameters:
activeView - A reference to a com.esri.arcgis.carto.IActiveView (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getLayerVisibilityEdit

public int getLayerVisibilityEdit()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: ITOCControlDefault
Layer visibility editing state.

Description

Use LabelVisibilityEdit to determine whether layer visibility is controlled programmatically or through user interaction with the check boxes. By default LayerVisibility is automatic.

Set the property to automatic to toggle layer visibility through user interaction with the check boxes.

Set the property to manual to toggle layer visibility programmatcially.

Remarks

If a layer has MinimumScale and MaximumScale thresholds set, its check box will become disabled when the layer is not displayed.

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

setLayerVisibilityEdit

public void setLayerVisibilityEdit(int rhs1)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: ITOCControlDefault
Layer visibility editing state.

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

getLabelEdit

public int getLabelEdit()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ITOCControlDefault
Label editing state.

Description

Use LabelEdit to determine whether label editing is controlled programmatically or through user interaction. By default label editing is automatic. To edit a map, layer, heading or legend class label, click on it at runtime, and then click on it a second time to invoke label editing. The ESC key on the keyboard can be used during the edit to cancel the LabelEdit.

Set the property to automatic to edit labels unchecked, and set to manual to trigger the OnBeginLabelEdit and OnEndLabelEdit events.

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

setLabelEdit

public void setLabelEdit(int rhs1)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: ITOCControlDefault
Label editing state.

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

getCustomProperty

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

Description

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

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

setCustomProperty

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

Specified by:
setCustomProperty in interface ITOCControlDefault
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 pTOCBuddy)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ITOCControlDefault
Sets a control to be a buddy of the toolbar, this control must support ITOCBuddy.

Specified by:
setBuddyControl in interface ITOCControlDefault
Parameters:
pTOCBuddy - 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.

getObject

public java.lang.Object getObject()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: ITOCControlDefault
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 ITOCControlDefault
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: ITOCControlDefault
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 TOCControl, triggering the OnKeyDown and OnKeyUp events when pressed. These keys are often hidden from the TOCControl 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 ITOCControlDefault
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: ITOCControlDefault
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 ITOCControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEnableLayerDragDrop

public boolean isEnableLayerDragDrop()
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: ITOCControlDefault
Indicates if layers can be dragged and dropped in the control.

Description

Determines whether layers can be dragged and dropped in the TOCControl. This property if false by default. When EnableLayerDragDrap is true, layers can be dragged and dropped as follows:

By default when dragging and dropping a layer within a map, the layer will be moved within the map to the drop location. To copy the layer, rather than move it press the CTRL key while dragging and dropping.

By default when dragging and dropping a layer between maps, a copy of the layer will be added into the map the layer is dropped into. To move the dragged layer, rather than copy it press the CTRL key while dragging and dropping.

Remarks

Layers can not be dragged and dropped in the following cases:

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

setEnableLayerDragDrop

public void setEnableLayerDragDrop(boolean rhs1)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: ITOCControlDefault
Indicates if layers can be dragged and dropped in the control.

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

getSelectedItem

public void getSelectedItem(int[] itemType,
                            IBasicMap[] basicMap,
                            ILayer[] layer,
                            java.lang.Object[] unk,
                            java.lang.Object[] data)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ITOCControlDefault
Returns the selected item in the TOCControl.

Description

Returns the selected item in the TOCControl. The selected item may have been selected interactively by the end user clicking on the TOCControl or programmatically using the SelectItem method.

ItemType specifies an enumeration indicating the type of item (none, map, layer, heading or legend class).

Map specifies an IMap object.

Layer specifies an ILayer object.

Unk specifies an ILegendGroup object.

Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class. An index of -1 refers to the heading if it is present.

Specified by:
getSelectedItem in interface ITOCControlDefault
Parameters:
itemType - A com.esri.arcgis.controls.esriTOCControlItem constant (in/out: use single element array)
basicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in/out: use single element array)
layer - A reference to a com.esri.arcgis.carto.ILayer (in/out: use single element array)
unk - A reference to another Object (IUnknown) (in/out: use single element array)
data - A Variant (in/out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

selectItem

public void selectItem(java.lang.Object unk,
                       java.lang.Object data)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: ITOCControlDefault
Sets the selected item in the TOCControl.

Description

Selects the specified item in the TOCControl. The selected item will appear blue when the TOCControl has keyboard focus and grey when the TOCControl does not have keyboard focus.

Unk specifies an IMap object, and ILayer object or and ILegendGroup object.

Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to obtain a particular legend class.

To select an ILegendGroup::Heading either just pass an ILegendGroup object or pass an ILegendGroup object with an index of -1. To select a legend class within the LegendGroup pass an ILegendGroup object with a valid index.

Specified by:
selectItem in interface ITOCControlDefault
Parameters:
unk - A reference to another Object (IUnknown) (in)
data - A Variant (in, optional, pass null if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

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.