com.esri.arcgis.catalogUI
Class GxDialog

java.lang.Object
  extended by com.esri.arcgis.catalogUI.GxDialog
All Implemented Interfaces:
IGxObjectFilterCollection, IGxSelectionEvents, IGxDialog, com.esri.arcgis.interop.RemoteObjRef, Serializable, EventListener

public class GxDialog
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGxDialog, IGxObjectFilterCollection, IGxSelectionEvents

Provides access to GX browser dialog.

Description

The GxDialog object can be used within ArcCatalog and ArcMap to provide browser capabilities. What the user can select or specify when using a GxDialog browser is based on the filters (GxObjectFilter) held by the object. The GxDialog object maintains a collection of these filters, and the developer has the ability to create his or her own filter to add to the collection.

Remarks

If you are writing an application in Visual C++ that creates/uses a GxDialog object, the application needs to call ::OleInitialize() instead of ::CoInitialize() prior to creating the GxDialog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GxDialog()
          Constructs a GxDialog using ArcGIS Engine.
GxDialog(Object obj)
          Construct a GxDialog using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addFilter(IGxObjectFilter filter, boolean defaultFilter)
          Add a filter to the filter collection, and specify if it is to selected by default.
 boolean doModalOpen(int parentWindow, IEnumGxObject[] selection)
          Opens the dialog to choose data.
 boolean doModalSave(int parentWindow)
          Opens the dialog to save data.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 IGxObject getFinalLocation()
          The dialog's final location.
 IGxCatalog getInternalCatalog()
          The catalog object used internally by the GxDialog.
 String getName()
          The text in the Name text box (only for DoModalSave).
 IGxObjectFilter getObjectFilter()
          The object filter.
 int hashCode()
          the hashcode for this object
 boolean isReplacingObject()
          Indicates if an object already exists with the name supplied by the user, and is being replaced.
 void onSelectionChanged(IGxSelectionEventsOnSelectionChangedEvent theEvent)
          Called when the selection contents have changed.
 void removeAllFilters()
          Remove all filters from the filter collection.
 void setAllowMultiSelect(boolean rhs1)
          Indicates if multiple items may be selected.
 void setButtonCaption(String rhs1)
          The caption to use for the Open or Save button.
 void setName(String name)
          The text in the Name text box (only for DoModalSave).
 void setObjectFilterByRef(IGxObjectFilter filter)
          The object filter.
 void setRememberLocation(boolean rhs1)
          Indicates if the dialog should use the final location as the next starting location.
 void setStartingLocation(Object rhs1)
          The dialog's starting location.
 void setTitle(String rhs1)
          The dialog's title.
 
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

GxDialog

public GxDialog()
         throws IOException,
                UnknownHostException
Constructs a GxDialog using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GxDialog

public GxDialog(Object obj)
         throws IOException
Construct a GxDialog using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GxDialog.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems GxDialog theGxDialog = (GxDialog) obj;
Method Detail

getClsid

public static String getClsid()
getClsid.


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

setAllowMultiSelect

public void setAllowMultiSelect(boolean rhs1)
                         throws IOException,
                                AutomationException
Indicates if multiple items may be selected. False, by default.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setTitle

public void setTitle(String rhs1)
              throws IOException,
                     AutomationException
The dialog's title.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setButtonCaption

public void setButtonCaption(String rhs1)
                      throws IOException,
                             AutomationException
The caption to use for the Open or Save button.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setName

public void setName(String name)
             throws IOException,
                    AutomationException
The text in the Name text box (only for DoModalSave).

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getName

public String getName()
               throws IOException,
                      AutomationException
The text in the Name text box (only for DoModalSave).

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isReplacingObject

public boolean isReplacingObject()
                          throws IOException,
                                 AutomationException
Indicates if an object already exists with the name supplied by the user, and is being replaced.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isReplacingObject in interface IGxDialog
Returns:
The replacingObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setStartingLocation

public void setStartingLocation(Object rhs1)
                         throws IOException,
                                AutomationException
The dialog's starting location. This can be an IGxObject or a text-string containing the full name of an object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getFinalLocation

public IGxObject getFinalLocation()
                           throws IOException,
                                  AutomationException
The dialog's final location.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getFinalLocation in interface IGxDialog
Returns:
A reference to a com.esri.arcgis.catalog.IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRememberLocation

public void setRememberLocation(boolean rhs1)
                         throws IOException,
                                AutomationException
Indicates if the dialog should use the final location as the next starting location. True, by default.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

setObjectFilterByRef

public void setObjectFilterByRef(IGxObjectFilter filter)
                          throws IOException,
                                 AutomationException
The object filter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setObjectFilterByRef in interface IGxDialog
Parameters:
filter - A reference to a com.esri.arcgis.catalog.IGxObjectFilter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectFilter

public IGxObjectFilter getObjectFilter()
                                throws IOException,
                                       AutomationException
The object filter.

Remarks

ObjectFilter will return the filter that is currently active in the dialog. If the dialog is not currently open (through DoModalOpen or DoModalSave), then this property will return the default filter.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getObjectFilter in interface IGxDialog
Returns:
A reference to a com.esri.arcgis.catalog.IGxObjectFilter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInternalCatalog

public IGxCatalog getInternalCatalog()
                              throws IOException,
                                     AutomationException
The catalog object used internally by the GxDialog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getInternalCatalog in interface IGxDialog
Returns:
A reference to a com.esri.arcgis.catalog.IGxCatalog
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doModalOpen

public boolean doModalOpen(int parentWindow,
                           IEnumGxObject[] selection)
                    throws IOException,
                           AutomationException
Opens the dialog to choose data.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
doModalOpen in interface IGxDialog
Parameters:
parentWindow - The parentWindow (A COM typedef) (in)
selection - A reference to a com.esri.arcgis.catalog.IEnumGxObject (out: use single element array)
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doModalSave

public boolean doModalSave(int parentWindow)
                    throws IOException,
                           AutomationException
Opens the dialog to save data.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
doModalSave in interface IGxDialog
Parameters:
parentWindow - The parentWindow (A COM typedef) (in)
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addFilter

public void addFilter(IGxObjectFilter filter,
                      boolean defaultFilter)
               throws IOException,
                      AutomationException
Add a filter to the filter collection, and specify if it is to selected by default.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
addFilter in interface IGxObjectFilterCollection
Parameters:
filter - A reference to a com.esri.arcgis.catalog.IGxObjectFilter (in)
defaultFilter - The defaultFilter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAllFilters

public void removeAllFilters()
                      throws IOException,
                             AutomationException
Remove all filters from the filter collection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
removeAllFilters in interface IGxObjectFilterCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onSelectionChanged

public void onSelectionChanged(IGxSelectionEventsOnSelectionChangedEvent theEvent)
                        throws IOException,
                               AutomationException
Called when the selection contents have changed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
onSelectionChanged in interface IGxSelectionEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.