|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.controls.GlobeHookHelper
public class GlobeHookHelper
Helps commands work with the GlobeControl, ArcGlobe, custom controls and applications.
The GlobeHookHelper is designed to help developers write custom commands that will work with some ArcGIS Engine Controls and applications.
When creating a custom command the ICommand::OnCreate event is passed a hook to the control or application that the command will work with. The command needs to determine the type of hook that is passed so it knows how to handle itself. Rather than adding code into the ICommand::OnCreate event to determine the type of hook a GlobeHookHelper object can do this. The GlobeHookHelper is used to hold the hook and return the Globe, GlobeDisplay, ISceneViewer and Camera objects regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl), the ArcGlobe application or a custom control or application implementing IGlobeCommandHook.
When using the GlobeHookHelper in the ICommand::OnCreate event of custom commands the following must be considered:
Constructor Summary | |
---|---|
GlobeHookHelper()
Constructs a GlobeHookHelper using ArcGIS Engine. |
|
GlobeHookHelper(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. GlobeHookHelper theGlobeHookHelper = (GlobeHookHelper) obj; |
Method Summary | |
---|---|
void |
addIHookHelperEventsListener(IHookHelperEvents theListener)
addIHookHelperEventsListener. |
void |
doAction(Object pUnknown,
int action)
Perform the action on the object. |
void |
doActionOnMultiple(IArray pArray,
int action)
Perform the action on the array of objects. |
void |
doActionWithName(Object pUnknown,
String name,
int action)
Perform the action on the object using the name. |
void |
doActionWithNameOnMultiple(IArray pArray,
IStringArray pNamesArray,
int action)
Perform the action on the array of objects using the array of names. |
void |
enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
enumConnectionPoints |
boolean |
equals(Object o)
Compare this object with another |
void |
findConnectionPoint(GUID riid,
IConnectionPoint[] ppCP)
findConnectionPoint |
ISceneViewer |
getActiveViewer()
Active scene viewer of hooked control or application. |
ICamera |
getCamera()
Camera of hooked control or application. |
static String |
getClsid()
getClsid. |
IGlobe |
getGlobe()
Globe of hooked control or application. |
IGlobeDisplay |
getGlobeDisplay()
GlobeDisplay of hooked control or application. |
Object |
getHook()
Hook object that should be the same as the hook object passed in ICommand::OnCreate. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isActionSupported(Object pUnknown,
int action)
Indicates whether the specified action can be performed on the object. |
boolean |
isActionSupportedOnMultiple(IArray pArray,
int action)
Indicates whether the specified action can be performed on the array of objects. |
void |
removeIHookHelperEventsListener(IHookHelperEvents theListener)
removeIHookHelperEventsListener. |
void |
setHookByRef(Object ppHook)
Hook object that should be the same as the hook object passed in ICommand::OnCreate. |
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 |
---|
public GlobeHookHelper() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic GlobeHookHelper(Object obj) throws IOException
GlobeHookHelper theGlobeHookHelper = (GlobeHookHelper) obj;
obj
to GlobeHookHelper
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addIHookHelperEventsListener(IHookHelperEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.controls.IHookHelperEvents interface.
IOException
- If there are communications problems.public void removeIHookHelperEventsListener(IHookHelperEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.controls.IHookHelperEvents interface.
IOException
- If there are communications problems.public void setHookByRef(Object ppHook) throws IOException, AutomationException
setHookByRef
in interface IGlobeHookHelper
ppHook
- A reference to another Automation Object (IDispatch) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getHook() throws IOException, AutomationException
The hook that is passed to the ICommand::OnCreate event. The hook is a GlobeControl or ArcGlobe.
getHook
in interface IGlobeHookHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGlobe getGlobe() throws IOException, AutomationException
The IGlobe object of the hook passed to the ICommand::OnCreate event. The Globe is returned regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl) or ArcGlobe.
This property can return Nothing if the GlobeControl has not been initialized to share a GlobeDisplay with another GlobeControl.
getGlobe
in interface IGlobeHookHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGlobeDisplay getGlobeDisplay() throws IOException, AutomationException
The IGlobeDisplay object of the hook passed to the ICommand::OnCreate event. The GlobeDisplay is returned regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl) or ArcGlobe.
This property can return Nothing if the GlobeControl has not been initialized to share a GlobeDisplay with another GlobeControl.
getGlobeDisplay
in interface IGlobeHookHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISceneViewer getActiveViewer() throws IOException, AutomationException
The ISceneViewer interface of the IGlobeViewer object of the hook passed to the ICommand::OnCreate event. The SceneViewer is returned regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl) or ArcGlobe.
getActiveViewer
in interface IGlobeHookHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICamera getCamera() throws IOException, AutomationException
The ICamera object of the hook passed to the ICommand::OnCreate event. The Camera is returned regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl) or ArcGlobe.
getCamera
in interface IGlobeHookHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
enumConnectionPoints
in interface IConnectionPointContainer
ppEnum
- A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
findConnectionPoint
in interface IConnectionPointContainer
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isActionSupported(Object pUnknown, int action) throws IOException, AutomationException
isActionSupported
in interface IHookActions
pUnknown
- A reference to another Object (IUnknown) (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isActionSupportedOnMultiple(IArray pArray, int action) throws IOException, AutomationException
isActionSupportedOnMultiple
in interface IHookActions
pArray
- A reference to a com.esri.arcgis.system.IArray (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void doAction(Object pUnknown, int action) throws IOException, AutomationException
DoAction performs the specified Action on the specified object in the ActiveView. For example, pass esriHookActionsZoom to zoom to the extent of the specified object. Use the ActionSupported method before DoAction is ensure the specified Action is supported.
pUnknown must be an object implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry should not be empty.
When passing DoAction an object implementing IPoint and esriHookActionsZoom, if the width of the specified geometry is zero, the display will be zoomed to 1/20th of the width of the full extent of the data. If the height of the current visible extent is less than 1/20th of the height of the full extent of the data, the current visible extent is used instead.
doAction
in interface IHookActions
pUnknown
- A reference to another Object (IUnknown) (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void doActionWithName(Object pUnknown, String name, int action) throws IOException, AutomationException
DoActionWithName performs the specified Action on the specified object with the specified name string in the ActiveView. For example, pass esriHookActionsLabel to label the specified object with the specfied label. Use the ActionSupported method before DoActionWithName is ensure the specified Action is supported.
pUnknown must be an object implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry should not be empty.
Name is the string used by esriHookActionsLabel and esriHookActionsCallout actions.
When passing DoActionWithName an object implementing IPoint and esriHookActionsZoom, if the width of the specified geometry is zero, the display will be zoomed to 1/20th of the width of the full extent of the data. If the height of the current visible extent is less than 1/20th of the height of the full extent of the data, the current visible extent is used instead.
doActionWithName
in interface IHookActions
pUnknown
- A reference to another Object (IUnknown) (in)name
- The name (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void doActionOnMultiple(IArray pArray, int action) throws IOException, AutomationException
DoActionOnMultiple performs the specified Action on the objects in the specified array in the ActiveView. For example, pass esriHookActionsZoom to zoom to the extent of the specified objects. Use the ActionSupportedOnMultiple method before DoActionOnMultiple is ensure the specified Action is supported.
pArray must contain objects implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry of each object should not be empty.
doActionOnMultiple
in interface IHookActions
pArray
- A reference to a com.esri.arcgis.system.IArray (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void doActionWithNameOnMultiple(IArray pArray, IStringArray pNamesArray, int action) throws IOException, AutomationException
DoActionWithNameOnMultiple performs the specified Action on the objects in the specified array in the ActiveView. For example, pass esriHookActionsLabel to label the specified objects with the specfied labels. Use the ActionSupportedOnMultiple method before DoActionWithNameOnMultiple is ensure the specified Action is supported.
pArray must contain objects implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry of each object should not be empty.
pNamesArray is an array of strings used by esriHookActionsLabel and esriHookActionsCallout actions.
Ensure pArray and pNamesArray contain the same number of elements.
doActionWithNameOnMultiple
in interface IHookActions
pArray
- A reference to a com.esri.arcgis.system.IArray (in)pNamesArray
- A reference to a com.esri.arcgis.system.IStringArray (in)action
- A com.esri.arcgis.controls.esriHookActions constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |