com.esri.arcgis.catalogUI
Class GxPreview

java.lang.Object
  extended by com.esri.arcgis.catalogUI.GxPreview
All Implemented Interfaces:
IGxSelectionEvents, IGxPreview, IGxView, IGxViewContainer, com.esri.arcgis.interop.RemoteObjRef, Serializable, EventListener

public class GxPreview
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGxView, IGxPreview, IGxSelectionEvents, IGxViewContainer

GxView that represents the preview.

Remarks

The GxPreview coclass is the only type of GxView that also is a type of GxViewContainer. The class is implemented as a tab within ArcCatalog, but within that tab it is a container for additional views. These views provide "previews" of the selected object depending on which ones are applicable. For instance, the geography and table previews are available for a shape file, while only the table preview is available for a table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GxPreview()
          Constructs a GxPreview using ArcGIS Engine.
GxPreview(Object obj)
          Construct a GxPreview using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void activate(IGxApplication application, IGxCatalog catalog)
          Activates the view.
 boolean applies(IGxObject selection)
          Indicates if the view can display the given object.
 void deactivate()
          Deactivates the view.
 boolean equals(Object o)
          Compare this object with another
 IGxView findView(IUID pUID, boolean bRecursive)
          Finds a view by CLSID.
 IUID getClassID()
          The class ID of the view.
static String getClsid()
          getClsid.
 IUID getDefaultToolbarCLSID()
          The class ID of the view's default toolbar.
 int getHWnd()
          The view's window handle.
 String getName()
          The name of the view.
 ISet getSupportedViewClassIDs()
          A list of the class IDs for the views that are supported given the current selection.
 IGxView getView()
          The current view.
 IUID getViewClassID()
          The class ID of the current view.
 IEnumGxView getViews()
          All Gxviews in the application.
 int hashCode()
          the hashcode for this object
 boolean isSupportsTools()
          Indicates if the view supports tools.
 void onSelectionChanged(IGxSelectionEventsOnSelectionChangedEvent theEvent)
          Called when the selection contents have changed.
 void refresh()
          Refreshes the view.
 void setViewClassID(IUID viewClassID)
          The class ID of the current view.
 void systemSettingChanged(int flag, String section)
          Informs the view that a system setting has changed.
 
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

GxPreview

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

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

GxPreview

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

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems GxPreview theGxPreview = (GxPreview) 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

getName

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

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getClassID

public IUID getClassID()
                throws IOException,
                       AutomationException
The class ID of the view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getClassID in interface IGxView
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.

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
The view's window handle.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getDefaultToolbarCLSID

public IUID getDefaultToolbarCLSID()
                            throws IOException,
                                   AutomationException
The class ID of the view's default toolbar. Not currently used.

Remarks

DefaultToolbarCLSID provides a reference to the default toolbar for the particular view. The default toolbar for a view would contain tools that were appropriate for the current type of GxView.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDefaultToolbarCLSID in interface IGxView
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.

isSupportsTools

public boolean isSupportsTools()
                        throws IOException,
                               AutomationException
Indicates if the view supports tools.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isSupportsTools in interface IGxView
Returns:
The supportsTools
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

applies

public boolean applies(IGxObject selection)
                throws IOException,
                       AutomationException
Indicates if the view can display the given object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
applies in interface IGxView
Parameters:
selection - A reference to a com.esri.arcgis.catalog.IGxObject (in)
Returns:
The applies
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activate

public void activate(IGxApplication application,
                     IGxCatalog catalog)
              throws IOException,
                     AutomationException
Activates the view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
activate in interface IGxView
Parameters:
application - A reference to a com.esri.arcgis.catalogUI.IGxApplication (in)
catalog - A reference to a com.esri.arcgis.catalog.IGxCatalog (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

public void deactivate()
                throws IOException,
                       AutomationException
Deactivates the view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

refresh

public void refresh()
             throws IOException,
                    AutomationException
Refreshes the view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

systemSettingChanged

public void systemSettingChanged(int flag,
                                 String section)
                          throws IOException,
                                 AutomationException
Informs the view that a system setting has changed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getView

public IGxView getView()
                throws IOException,
                       AutomationException
The current view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getView in interface IGxPreview
Returns:
A reference to a com.esri.arcgis.catalogUI.IGxView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewClassID

public IUID getViewClassID()
                    throws IOException,
                           AutomationException
The class ID of the current view.

Remarks

TheViewClassID property is used to set and retrieve the current view through its UID. Setting the UID is the only method for changing the current view within the GxPreview object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getViewClassID in interface IGxPreview
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.

setViewClassID

public void setViewClassID(IUID viewClassID)
                    throws IOException,
                           AutomationException
The class ID of the current view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

getSupportedViewClassIDs

public ISet getSupportedViewClassIDs()
                              throws IOException,
                                     AutomationException
A list of the class IDs for the views that are supported given the current selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSupportedViewClassIDs in interface IGxPreview
Returns:
A reference to a com.esri.arcgis.system.ISet
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.

findView

public IGxView findView(IUID pUID,
                        boolean bRecursive)
                 throws IOException,
                        AutomationException
Finds a view by CLSID. If recursive is true, it will return views in a container view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
findView in interface IGxViewContainer
Parameters:
pUID - A reference to a com.esri.arcgis.system.IUID (in)
bRecursive - The bRecursive (in, optional, pass false if not required)
Returns:
A reference to a com.esri.arcgis.catalogUI.IGxView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViews

public IEnumGxView getViews()
                     throws IOException,
                            AutomationException
All Gxviews in the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getViews in interface IGxViewContainer
Returns:
A reference to a com.esri.arcgis.catalogUI.IEnumGxView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.