com.esri.arcgis.framework
Class DockableWindow

java.lang.Object
  extended by com.esri.arcgis.framework.DockableWindow
All Implemented Interfaces:
IDockableWindow, IWindowPosition, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class DockableWindow
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDockableWindow, ISupportErrorInfo, IWindowPosition

DockableWindow object.

Description

A DockableWindow is an auxillary window that can display data. This window is treated as a modeless child window of that application. It can exist in a floating state or attached to the main application window.

The Table of Contents in ArcMap is a dockable window.

Use the IDockableWindowManager interface to get access to a particular dockable window. You can implement the IDockableWindowDef interface to create a custom dockable window.

Remarks

The DockableWindow class also implements the IWindowPosition interface. You can use this interface to size and position your dockable window. Note, the dockable window must be in a floating state before you call any of the properties or methods on IWindowPosition.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
DockableWindow(Object obj)
          Construct a DockableWindow using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void dock(int dockFlags)
          Docks or undocks this docking window.
 boolean equals(Object o)
          Compare this object with another
 String getCaption()
          The caption of the dockable window.
 int getHeight()
          The height of the window.
 IUID getID()
          The unique id for this dockable window.
 int getLeft()
          The distance between the internal left edge of the window and screen.
 String getName()
          The name of the dockable window.
 int getState()
          The state of the window.
 int getTop()
          The distance between the internal top edge of the window and screen.
 Object getUserData()
          User defined data.
 int getWidth()
          The width of the window.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isVisible()
          Indicates if this docking window is visible.
 void move(int left, int top, int width, int height)
          Moves and optionally resizes the windows in a single function.
 void setCaption(String caption)
          The caption of the dockable window.
 void setHeight(int height)
          The height of the window.
 void setLeft(int left)
          The distance between the internal left edge of the window and screen.
 void setState(int windowState)
          The state of the window.
 void setTop(int top)
          The distance between the internal top edge of the window and screen.
 void setWidth(int width)
          The width of the window.
 void show(boolean show)
          Hides or shows the dockable window.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

DockableWindow

public DockableWindow(Object obj)
               throws IOException
Construct a DockableWindow using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DockableWindow.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
DockableWindow o = (DockableWindow)obj; // will not work

DockableWindow o = new DockableWindow(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems DockableWindow theDockableWindow = (DockableWindow) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the dockable window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getName in interface IDockableWindow
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCaption

public String getCaption()
                  throws IOException,
                         AutomationException
The caption of the dockable window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setCaption

public void setCaption(String caption)
                throws IOException,
                       AutomationException
The caption of the dockable window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getID

public IUID getID()
           throws IOException,
                  AutomationException
The unique id for this dockable window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getID in interface IDockableWindow
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

show

public void show(boolean show)
          throws IOException,
                 AutomationException
Hides or shows the dockable window.

Description

Show specifies whether the dockable window should be shown or hidden. Use True to show the window and False to hide the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isVisible

public boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if this docking window is visible.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isVisible in interface IDockableWindow
Returns:
The bVisible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

dock

public void dock(int dockFlags)
          throws IOException,
                 AutomationException
Docks or undocks this docking window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
dock in interface IDockableWindow
Parameters:
dockFlags - A com.esri.arcgis.framework.esriDockFlags constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUserData

public Object getUserData()
                   throws IOException,
                          AutomationException
User defined data.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLeft

public void setLeft(int left)
             throws IOException,
                    AutomationException
The distance between the internal left edge of the window and screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getLeft

public int getLeft()
            throws IOException,
                   AutomationException
The distance between the internal left edge of the window and screen.

Remarks

The Left property determines the position of the window in screen coordinates relative to the upper-left corner of the display screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getLeft in interface IWindowPosition
Returns:
The left
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTop

public void setTop(int top)
            throws IOException,
                   AutomationException
The distance between the internal top edge of the window and screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getTop

public int getTop()
           throws IOException,
                  AutomationException
The distance between the internal top edge of the window and screen.

Remarks

The Top property determines the position of the window in screen coordinates relative to the upper-left corner of the display screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTop in interface IWindowPosition
Returns:
The top
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWidth

public void setWidth(int width)
              throws IOException,
                     AutomationException
The width of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getWidth

public int getWidth()
             throws IOException,
                    AutomationException
The width of the window.

Remarks

The Height and Width properties determine the size of the window. This is in screen units.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getWidth in interface IWindowPosition
Returns:
The width
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHeight

public void setHeight(int height)
               throws IOException,
                      AutomationException
The height of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getHeight

public int getHeight()
              throws IOException,
                     AutomationException
The height of the window.

Remarks

The Height and Width properties determine the size of the window. This is in screen units.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getHeight in interface IWindowPosition
Returns:
The height
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

public void move(int left,
                 int top,
                 int width,
                 int height)
          throws IOException,
                 AutomationException
Moves and optionally resizes the windows in a single function.

Remarks

You can use the Move method to set the Left, Top, Width, and Height properties all at the same time.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
move in interface IWindowPosition
Parameters:
left - The left (in)
top - The top (in)
width - The width (in, optional, pass 0 if not required)
height - The height (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setState

public void setState(int windowState)
              throws IOException,
                     AutomationException
The state of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setState in interface IWindowPosition
Parameters:
windowState - A com.esri.arcgis.framework.esriWindowState constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getState

public int getState()
             throws IOException,
                    AutomationException
The state of the window.

Remarks

The State property uses the esriWindowState enumeration to specify whether the window is normal, minimized, or maximized.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getState in interface IWindowPosition
Returns:
A com.esri.arcgis.framework.esriWindowState constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.