|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.arcgis.controls.SceneHookHelper
public class SceneHookHelper
Helps commands work with the SceneControl, ArcScene, and custom controls and applications.
The SceneHookHelper 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 SceneHookHelper object can do this. The SceneHookHelper is used to hold the hook and return the IScene, ISceneGraph, ISceneViewer and ICamera objects regardless of whether the hook is a SceneControl, ToolbarControl (with a 'buddy' SceneControl), the ArcScene application or a custom control or application implementing ISceneCommandHook.
When using the SceneHookHelper in the ICommand::OnCreate event of custom commands the following must be considered:
| Constructor Summary | |
|---|---|
SceneHookHelper()
Constructs a SceneHookHelper using ArcGIS Engine. |
|
SceneHookHelper(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. SceneHookHelper theSceneHookHelper = (SceneHookHelper) obj; |
|
| Method Summary | |
|---|---|
void |
addIHookHelperEventsListener(IHookHelperEvents theListener)
addIHookHelperEventsListener. |
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. |
Object |
getHook()
Hook object that should be the same as the hook object passed in ICommand::OnCreate. |
IScene |
getScene()
Scene of hooked control or application. |
ISceneGraph |
getSceneGraph()
SceneGraph of hooked control or application. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
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 SceneHookHelper()
throws IOException,
UnknownHostException
IOException - if there are interop problems
UnknownHostException - if there are interop problems
public SceneHookHelper(Object obj)
throws IOException
SceneHookHelper theSceneHookHelper = (SceneHookHelper) obj;
obj to SceneHookHelper.
obj - an object returned from ArcGIS Engine or Server
IOException - if there are interop problems| Method Detail |
|---|
public static String getClsid()
public boolean equals(Object o)
equals in class Objectpublic 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 ISceneHookHelperppHook - 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 SceneControl, ToolbarControl or ArcScene.
getHook in interface ISceneHookHelperIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IScene getScene()
throws IOException,
AutomationException
The IScene object of the hook passed to the ICommand::OnCreate event. The Scene is returned regardless of whether the hook is a SceneControl, ToolbarControl (with a 'buddy' SceneControl) or ArcScene.
getScene in interface ISceneHookHelperIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public ISceneGraph getSceneGraph()
throws IOException,
AutomationException
The ISceneGraph object of the hook passed to the ICommand::OnCreate event. The SceneGraph is returned regardless of whether the hook is a SceneControl, ToolbarControl (with a 'buddy' SceneControl) or ArcScene.
getSceneGraph in interface ISceneHookHelperIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public ISceneViewer getActiveViewer()
throws IOException,
AutomationException
The ISceneViewer object of the hook passed to the ICommand::OnCreate event. The ActiveViewer is returned regardless of whether the hook is a SceneControl, ToolbarControl (with a 'buddy' SceneControl) or ArcScene.
getActiveViewer in interface ISceneHookHelperIOException - 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 ActiveViewer is returned regardless of whether the hook is a SceneControl, ToolbarControl (with a 'buddy' SceneControl) or ArcScene.
getCamera in interface ISceneHookHelperIOException - 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 IConnectionPointContainerppEnum - 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 IConnectionPointContainerriid - 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 ISupportErrorInforiid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (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 | ||||||||