com.esri.arcgis.carto
Interface IPageLayout

All Superinterfaces:
Serializable
All Known Implementing Classes:
PageLayout

public interface IPageLayout
extends Serializable

Provides access to members that control the Page Layout.

Superseded By

IPageLayout3

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


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

getPage

IPage getPage()
              throws IOException,
                     AutomationException
The page.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IPage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPage, Page

getRulerSettings

IRulerSettings getRulerSettings()
                                throws IOException,
                                       AutomationException
The ruler settings.

Remarks

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.

Example:


<pre>

MapControl pMapControl = new MapControl();
IRulerSettings pRulerSettings;
pRulerSettings = pMapControl.getPageLayout().getRulerSettings();
pRulerSettings.setSmallestDivision(2);
pMapControl.getActiveView().refresh();

</pre>
</font>

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IRulerSettings
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapGrid

ISnapGrid getSnapGrid()
                      throws IOException,
                             AutomationException
The snapping grid.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ISnapGrid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHorizontalSnapGuides

ISnapGuides getHorizontalSnapGuides()
                                    throws IOException,
                                           AutomationException
The horizontal snapping guides.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ISnapGuides
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVerticalSnapGuides

ISnapGuides getVerticalSnapGuides()
                                  throws IOException,
                                         AutomationException
The vertical snapping guides.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ISnapGuides
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZoomPercent

double getZoomPercent()
                      throws IOException,
                             AutomationException
The current zoom percent. 100 means 1:1. 200 means twice normal size, etc.

Remarks

This property reports the current zoom factor. Use ZoomToPercent, ZoomToWhole, or ZoomToWidth to change the zoom factor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The percent
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayout.zoomToWhole(), IPageLayout.zoomToWidth(), IPageLayout.zoomToPercent(int), IPageLayout.getZoomPercent()

setAlignToMargins

void setAlignToMargins(boolean alignToMargins)
                       throws IOException,
                              AutomationException
Indicates if graphics will be aligned to the margins or to each other.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
alignToMargins - The alignToMargins (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAlignToMargins

boolean isAlignToMargins()
                         throws IOException,
                                AutomationException
Indicates if graphics will be aligned to the margins or to each other.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The alignToMargins
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToWidth

void zoomToWidth()
                 throws IOException,
                        AutomationException
Fit the width of the page to the screen.

Remarks

Use the ZoomPercent property to check the zoom factor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayout.zoomToWhole(), IPageLayout.zoomToWidth(), IPageLayout.zoomToPercent(int), IPageLayout.getZoomPercent()

zoomToWhole

void zoomToWhole()
                 throws IOException,
                        AutomationException
Fit the whole page in the window.

Remarks

Use the ZoomPercent property to check the zoom factor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayout.zoomToWhole(), IPageLayout.zoomToWidth(), IPageLayout.zoomToPercent(int), IPageLayout.getZoomPercent()

zoomToPercent

void zoomToPercent(int percent)
                   throws IOException,
                          AutomationException
Magnify the page by a certain percentage. 100 means actual size. 200 means twice normal size, etc.

Remarks

Use the ZoomPercent property to check the zoom factor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
percent - The percent (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayout.zoomToWhole(), IPageLayout.zoomToWidth(), IPageLayout.zoomToPercent(int), IPageLayout.getZoomPercent()

focusNextMapFrame

void focusNextMapFrame()
                       throws IOException,
                              AutomationException
Focus the next map.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

focusPreviousMapFrame

void focusPreviousMapFrame()
                           throws IOException,
                                  AutomationException
Focus the previous map.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceMaps

void replaceMaps(IMaps maps)
                 throws IOException,
                        AutomationException
Replace the maps in the data frames with the specified maps. If there are more maps than frames, new frames are created. If there are fewer frames than maps, extra frames are cleared.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
maps - A reference to a com.esri.arcgis.carto.IMaps (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.