|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPageLayout
Provides access to members that control the Page Layout.
The IPageLayout interface is the primary interface implemented by the ArcMap PageLayout object.
The PageLayout object is very similar to the Map object. Both are views, meaning they take control of the main application window; both are also graphics containers, meaning they can store graphical elements. If there is no map activated in layout view (IMxDocument::ActivatedView), all new graphic elements are added to the PageLayout. If a Map is activated, graphic elements are added to the focus map (IMxDocument::FocusMap).
Use this interface to access the RulerSettings, the SnapGrid, the SnapGuides, and the Page objects created and maintained by the PageLayout.
IPageLayout also has methods for zooming the view and changing the focus map.
See also the help for IPage, IRulerSettings, ISnapGrid, ISnapGuides and the examples in the Carto library overview.
Method Summary | |
---|---|
void |
focusNextMapFrame()
Focus the next map. |
void |
focusPreviousMapFrame()
Focus the previous map. |
ISnapGuides |
getHorizontalSnapGuides()
The horizontal snapping guides. |
IPage |
getPage()
The page. |
IRulerSettings |
getRulerSettings()
The ruler settings. |
ISnapGrid |
getSnapGrid()
The snapping grid. |
ISnapGuides |
getVerticalSnapGuides()
The vertical snapping guides. |
double |
getZoomPercent()
The current zoom percent. |
boolean |
isAlignToMargins()
Indicates if graphics will be aligned to the margins or to each other. |
void |
replaceMaps(IMaps maps)
Replace the maps in the data frames with the specified maps. |
void |
setAlignToMargins(boolean alignToMargins)
Indicates if graphics will be aligned to the margins or to each other. |
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. |
Method Detail |
---|
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPage
,
Page
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>
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getZoomPercent() throws IOException, AutomationException
This property reports the current zoom factor. Use ZoomToPercent, ZoomToWhole, or ZoomToWidth to change the zoom factor.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
void setAlignToMargins(boolean alignToMargins) throws IOException, AutomationException
alignToMargins
- The alignToMargins (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void zoomToWidth() throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
void zoomToWhole() throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout.zoomToWhole()
,
IPageLayout.zoomToWidth()
,
IPageLayout.zoomToPercent(int)
,
IPageLayout.getZoomPercent()
void zoomToPercent(int percent) throws IOException, AutomationException
Use the ZoomPercent property to check the zoom factor.
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()
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void replaceMaps(IMaps maps) throws IOException, AutomationException
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |