|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.framework.IDocumentProxy
public class IDocumentProxy
Provides access to other objects in the document.
The document object is called MxDocument in ArcMap and GxDocument in ArcCatalog.
Use the IDocument interface to get access to the document's title, type, accelerator table, commandbars collection, parent application, and Visual Basic project. Use IApplication::Document to get a reference to the document.
IApplication.getDocument()
,
Serialized FormField Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
IDocumentProxy()
|
|
IDocumentProxy(Object obj)
|
protected |
IDocumentProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
IAcceleratorTable |
getAccelerators()
The accelerator table for this document. |
ICommandBars |
getCommandBars()
The commandbars collection in this document. |
IUID |
getID()
The unique id for this document. |
IApplication |
getParent()
The application in which this document is open. |
String |
getTitle()
The title of this document. |
int |
getType()
The type of this document. |
Object |
getVBProject()
The VBProject for this document. |
void |
removeListener(String iidStr,
Object theListener)
|
Methods inherited from class com.esri.arcgis.interop.Dispatch |
---|
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean noncastable
Constructor Detail |
---|
public IDocumentProxy()
public IDocumentProxy(Object obj) throws IOException
IOException
protected IDocumentProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public IApplication getParent() throws IOException, AutomationException
getParent
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IApplication
public String getTitle() throws IOException, AutomationException
Title returns the name of the currently loaded document or template. It returns "Untitled" if the document has never been saved. If the document object is the Normal template, Title returns Normal.mxt.
Note that file extension is included with the name (e.g. MyDocument.mxd) if the Windows Explorer Folder Option "Hide extensions for known file types" is unchecked when the document is opened. Otherwise, Title returns the name without the file extension.
getTitle
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICommandBars getCommandBars() throws IOException, AutomationException
CommandBars is a collection of all the toolbars available to a document. The ICommandBars interface allows you to set properties for all the commandbars and to create, find, or hide commandbars.
getCommandBars
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ICommandBars
public IAcceleratorTable getAccelerators() throws IOException, AutomationException
An AcceleratorTable is an object that contains a list of accelerator keys and the command identifiers associated with them.
getAccelerators
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAcceleratorTable
public IUID getID() throws IOException, AutomationException
getID
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getType() throws IOException, AutomationException
Use the Type property to determine whether the document object is the document, a base template, or the Normal template. Type returns an esriDocumentType enumeration.
getType
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.esriDocumentType
public Object getVBProject() throws IOException, AutomationException
The VBProject property returns a reference to the VBA VBProject object associated with the document. Use the VBProject object to set properties for the project, to access the VBComponents collection (all the modules, class modules, forms, etc. in the project), and to access the References collection.
In the Visual Basic Editor in ArcMap, there can be up to three VBA projects. The document, the base template, and the Normal template all have a VBA project. In the following snapshot of the Project Explorer, the VBA project for the Normal template is called Normal (Normal.mxt). The VBA project for the current document is called Project (MyMap.mxd). This document is based on a template so there is also a VBA project for the template called TemplateProject (MyBase.mxt).
In the Visual Basic Editor in ArcCatalog, there is only one VBA project - Normal (Normal.gxt).
getVBProject
in interface IDocument
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 |