|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.carto.PageLayout
public class PageLayout
Page Layout class contains maps and map surrounds.
The PageLayout manages the layout of a hard copy output page. The PageLayout has a collection of elements organized as follows:
Printer - A reference to te application's printer. Managaes paper size, margins, and other settings.
Page - Manages the visual (on screen) representation of the printer page.
Elements - A list of map elements that are drawn on the page.
Graphics - A list of graphic elements that are drawn on the page.
ArcMap's layout view corresponds to the PageLayout object, and like all views, the PageLayout implements the IActiveView interface allowing it to take control of the main application window.
Constructor Summary | |
---|---|
PageLayout()
Constructs a PageLayout using ArcGIS Engine. |
|
PageLayout(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. PageLayout thePageLayout = (PageLayout) obj; |
Method Summary | |
---|---|
void |
activate(int hWnd)
Gives this view control of the specified window. |
void |
addElement(IElement element,
int zorder)
Add a new graphic element to the layer. |
void |
addElements(IElementCollection elements,
int zorder)
Add new graphic elements to the layer. |
void |
addExtension(Object ext)
Adds a new extension. |
void |
addIActiveViewEventsListener(IActiveViewEvents theListener)
addIActiveViewEventsListener. |
void |
addSnapAgent(IGraphicSnap snapAgent)
Add a new snap agent to the environment. |
void |
animationRefresh(int phase,
Object data,
IEnvelope envelope)
Use to quickly redraw a phase that has it's own cache, i.e., a tracking layer. |
void |
animationRefreshShape(int phase,
Object data,
IGeometry geometry,
double symbolSizePoints)
Use to quickly redraw a phase that has it's own cache, i.e., a tracking layer. |
void |
boundsUpdated(ITransformEventsBoundsUpdatedEvent theEvent)
Notifies clients when the bounds is updated. |
void |
bringForward(IEnumElement elements)
Move the specified elements one step closer to the top of the stack of elements. |
void |
bringToFront(IEnumElement elements)
Make the specified elements draw in front of all other elements. |
void |
clear()
Empties the view contents. |
void |
clearContent()
Clears the elements without dismantling them. |
void |
clearSnapAgents()
Remove all snap agents. |
void |
contentsChanged()
Called by clients when view objects are modified. |
void |
deactivate()
Another view takes over the associated window. |
void |
deleteAllElements()
Delete all the elements. |
void |
deleteElement(IElement element)
Delete the given element. |
void |
deleteSnapAgent(IGraphicSnap snapAgent)
Remove specified snap agent from the environment. |
void |
deviceFrameUpdated(ITransformEventsDeviceFrameUpdatedEvent theEvent)
Notifies clients when the device frame is updated. |
void |
draw(int hDC,
ITrackCancel trackCancel)
Draws the view to the specified device context. |
boolean |
elementSelected(IElement element)
Indicates if the element is selected. |
void |
enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
enumConnectionPoints |
boolean |
equals(Object o)
Compare this object with another |
void |
findConnectionPoint(GUID riid,
IConnectionPoint[] ppCP)
findConnectionPoint |
IFrameElement |
findFrame(Object frameObject)
Find the frame that contains the specified object. |
void |
focusNextMapFrame()
Focus the next map. |
void |
focusPreviousMapFrame()
Focus the previous map. |
IActiveView |
getActiveView()
The Map object. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
Object |
getContentProvider()
The object that is currently managing the content of the layout. |
void |
getContextMenu(double x,
double y,
IUID[] clsidMenu)
Called when a context menu should be displayed at the given xy location. |
IElement |
getDominantElement()
Dominant element. |
Object |
getElementOrder(IEnumElement elements)
Private order object. |
ISelection |
getElementSelection()
Object to use for element selection. |
int |
getElementSelectionCount()
The number of selected elements. |
tagRECT |
getExportFrame()
The device rectangle to export. |
Object |
getExtension(int index)
The extension at the specified index. |
int |
getExtensionCount()
Number of extensions. |
IEnvelope |
getExtent()
The visible extent rectangle. |
IExtentStack |
getExtentStack()
The extent stack. |
IMap |
getFocusMap()
The map that tools and controls act on. |
IEnvelope |
getFullExtent()
The full extent rectangle. |
IGraphicsContainer |
getGraphicsContainer()
The active graphics container. |
ISnapGuides |
getHorizontalSnapGuides()
The horizontal snapping guides. |
IMap |
getMap()
The Map object. |
int |
getOutputBandSize()
Size allocated for each band when banding output. |
IPage |
getPage()
The page. |
IPageLayout |
getPageLayout()
The PageLayout object. |
IPrinter |
getPrinter()
The associated printer. |
IRulerSettings |
getRulerSettings()
The ruler settings. |
short |
getScreenCacheID(int phase,
Object data)
The screen cache ID that is used to draw the specified phase. |
IScreenDisplay |
getScreenDisplay()
The screen display used by the view. |
IEnumElement |
getSelectedElements()
The selected elements. |
ISelection |
getSelection()
The selection. |
IEnvelope |
getSelectionBounds(IDisplay display)
The bounds of the selection. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
IGraphicSnap |
getSnapAgent(int index)
The snap agent at the specified index. |
int |
getSnapAgentCount()
The number of snap agents. |
IArray |
getSnapAgentOrder()
An array of IDs indicating how agents should be ordered. |
ISnapGrid |
getSnapGrid()
The snapping grid. |
double |
getSnapTolerance()
The snap tolerance in page units. |
String |
getTipText(double x,
double y)
The tip text to display at the given location. |
int |
getTopFilterIndex()
Phase index that supplements TopFilterPhase. |
int |
getTopFilterPhase()
The highest phase in the drawing order that uses a display filter. |
ISnapGuides |
getVerticalSnapGuides()
The vertical snapping guides. |
double |
getZoomPercent()
The current zoom percent. |
int |
hashCode()
the hashcode for this object |
IMap |
hitTestMap(IPoint location)
Returns any maps present in the view at the given location. |
boolean |
isActive()
Indicates if view is active or not. |
boolean |
isAlignToMargins()
Indicates if graphics will be aligned to the margins or to each other. |
boolean |
isConserveMemory()
Indicates whether to be conservative when allocating resources. |
boolean |
isDelayBackgroundDraw()
Indicates if the background should draw immediately. |
boolean |
isDelayEvents()
Indicates if the layout stops firing events until the flag is set to false. |
void |
isDirty()
isDirty |
boolean |
isDrawing()
Indicates whether the view is currently drawing or not. |
boolean |
isExternalDrawing(int phase)
Indicates if external clients are drawing in response to the specified phase. |
boolean |
isMapActivated()
Indicates if the focus map is activated. |
boolean |
isProgressiveDrawing()
Indicates whether the view should progressively update the window during drawing. |
boolean |
isShowRulers()
Indicates if rulers are visible. |
boolean |
isShowScrollBars()
Indicates if scrollbars are visible. |
boolean |
isShowSelection()
Indicates if selection is visible. |
boolean |
isUsesFilter()
Indicates if the current object draws using a filter. |
boolean |
isUsesPageCoordinates()
Indicates whether view uses page coordinates. |
boolean |
isVerboseEvents()
Indicates whether to expand or limit the number of events that are fired. |
void |
load(IStream pstm)
load |
IEnumElement |
locateElements(IPoint point,
double tolerance)
Returns the elements at the given coordinate. |
IEnumElement |
locateElementsByEnvelope(IEnvelope envelope)
Returns the elements inside the given envelope. |
void |
moveElementFromGroup(IGroupElement group,
IElement element,
int zorder)
Move the element from the group to the container. |
void |
moveElementToGroup(IElement element,
IGroupElement group)
Move the element from the container to the group. |
IElement |
next()
Returns the next graphic in the container. |
void |
onMessage(int msg,
int wParam,
int lParam)
Call from your application's message loop to enable automatic resizing and keyboard accelerators. |
void |
output(int hDC,
int dpi,
tagRECT pixelBounds,
IEnvelope visibleBounds,
ITrackCancel trackCancel)
Renders the view to the specified DC. |
void |
pageColorChanged(IPageEventsPageColorChangedEvent theEvent)
Fired when the page color changes. |
void |
pageMarginsChanged(IPageEventsPageMarginsChangedEvent theEvent)
Fired when the page margins change. |
void |
pageSizeChanged(IPageEventsPageSizeChangedEvent theEvent)
Fired when the page size changes. |
void |
pageUnitsChanged(IPageEventsPageUnitsChangedEvent theEvent)
Fired when the units used by the page changes. |
void |
partialRefresh(int phase,
Object data,
IEnvelope envelope)
Draws the specified view phase. |
void |
partialRefreshShape(int phase,
Object data,
IGeometry geometry,
double symbolSizePoints)
Refreshes the specified shape on the specified view phase. |
void |
printerChanged(IPrinter printer)
Called by application when printer changes. |
void |
putElementOrder(Object order)
Private order object. |
void |
readExternal(ObjectInput in)
|
void |
refresh()
Causes the entire view to draw. |
void |
refreshCaches()
Reallocate the display caches. |
void |
refreshItem(Object data)
Use to redraw a specific item and the content above it. |
void |
removeExtension(int index)
Removes the specified extension. |
void |
removeIActiveViewEventsListener(IActiveViewEvents theListener)
removeIActiveViewEventsListener. |
void |
replaceMaps(IMaps maps)
Replace the maps in the data frames with the specified maps. |
void |
reset()
Reset internal cursor so that Next returns the first element. |
void |
resolutionUpdated(ITransformEventsResolutionUpdatedEvent theEvent)
Notifies clients when the resolution is updated. |
void |
rotationUpdated(ITransformEventsRotationUpdatedEvent theEvent)
Notifies clients when the rotation angle is updated. |
void |
save(IStream pstm,
int fClearDirty)
save |
void |
selectAllElements()
Selects all elements. |
IElement |
selectedElement(int index)
Returns the nth selected element. |
void |
selectElement(IElement element)
Selects the specified element. |
void |
selectElements(IEnumElement elements)
Selects the specified elements. |
void |
selectionChanged(ISelectionEventsSelectionChangedEvent theEvent)
Call this function to fire the selection changed event. |
ISelectionTracker |
selectionTracker(int index)
Returns the tracker for the nth selected element. |
void |
sendBackward(IEnumElement elements)
Move the specified elements one step closer to the bottom of the stack of elements. |
void |
sendToBack(IEnumElement elements)
Make the specified elements draw behind all other elements. |
void |
setAlignToMargins(boolean alignToMargins)
Indicates if graphics will be aligned to the margins or to each other. |
void |
setConserveMemory(boolean flag)
Indicates whether to be conservative when allocating resources. |
void |
setContentProviderByRef(Object provider)
The object that is currently managing the content of the layout. |
void |
setDelayBackgroundDraw(boolean flag)
Indicates if the background should draw immediately. |
void |
setDelayEvents(boolean delayEvents)
Indicates if the layout stops firing events until the flag is set to false. |
void |
setDominantElementByRef(IElement dominantItem)
Dominant element. |
void |
setElementSelectionByRef(ISelection selectionObject)
Object to use for element selection. |
void |
setExtent(IEnvelope extent)
The visible extent rectangle. |
void |
setExternalDrawing(int phase,
boolean externalDrawing)
Indicates if external clients are drawing in response to the specified phase. |
void |
setFocusMapByRef(IMap activeMap)
The map that tools and controls act on. |
void |
setFullExtent(IEnvelope extent)
The full extent rectangle. |
void |
setIsMapActivated(boolean isMapActivated)
Indicates if the focus map is activated. |
void |
setOutputBandSize(int kilobytes)
Size allocated for each band when banding output. |
void |
setProgressiveDrawing(boolean flag)
Indicates whether the view should progressively update the window during drawing. |
void |
setSelectionByRef(ISelection selection)
The selection. |
void |
setShowRulers(boolean showRulers)
Indicates if rulers are visible. |
void |
setShowScrollBars(boolean showScrollBars)
Indicates if scrollbars are visible. |
void |
setShowSelection(boolean showRulers)
Indicates if selection is visible. |
void |
setSnapAgentOrder(IArray guids)
An array of IDs indicating how agents should be ordered. |
void |
setSnapTolerance(double tol)
The snap tolerance in page units. |
void |
setTopFilterIndex(int phaseIndex)
Phase index that supplements TopFilterPhase. |
void |
setTopFilterPhase(int phase)
The highest phase in the drawing order that uses a display filter. |
void |
setVerboseEvents(boolean verboseEvents)
Indicates whether to expand or limit the number of events that are fired. |
void |
snapShape(IGeometry shape)
Snap the shape using the agents in the environment. |
void |
unitsUpdated(ITransformEventsUnitsUpdatedEvent theEvent)
Notifies clients when the units are updated. |
void |
unselectAllElements()
Unselects all elements. |
void |
unselectElement(IElement element)
Unselects the specified element. |
void |
unselectElements(IEnumElement elements)
Unselects the specified elements. |
void |
updateElement(IElement element)
The graphic element's properties have changed. |
void |
visibleBoundsUpdated(ITransformEventsVisibleBoundsUpdatedEvent theEvent)
Notifies clients when the visible bounds is updated. |
void |
writeExternal(ObjectOutput out)
|
void |
zoomToPercent(int percent)
Magnify the page by a certain percentage. |
void |
zoomToWhole()
Fit the whole page in the window. |
void |
zoomToWidth()
Fit the width of the page to the screen. |
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 PageLayout() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic PageLayout(Object obj) throws IOException
PageLayout thePageLayout = (PageLayout) obj;
obj
to PageLayout
.
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 addIActiveViewEventsListener(IActiveViewEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IActiveViewEvents interface.
IOException
- If there are communications problems.public void removeIActiveViewEventsListener(IActiveViewEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IActiveViewEvents interface.
IOException
- If there are communications problems.public IPage getPage() throws IOException, AutomationException
Returns an IPage reference on the Page object. The PageLayout object has a Page object which manages the visual (on screen) representation of the printer page.
getPage
in interface IPageLayout
getPage
in interface IPageLayout2
getPage
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPage
,
Page
public IRulerSettings getRulerSettings() throws IOException, AutomationException
You can use rulers, guides, and grids in layout view to align elements on the page. Rulers show the size of the page and elements on the final printed map.
This property returns an IRulerSettings reference on the RulerSettings object. The PageLayout object has a RulerSettings object which manages ruler settings. IRulerSettings only has one property, SmallestDivision. This property controls the size of the smallest ruler division in page units. For example, if the page size is 8.5 by 11 inches, and the SmallestDivision is set to 2, the rulers, seen in layout view, will read off every 2 inches; if the property is set to .1, the rulers will read of every 1/10 of an inch.
<pre>MapControl pMapControl = new MapControl();
IRulerSettings pRulerSettings;
pRulerSettings = pMapControl.getPageLayout().getRulerSettings();
pRulerSettings.setSmallestDivision(2);
pMapControl.getActiveView().refresh();</pre>
</font>
getRulerSettings
in interface IPageLayout
getRulerSettings
in interface IPageLayout2
getRulerSettings
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISnapGrid getSnapGrid() throws IOException, AutomationException
You can use rulers, guides, and grids in layout view to align elements on the page. A grid is a grid of reference points on the layout that you can use to position elements. The grid may be used as a visual indicator of size and position. The grid can also be used to snap elements into position.
This property returns an ISnapGrid reference on the SnapGrid object.
getSnapGrid
in interface IPageLayout
getSnapGrid
in interface IPageLayout2
getSnapGrid
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISnapGuides getHorizontalSnapGuides() throws IOException, AutomationException
You can use rulers, guides, and grids in layout view to align elements on the page. Guides are straight lines that you can use to align elements on the page.
The PageLayout object has two SnapGuides objects, one for managing horizontal guides and one for managing vertical guides. This property returns an ISnapGuides reference on the horizontal SnapGuides object.
getHorizontalSnapGuides
in interface IPageLayout
getHorizontalSnapGuides
in interface IPageLayout2
getHorizontalSnapGuides
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISnapGuides getVerticalSnapGuides() throws IOException, AutomationException
You can use rulers, guides, and grids in layout view to align elements on the page. Guides are straight lines that you can use to align elements on the page.
The PageLayout object has two SnapGuides objects, one for managing horizontal guides and one for managing vertical guides. This property returns an ISnapGuides reference on the vertical SnapGuides object.
getVerticalSnapGuides
in interface IPageLayout
getVerticalSnapGuides
in interface IPageLayout2
getVerticalSnapGuides
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getZoomPercent() throws IOException, AutomationException
This property reports the current zoom factor. Use ZoomToPercent, ZoomToWhole, or ZoomToWidth to change the zoom factor.
getZoomPercent
in interface IPageLayout
getZoomPercent
in interface IPageLayout2
getZoomPercent
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
public void setAlignToMargins(boolean alignToMargins) throws IOException, AutomationException
setAlignToMargins
in interface IPageLayout
setAlignToMargins
in interface IPageLayout2
setAlignToMargins
in interface IPageLayout3
alignToMargins
- The alignToMargins (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAlignToMargins() throws IOException, AutomationException
Align tools can either align select elements with each other or with the margins of the map. When this property is set to TRUE, the align tools will snap the selected elements to the margins of the map. When this property is set to FALSE, the align tools align the selected elements with each other.
isAlignToMargins
in interface IPageLayout
isAlignToMargins
in interface IPageLayout2
isAlignToMargins
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void zoomToWidth() throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
zoomToWidth
in interface IPageLayout
zoomToWidth
in interface IPageLayout2
zoomToWidth
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
public void zoomToWhole() throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
zoomToWhole
in interface IPageLayout
zoomToWhole
in interface IPageLayout2
zoomToWhole
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
public void zoomToPercent(int percent) throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
zoomToPercent
in interface IPageLayout
zoomToPercent
in interface IPageLayout2
zoomToPercent
in interface IPageLayout3
percent
- The percent (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
public void focusNextMapFrame() throws IOException, AutomationException
Changes the focus map to the next MapFrame in the collection. This method fires the IActiveViewEvents::FocusMapChanged event.
In ArcMap's layout view, the tab key switches the focus map to the next map. Shift-tab changes the focus map to the previous map.
focusNextMapFrame
in interface IPageLayout
focusNextMapFrame
in interface IPageLayout2
focusNextMapFrame
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void focusPreviousMapFrame() throws IOException, AutomationException
Changes the focus map to the previous MapFrame in the collection. This method fires the IActiveViewEvents::FocusMapChanged event.
In ArcMap's layout view, the tab key switches the focus map to the next map. Shift-tab changes the focus map to the previous map.
focusPreviousMapFrame
in interface IPageLayout
focusPreviousMapFrame
in interface IPageLayout2
focusPreviousMapFrame
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void replaceMaps(IMaps maps) throws IOException, AutomationException
replaceMaps
in interface IPageLayout
replaceMaps
in interface IPageLayout2
replaceMaps
in interface IPageLayout3
maps
- A reference to a com.esri.arcgis.carto.IMaps (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setContentProviderByRef(Object provider) throws IOException, AutomationException
setContentProviderByRef
in interface IPageLayout2
setContentProviderByRef
in interface IPageLayout3
provider
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getContentProvider() throws IOException, AutomationException
getContentProvider
in interface IPageLayout2
getContentProvider
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearContent() throws IOException, AutomationException
clearContent
in interface IPageLayout2
clearContent
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPrinter getPrinter() throws IOException, AutomationException
getPrinter
in interface IPageLayout2
getPrinter
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDelayEvents() throws IOException, AutomationException
isDelayEvents
in interface IPageLayout3
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDelayEvents(boolean delayEvents) throws IOException, AutomationException
setDelayEvents
in interface IPageLayout3
delayEvents
- The delayEvents (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getFullExtent() throws IOException, AutomationException
The full extent of the view. In ArcMap's data view, the full extent is the full extent of all layers and it is automatically calculated whenever the spatial reference changes and when layers are added or removed with AddLayer, AddLayers, or DeleteLayer. In layout view, the full extent is the page size expanded some and it is automatically set whenever the page size changes.
This property is a shortcut to the bounds of the ActiveView's ScreenDisplay (accessed via IDisplayTransformation::Bounds) .
getFullExtent
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IDisplayTransformation.getBounds()
,
IDisplayTransformation
,
IActiveView.getFullExtent()
public void setFullExtent(IEnvelope extent) throws IOException, AutomationException
setFullExtent
in interface IActiveView
extent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
The Extent property holds the visible area of the view. The Extent is automatically captured whenever the view's transformation changes. For example, when the active view is a Map, the Extent is modified whenever the spatial reference changes. Also, the Extent is set the first time a layer is added to a Map. In layout view, the Extent is initially set to the page size. In both layout view and data view, zooming in our out changes the Extent.
The Extent is always adjusted to fit the device frame and it is persisted in the map document.
getExtent
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IDisplayTransformation.getVisibleBounds()
,
ITin.getExtent()
,
IActiveView.getExtent()
,
IFeatureClassManage.updateExtent()
,
IFeatureClassManage
,
IDisplayTransformation.getFittedBounds()
public void setExtent(IEnvelope extent) throws IOException, AutomationException
setExtent
in interface IActiveView
extent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IScreenDisplay getScreenDisplay() throws IOException, AutomationException
Each view has a ScreenDisplay object which controls drawing in the application's window. Use this property to get a reference to the ScreenDisplay object associated with the view you are currently working with. For example, to draw a polygon in data view, you must get an IActiveView reference on the focus Map object and then get a reference to its ScreenDisplay object via this property. If you are in data view and you mistakenly get an IActiveView reference on the PageLayout object, you will not see the polygon as you are drawing in the wrong view.
Each ScreenDisplay object has a DisplayTransformation object which is accessible via IDisplay::DisplayTransformation (ScreenDisplay inherits from Display ). Each DisplayTransformation related to a Map, holds onto the map's spatial reference (IDisplayTransformation::SpatialReference ) and has useful methods for converting between device units and map units. The PageLayout's DisplayTransformation does not have a spatial reference, the property returns nothing, and in this case its members map between device units and page units.
getScreenDisplay
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGraphicsContainer getGraphicsContainer() throws IOException, AutomationException
Both the Map and PageLayout objects are graphics containers - both implement the IGraphicsContainer interface.
The Map has a Basics Graphics Layer and this property returns a reference to that object (see CompositeGraphicsLayer and IMap::BasicGraphicsLayer). When working with a Map object, you can also perform a query interface from any of the interfaces the Map implements, IMap for example, to IGraphicsContainer. The QI also takes you to the CompositeGraphicsLayer object. These are both possible because the Map aggregates the Basic Graphics Layer.
The PageLayout object works differently. The PageLayout does not have a Basics Graphics Layer; instead, the PageLayout object is its own graphics container having its own implementation of IGraphicsContainer. A QI from IPageLayout to IGraphicsContainer connects you with the graphics container associated strictly with the PageLayout. However, this property, IActiveView::GraphicsContainer, on the PageLayout object has two possible outcomes. If a Map is activated (IActiveView::IsMapActivated), the property will return a reference to the focus Map's active graphics layer (IMap::ActiveGraphicsLayer ). If no Map is activated, the property will return a reference to the PageLayout's graphics container - the same as the QI case.
getGraphicsContainer
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap getFocusMap() throws IOException, AutomationException
A user's map may comprise one or more Map objects. Each Map object typically holds layers of data as well as several MapSurround objects such as a Legend. This property returns an IMap reference to the Map object that currently has focus. In ArcMap, the focus map is the one visible in data view and the one selected in layout view.
Changing the focus map fires the IActiveViewEvents::FocusMapChanged event. In ArcMap, the focus map is automatically set to any new Map added.
IMxDocument::FocusMap is a read-only short cut to this property.
getFocusMap
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.carto.IMxDocument
public void setFocusMapByRef(IMap activeMap) throws IOException, AutomationException
setFocusMapByRef
in interface IActiveView
activeMap
- A reference to a com.esri.arcgis.carto.IMap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isMapActivated() throws IOException, AutomationException
In ArcMap's layout view, when the focus map is activated by double-clicking on it, new graphic elements are added to the Map's active graphics layer. When the focus map is not activated, the default, graphic elements are added to the PageLayout object. Both the Map and PageLayout objects are graphics containers, setting this property to TRUE diverts graphics from the PageLayout to the focus Map.
A Map can be activated in both layout and data views.
When this property is set to TRUE, IActiveView::PartialRefresh is called for the esriViewGraphicSelection draw phase.
isMapActivated
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.carto.IMxDocument
public void setIsMapActivated(boolean isMapActivated) throws IOException, AutomationException
setIsMapActivated
in interface IActiveView
isMapActivated
- The isMapActivated (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISelection getSelection() throws IOException, AutomationException
ArcMap has two different selection types, a feature selection and an element selection. Two different objects represent these selections and both implement the ISelection interface. The feature selection object additionally implements IEnumFeature and the element selection object IEnumElement. The ISelection interface is used for clipboard type operations and the IEnum interfaces are used to loop through the items in the collection.
Each active view object, the PageLayout and all Maps, have their own selection objects. Actually, the PageLayout only has an element selection but each Map has a unique feature and element selection. When working with selections make sure you have the correct active view object.
For a Map, only one of the selections can be active at a time. As mentioned above, this interface provides an ISelection reference to either an element or feature selection depending on which one is currently active. To simplify the matter, IMap has a FeatureSelection property which always returns an ISelection on the feature selection, from which you can obtain an IEnumFeature reference. Just make sure you have the correct Map, usually the FocusMap. To get a Map's element selection, use IViewManager::ElementSelection.
Note: The features returned as part of IEnumFeature are in the spatial reference of the map, so they have the coordinate system and the resolution (1/precision) of the map.
getSelection
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IActiveView.getSelection()
,
IGraphicsContainerSelect
,
IMap.getFeatureSelection()
,
IEnumElement
public void setSelectionByRef(ISelection selection) throws IOException, AutomationException
setSelectionByRef
in interface IActiveView
selection
- A reference to a com.esri.arcgis.carto.ISelection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getTipText(double x, double y) throws IOException, AutomationException
getTipText
in interface IActiveView
x
- The x (in)y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public tagRECT getExportFrame() throws IOException, AutomationException
Returns the area of the view to be exported.
For Maps, this is always the area corresponding to the constrained bounds (IDisplayTransformation::ContstrainedBounds), i.e., the visible bounds intersected with the full bounds. The coordinates are automatically converted, using IDisplayTransformation::TransformRect, from world units to device units.
For PageLayout, this is always the height and width of the page in device units (pixels) when the layout is zoomed to 100%. Because these values are independent of the layout's current zoom level and always correspond to the page instead of the full client area of the application, they are ideal for use when exporting a map to a graphics file. Assign the values of the ExportFrame property to the Export object's PixelBounds property.
getExportFrame
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowScrollBars() throws IOException, AutomationException
IActiveView::ShowScrollBars is a short cut to IScreenDisplay::UseScrollBars. Changes to this property are not reflected until the active view changes. For example, when in layout view in ArcMap, programmatically changing the PageLayout to not show its scrollbar will have no effect until the next time the active view is set to the PageLayout - calling IActiveView::Refresh has no effect.
ArcMap uses this property to hide Map's scroll bars when in layout view. Programmatically trying to display a Map's scroll bar in layout view will have no effect, for Maps this setting is only honored in data view and again it requires an active view change before the setting is reflected in the applications window.
isShowScrollBars
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowScrollBars(boolean showScrollBars) throws IOException, AutomationException
setShowScrollBars
in interface IActiveView
showScrollBars
- The showScrollBars (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowRulers() throws IOException, AutomationException
This property is a boolean flag that applications use to determine whether or not to draw rulers.
This property cannot be set for Maps, they always have rulers turned off.
The PageLayout is the only active view with rulers; an active view change is required before the setting is reflected in the applications window.
isShowRulers
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowRulers(boolean showRulers) throws IOException, AutomationException
setShowRulers
in interface IActiveView
showRulers
- The showRulers (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowSelection() throws IOException, AutomationException
This property is primarily used to hide a Map's element selection in layout view unless a Map has been activated.
When in layout view, the PageLayout always has its ShowSelection set to true, setting it to false has no effect. Similarly, when in data view, the focus Map always has its ShowSelection set to true and this cannot be overridden.
isShowSelection
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowSelection(boolean showRulers) throws IOException, AutomationException
setShowSelection
in interface IActiveView
showRulers
- The showRulers (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IExtentStack getExtentStack() throws IOException, AutomationException
Returns a reference to the active view's extent stack. Each active view has an extent stack which remembers previous extents so that users can 'go back' and then 'go forward' to previous extents.
Map map = new Map();
IExtentStack pExtentStack = map.getActiveView().getExtentStack();
if(pExtentStack.canUndo()){
pExtentStack.undo();}
getExtentStack
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public short getScreenCacheID(int phase, Object data) throws IOException, AutomationException
getScreenCacheID
in interface IActiveView
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)data
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap hitTestMap(IPoint location) throws IOException, AutomationException
Use this method on a PageLayout to find the nearest Map based on a point location. For example, when ArcMap's identify tool is used in Layout view, the tool first finds the Map clicked on before it searches for features in the Map.
When using this method on a PageLayout, for the
Location parameter, set up the Point in
page coordinates. To convert from device coordinates to page
coordinates:
Use this method on a Map to obtain a reference to it through IMap.
hitTestMap
in interface IActiveView
location
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isActive() throws IOException, AutomationException
In layout view, all of the Maps and the PageLayout are active. In data view, only the focus map is active.
The PageLayout object uses this property when adding Elements; if the PageLayout is active, new elements are activated (IElement::Activate).
isActive
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void activate(int hWnd) throws IOException, AutomationException
Called to establish the current object as the active view. For example, view commands deactivate (IActiveView::Deactivate) the current view (IMxDocument::ActiveView) before calling Activate on their own associated view.
When working with the IActiveView interface on a MapDocument object, you should always first call IActiveView::Activate() in order to properly initialize the display of the PageLayout or Map object. The MxDocument and MapServer objects and the MapControl and PageLayoutControl all initialize display objects automatically after opening an MXD, but MapDocument does not do this, so you should call Activate() before working with any other members of IActiveView. If your application has a user interface, you should call Activate() with the hWnd of the application's client area. If your application runs in the background and has no windows, you can always get a valid hWnd from the GDI GetDesktopWindow() function, part of the Win32 API.
activate
in interface IActiveView
hWnd
- The hWnd (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deactivate() throws IOException, AutomationException
Called to deactivate the current active view. For example, view commands deactivate (IActiveView::Deactivate) the current view (IMxDocument::ActiveView) before calling Activate on their own associated view.
deactivate
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void draw(int hDC, ITrackCancel trackCancel) throws IOException, AutomationException
draw
in interface IActiveView
hDC
- The hDC (A COM typedef) (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void output(int hDC, int dpi, tagRECT pixelBounds, IEnvelope visibleBounds, ITrackCancel trackCancel) throws IOException, AutomationException
This method is used to draw to a non-app window hDC (see Windows GDI for more info). The ArcMap printing and exporting commands use this method. When drawing to an hWnd, normally IActiveView::Draw is used instead of this method because it handles caching and scrollbars.
Parameter use is as follows:
hDC - Output device.
dpi - Dots per inch (resolution). If Null is passed then this defaults to the resolution of the hDC. If that cannot be sampled, then this defaults to the window resolution.
pixelBounds - Device rectangle specified in pixels.
VisibleBounds - Zoom extent. If Null is passed then this defaults to the current visible extent.
All other display attributes are copied from the ActiveView.
If you want to draw the data frame to a 640x480 bitmap for example, specify the following parameter values:
dpi - 0
pixel bounds - { 0, 0, 640, 480 }
visible bounds - 0
If you want to create a bitmap that will print 8.5 x 11 on a 300 DPI printer, specify the following parameter values:
dpi - 300
pixel bounds - { 0, 0, 8.5 * dpi, 11 * dpi }
visible bounds - 0
If you want to zoom to a certain location and draw it on a 300x300 bitmap, specify the following parameter values:
dpi - 0
pixel bounds - { 0, 0, 300, 300 }
visible bounds - { -45.0, 44.0, -44.0, 45.0 }
The value of IDisplayTransformation::Resolution does not affect the results of this method.
The value of IOutputRasterSettings::ResampleRatio does affect the results of the this method. When rasters are drawn, they get resampled as specified in this attribute.
output
in interface IActiveView
hDC
- The hDC (A COM typedef) (in)dpi
- The dpi (in)pixelBounds
- A Structure: com.esri.arcgis.system.tagRECT (in)visibleBounds
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refresh() throws IOException, AutomationException
IActiveView::Refresh invalidates all of the caches. This is a very inefficient operation; typically data from just one source has to be reread from the database and the rest can be drawn from cache. IActiveView::PartialRefresh uses it's knowledge of the cache layout to invalidate as little as possible and should be used whenever possible.
refresh
in interface IActiveView
refresh
in interface IViewRefresh
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.esriViewDrawPhase
,
IGlobeLayerProperties2
,
IActiveView.partialRefresh(int, java.lang.Object, com.esri.arcgis.geometry.IEnvelope)
,
IScreenDisplay.invalidate(com.esri.arcgis.geometry.IEnvelope, boolean, short)
,
IActiveView.getScreenCacheID(int, java.lang.Object)
,
IActiveView.refresh()
public void partialRefresh(int phase, Object data, IEnvelope envelope) throws IOException, AutomationException
The main application window is controlled by a view (IActiveView). ArcMap currently has two view objects: Map (data view) and PageLayout (layout view). Each view has a ScreenDisplay object which performs drawing operations. The ScreenDisplay object also makes it possible for clients to create any number of caches. A cache is an off screen bitmap representing the application's window. Instead of drawing directly to the screen, graphics are drawn into caches, then the caches are drawn on the screen. When the application's window is obscured and requires redrawing, it is done so from the caches instead of from a database. In this way, caches improve drawing performance - bitmap rendering is faster than reading and displaying data from a database.
In general, the Map creates three caches: one for all the layers, another if there are annotation or graphics, and a third cache if there is a feature selection. A layer can create its own private cache if it sets ILayer::Cached equal to TRUE. In this case, the Map will create a separate cache for the layer and groups the layers above and below it into different caches.
IActiveView::PartialRefresh uses its knowledge of the cache layout to invalidate as little as possible. IActiveView::Refresh , on the other hand, invalidates all the caches which is very inefficient. Use PartialRefresh whenever possible.
Both PartialRefresh and Refresh call IScreenDisplay::Invalidate which sets a flag clients watch for. Clients draw a cache from scratch (the database) if its flag is set to true, and from cache if the flag is set to false.
The following table shows the phases each view supports and what they map to:
phase | Map | Layout |
---|---|---|
esriViewBackground | Map grids | Page/snap grid |
esriViewGeography | Layers | Unused |
*esriViewGeoSelection | Feature selection | Unused |
esriViewGraphics | Labels/graphics | Graphics |
esriViewGraphicSelection | Graphic selection | Element selection |
esriViewForeground | Unused | Snap guides |
To specify multiple draw phases, combine individual phases together using a bitwise OR. This is equivalent to adding together the integer enumeration values. For example, pass 6 to invalidate both the esriViewGeography (2) and esriViewGeoSelection (4) phases.
Use the data parameter to invalidate just a specific piece of data. For example, if a layer is loaded and its cache property is set to TRUE, this layer alone can be invalidated. A tracking layer is a good example of this.
The envelope parameter specifies a region to invalidate. For example, if a graphic element is added, it is usually only necessary to invalidate the immediate area surrounding the new graphic.
Both the data and envelope parameters are optional.
*When selecting features, you must call PartialRefresh twice, once before and once after the selection operation.
partialRefresh
in interface IActiveView
partialRefresh
in interface IViewRefresh
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)data
- A reference to another Object (IUnknown) (in)envelope
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.esriViewDrawPhase
,
IGlobeLayerProperties2
,
IActiveView.partialRefresh(int, java.lang.Object, com.esri.arcgis.geometry.IEnvelope)
,
IScreenDisplay.invalidate(com.esri.arcgis.geometry.IEnvelope, boolean, short)
,
IActiveView.getScreenCacheID(int, java.lang.Object)
,
IActiveView.refresh()
public void clear() throws IOException, AutomationException
The Map object's implementation of Clear deletes all of the Layers in the Map (IMap::ClearLayers ), removes all MapSurrounds (IMap::ClearSurrounds ), removes all bookmarks (IMapBookMarks::RemoveAllBookMarks), and resets the extent stack. Clear does not refresh the active view however.
Clear on PageLayout deletes all Elements, including MapFrames which hold a Map, resets the extent stack, and a new Map is created - there must always be a focus map.
clear
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void printerChanged(IPrinter printer) throws IOException, AutomationException
printerChanged
in interface IActiveView
printer
- A reference to a com.esri.arcgis.output.IPrinter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void contentsChanged() throws IOException, AutomationException
After modifying the contents view (table of contents), use this method to fire the IActiveViewEvents::ContentsChanged event so that clients listening for this event can respond accordingly.
contentsChanged
in interface IActiveView
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IActiveViewEvents.contentsChanged(com.esri.arcgis.carto.IActiveViewEventsContentsChangedEvent)
public void onMessage(int msg, int wParam, int lParam) throws IOException, AutomationException
onMessage
in interface IActiveView
msg
- The msg (in)wParam
- The wParam (A COM typedef) (in)lParam
- The lParam (A COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getContextMenu(double x, double y, IUID[] clsidMenu) throws IOException, AutomationException
getContextMenu
in interface IActiveView
x
- The x (in)y
- The y (in)clsidMenu
- A reference to a com.esri.arcgis.system.IUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setElementSelectionByRef(ISelection selectionObject) throws IOException, AutomationException
setElementSelectionByRef
in interface IViewManager
selectionObject
- A reference to a com.esri.arcgis.carto.ISelection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IActiveView.getSelection()
public ISelection getElementSelection() throws IOException, AutomationException
getElementSelection
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IGraphicsContainerSelect.getSelectedElements()
public void setConserveMemory(boolean flag) throws IOException, AutomationException
setConserveMemory
in interface IViewManager
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isConserveMemory() throws IOException, AutomationException
isConserveMemory
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTopFilterPhase(int phase) throws IOException, AutomationException
setTopFilterPhase
in interface IViewManager
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTopFilterPhase() throws IOException, AutomationException
getTopFilterPhase
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTopFilterIndex(int phaseIndex) throws IOException, AutomationException
setTopFilterIndex
in interface IViewManager
phaseIndex
- The phaseIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getTopFilterIndex() throws IOException, AutomationException
getTopFilterIndex
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOutputBandSize(int kilobytes) throws IOException, AutomationException
setOutputBandSize
in interface IViewManager
kilobytes
- The kilobytes (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getOutputBandSize() throws IOException, AutomationException
getOutputBandSize
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUsesPageCoordinates() throws IOException, AutomationException
isUsesPageCoordinates
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isVerboseEvents() throws IOException, AutomationException
isVerboseEvents
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setVerboseEvents(boolean verboseEvents) throws IOException, AutomationException
setVerboseEvents
in interface IViewManager
verboseEvents
- The verboseEvents (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDelayBackgroundDraw() throws IOException, AutomationException
isDelayBackgroundDraw
in interface IViewManager
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDelayBackgroundDraw(boolean flag) throws IOException, AutomationException
setDelayBackgroundDraw
in interface IViewManager
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isExternalDrawing(int phase) throws IOException, AutomationException
isExternalDrawing
in interface IViewManager
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExternalDrawing(int phase, boolean externalDrawing) throws IOException, AutomationException
setExternalDrawing
in interface IViewManager
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)externalDrawing
- The externalDrawing (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDrawing() throws IOException, AutomationException
isDrawing
in interface IViewRefresh
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isProgressiveDrawing() throws IOException, AutomationException
isProgressiveDrawing
in interface IViewRefresh
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setProgressiveDrawing(boolean flag) throws IOException, AutomationException
setProgressiveDrawing
in interface IViewRefresh
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void partialRefreshShape(int phase, Object data, IGeometry geometry, double symbolSizePoints) throws IOException, AutomationException
partialRefreshShape
in interface IViewRefresh
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)data
- A reference to another Object (IUnknown) (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)symbolSizePoints
- The symbolSizePoints (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void animationRefresh(int phase, Object data, IEnvelope envelope) throws IOException, AutomationException
animationRefresh
in interface IViewRefresh
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)data
- A reference to another Object (IUnknown) (in)envelope
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void animationRefreshShape(int phase, Object data, IGeometry geometry, double symbolSizePoints) throws IOException, AutomationException
animationRefreshShape
in interface IViewRefresh
phase
- A com.esri.arcgis.carto.esriViewDrawPhase constant (in)data
- A reference to another Object (IUnknown) (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)symbolSizePoints
- The symbolSizePoints (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refreshItem(Object data) throws IOException, AutomationException
refreshItem
in interface IViewRefresh
data
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void refreshCaches() throws IOException, AutomationException
refreshCaches
in interface IViewRefresh
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IElement next() throws IOException, AutomationException
next
in interface IGraphicsContainer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void reset() throws IOException, AutomationException
reset
in interface IGraphicsContainer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addElement(IElement element, int zorder) throws IOException, AutomationException
This method adds the input element the graphics container referenced. The parameter zorder is currently not utilized by all of the IGraphicsContainer implementations and is typically set to 0 when calling this method.
addElement
in interface IGraphicsContainer
element
- A reference to a com.esri.arcgis.carto.IElement (in)zorder
- The zorder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addElements(IElementCollection elements, int zorder) throws IOException, AutomationException
addElements
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IElementCollection (in)zorder
- The zorder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteElement(IElement element) throws IOException, AutomationException
deleteElement
in interface IGraphicsContainer
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteAllElements() throws IOException, AutomationException
deleteAllElements
in interface IGraphicsContainer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveElementToGroup(IElement element, IGroupElement group) throws IOException, AutomationException
moveElementToGroup
in interface IGraphicsContainer
element
- A reference to a com.esri.arcgis.carto.IElement (in)group
- A reference to a com.esri.arcgis.carto.IGroupElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void moveElementFromGroup(IGroupElement group, IElement element, int zorder) throws IOException, AutomationException
moveElementFromGroup
in interface IGraphicsContainer
group
- A reference to a com.esri.arcgis.carto.IGroupElement (in)element
- A reference to a com.esri.arcgis.carto.IElement (in)zorder
- The zorder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumElement locateElements(IPoint point, double tolerance) throws IOException, AutomationException
locateElements
in interface IGraphicsContainer
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)tolerance
- The tolerance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumElement locateElementsByEnvelope(IEnvelope envelope) throws IOException, AutomationException
locateElementsByEnvelope
in interface IGraphicsContainer
envelope
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFrameElement findFrame(Object frameObject) throws IOException, AutomationException
findFrame
in interface IGraphicsContainer
frameObject
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updateElement(IElement element) throws IOException, AutomationException
updateElement
in interface IGraphicsContainer
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getElementOrder(IEnumElement elements) throws IOException, AutomationException
getElementOrder
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void putElementOrder(Object order) throws IOException, AutomationException
putElementOrder
in interface IGraphicsContainer
order
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void bringToFront(IEnumElement elements) throws IOException, AutomationException
bringToFront
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void sendToBack(IEnumElement elements) throws IOException, AutomationException
sendToBack
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void sendBackward(IEnumElement elements) throws IOException, AutomationException
sendBackward
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void bringForward(IEnumElement elements) throws IOException, AutomationException
bringForward
in interface IGraphicsContainer
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectElement(IElement element) throws IOException, AutomationException
Adds the specified element to the element selection and fires the IActiveViewEvents::SelectionChanged event.
selectElement
in interface IGraphicsContainerSelect
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectElements(IEnumElement elements) throws IOException, AutomationException
Adds the specified elements to the element selection and fires the IActiveViewEvents::SelectionChanged event.
selectElements
in interface IGraphicsContainerSelect
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectAllElements() throws IOException, AutomationException
Selects all elements in the container and fires the IActiveViewEvents::SelectionChanged event.
selectAllElements
in interface IGraphicsContainerSelect
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unselectElement(IElement element) throws IOException, AutomationException
Removes the specified element from the element selection and fires the IActiveViewEvents::SelectionChanged event.
unselectElement
in interface IGraphicsContainerSelect
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unselectElements(IEnumElement elements) throws IOException, AutomationException
Removes the specified elements from the element selection and fires the IActiveViewEvents::SelectionChanged event.
unselectElements
in interface IGraphicsContainerSelect
elements
- A reference to a com.esri.arcgis.carto.IEnumElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unselectAllElements() throws IOException, AutomationException
Clears the element selection and fires the IActiveViewEvents::SelectionChanged event.
unselectAllElements
in interface IGraphicsContainerSelect
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumElement getSelectedElements() throws IOException, AutomationException
Returns an IEnumElement containing all of the selected elements.
An IEnumElement reference to the element selection is also available from IViewManager::ElementSelection and IActiveView::Selection (QI from ISelection).
getSelectedElements
in interface IGraphicsContainerSelect
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IViewManager.getElementSelection()
public int getElementSelectionCount() throws IOException, AutomationException
getElementSelectionCount
in interface IGraphicsContainerSelect
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IElement selectedElement(int index) throws IOException, AutomationException
selectedElement
in interface IGraphicsContainerSelect
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISelectionTracker selectionTracker(int index) throws IOException, AutomationException
Elements have associated selection tracker objects which provide reshaping functionality. For example, in ArcMap after adding an element, the element is drawn with a selection tracker around it and users can then drag one of the selection handles on the selection tracker to modify the element's shape.
There are several types of selection tracker objects including EnvelopeTracker, MarkerTracker, PointTracker, and PolygonTracker. When an element is first selected, an EnvelopeTracker is created for it. However, if the element has its IElementEditVertices::MovingVertices property set to TRUE, then the geometry of the element dictates the type of selection tracker created. For example, a line element will create a LineTracker.
IElement::SelectionTracker checks if the elements IElementEditVertices::MovingVertices property is set to TRUE; if so, IElementEditVertices::GetMoveVerticesSelectionTracker is called to create the appropriate tracker object for the element. If MovingVertices returns FALSE, then an EnvelopeTracker is created for the element.
In ArcMap, selecting an element creates an EnvelopeTracker but the 'Edit Vertices' command swaps the it out with a PolygonTracker or LineTracker. Some elements such as a MarkerElement, CircleElement, EllipseElement, and RectangleElement, only create EnvelopeTrackers and the vertices of the these elements cannot be edited.
selectionTracker
in interface IGraphicsContainerSelect
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IElement
public boolean elementSelected(IElement element) throws IOException, AutomationException
Returns TRUE if the specified element is selected.
elementSelected
in interface IGraphicsContainerSelect
element
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IElement getDominantElement() throws IOException, AutomationException
The dominant element is by default the first element selected. The alignment commands make use of the dominant element to arrange elements more precisely.
getDominantElement
in interface IGraphicsContainerSelect
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDominantElementByRef(IElement dominantItem) throws IOException, AutomationException
setDominantElementByRef
in interface IGraphicsContainerSelect
dominantItem
- A reference to a com.esri.arcgis.carto.IElement (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getSelectionBounds(IDisplay display) throws IOException, AutomationException
getSelectionBounds
in interface IGraphicsContainerSelect
display
- A reference to a com.esri.arcgis.display.IDisplay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void snapShape(IGeometry shape) throws IOException, AutomationException
snapShape
in interface IGraphicSnapEnvironment
shape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getSnapTolerance() throws IOException, AutomationException
getSnapTolerance
in interface IGraphicSnapEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapTolerance(double tol) throws IOException, AutomationException
setSnapTolerance
in interface IGraphicSnapEnvironment
tol
- The tol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapAgentOrder(IArray guids) throws IOException, AutomationException
setSnapAgentOrder
in interface IGraphicSnapEnvironment
guids
- A reference to a com.esri.arcgis.system.IArray (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IArray getSnapAgentOrder() throws IOException, AutomationException
getSnapAgentOrder
in interface IGraphicSnapEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSnapAgentCount() throws IOException, AutomationException
getSnapAgentCount
in interface IGraphicSnapEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IGraphicSnap getSnapAgent(int index) throws IOException, AutomationException
getSnapAgent
in interface IGraphicSnapEnvironment
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearSnapAgents() throws IOException, AutomationException
clearSnapAgents
in interface IGraphicSnapEnvironment
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addSnapAgent(IGraphicSnap snapAgent) throws IOException, AutomationException
addSnapAgent
in interface IGraphicSnapEnvironment
snapAgent
- A reference to a com.esri.arcgis.carto.IGraphicSnap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteSnapAgent(IGraphicSnap snapAgent) throws IOException, AutomationException
deleteSnapAgent
in interface IGraphicSnapEnvironment
snapAgent
- A reference to a com.esri.arcgis.carto.IGraphicSnap (in)
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 isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void pageUnitsChanged(IPageEventsPageUnitsChangedEvent theEvent) throws IOException, AutomationException
pageUnitsChanged
in interface IPageEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void pageSizeChanged(IPageEventsPageSizeChangedEvent theEvent) throws IOException, AutomationException
pageSizeChanged
in interface IPageEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void pageMarginsChanged(IPageEventsPageMarginsChangedEvent theEvent) throws IOException, AutomationException
pageMarginsChanged
in interface IPageEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void pageColorChanged(IPageEventsPageColorChangedEvent theEvent) throws IOException, AutomationException
pageColorChanged
in interface IPageEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void selectionChanged(ISelectionEventsSelectionChangedEvent theEvent) throws IOException, AutomationException
selectionChanged
in interface ISelectionEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void boundsUpdated(ITransformEventsBoundsUpdatedEvent theEvent) throws IOException, AutomationException
boundsUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void visibleBoundsUpdated(ITransformEventsVisibleBoundsUpdatedEvent theEvent) throws IOException, AutomationException
visibleBoundsUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deviceFrameUpdated(ITransformEventsDeviceFrameUpdatedEvent theEvent) throws IOException, AutomationException
deviceFrameUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void resolutionUpdated(ITransformEventsResolutionUpdatedEvent theEvent) throws IOException, AutomationException
resolutionUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void rotationUpdated(ITransformEventsRotationUpdatedEvent theEvent) throws IOException, AutomationException
rotationUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void unitsUpdated(ITransformEventsUnitsUpdatedEvent theEvent) throws IOException, AutomationException
unitsUpdated
in interface ITransformEvents
theEvent
- The event
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUsesFilter() throws IOException, AutomationException
The UsesFilter property returns true when the object in question will draw with a filter. Drawing with a filter means means that an object that would normally draw as vector graphics will instead draw as raster. The UsesFilter property is particularly useful for detecting vector map layers that will be rasterized at time of print or export.
isUsesFilter
in interface IDisplayAdmin
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPageLayout getPageLayout() throws IOException, AutomationException
getPageLayout
in interface IMxdContents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap getMap() throws IOException, AutomationException
The map property is not supported in the case of new map being set into the focus map of the PageLayoutControl.
getMap
in interface IMxdContents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IActiveView getActiveView() throws IOException, AutomationException
getActiveView
in interface IMxdContents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getExtensionCount() throws IOException, AutomationException
getExtensionCount
in interface IPageLayoutExtensions
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getExtension(int index) throws IOException, AutomationException
getExtension
in interface IPageLayoutExtensions
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addExtension(Object ext) throws IOException, AutomationException
addExtension
in interface IPageLayoutExtensions
ext
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeExtension(int index) throws IOException, AutomationException
removeExtension
in interface IPageLayoutExtensions
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |