com.esri.arcgis.controls
Class ARPageLayout

java.lang.Object
  extended bycom.esri.arcgis.controls.ARPageLayout
All Implemented Interfaces:
IARPageLayout, java.io.Serializable

public class ARPageLayout
extends java.lang.Object
implements IARPageLayout

The ARPageLayout container for the display of a page.

Product Availability

Available with ArcGIS Engine.

See Also:
Serialized Form

Constructor Summary
ARPageLayout(java.lang.Object obj)
          Construct a ARPageLayout using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void centerAt(double xCoord, double yCoord)
          Moves the center of the page layout to the specified point.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IARMap getARMap(int index)
          The map at the specified index.
 int getARMapCount()
          The number of maps in the page layout's map collection.
 IARPageLayout getAsIARPageLayout()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 java.lang.Object getCustomProperty()
          A property to associate data with an object.
 void getExtent(double[] xMin, double[] yMin, double[] xMax, double[] yMax)
          The visible extent of the page layout.
 IARMap getFocusARMap()
          The current focus map that the current tool acts upon.
 double getHeight()
          The height of the page.
 java.lang.Object getInternalObject()
          The internal ArcObjects IPageLayout object.
 int getMapExtentType(IARMap pMap)
          The extent type of the specified map.
 int getPageUnits()
          The units of the page and all associated coordinates.
 java.lang.String getTitle()
          The title in the page layout.
 double getWidth()
          The width of the page.
 double getZoomPercent()
          The zoom percent (100 means 1:1, 200 means twice the normal size).
 int hashCode()
          the hashcode for this object
 IARMap hitTestMap(int x, int y)
          Returns the first map present in the page layout at the specified coordinates.
 boolean isCanRedoExtent()
          Indicates if there is a page layout extent that can be redone.
 boolean isCanUndoExtent()
          Indicates if there is a page layout extent that can be undone.
 boolean isHasTitle()
          Indicates if the page layout has a title that can be changed.
 void pan(int direction, double screenPercentage)
          Pans the page layout by a factor in a specified direction.
 void redoExtent()
          Redo the next page layout extent in the stack.
 void refresh(boolean refreshNow)
          Redraws the page layout display area.
 void setCustomProperty(java.lang.Object pVal)
          A property to associate data with an object.
 void setExtent(double xMin, double yMin, double xMax, double yMax)
          Sets the visible extent of the page layout.
 void setFocusARMapByRef(IARMap ppARMap)
          The current focus map that the current tool acts upon.
 void setPageUnits(int units)
          The units of the page and all associated coordinates.
 void setTitle(java.lang.String currentTitle)
          The title in the page layout.
 void toPagePoint(int x, int y, double[] xCoord, double[] yCoord)
          Converts a point in device coordinates (typically pixels) to coordinates in page units.
 void undoExtent()
          Undo to the previous page layout extent in the stack.
 void zoomIn(double factor)
          Zooms in on the page layout by a factor.
 void zoomOut(double factor)
          Zooms out on the page layout by a factor.
 void zoomToPercent(int percent)
          Magnifies the page by a percentage (100 means actual size, 200 means twice the normal size).
 void zoomToWholePage()
          Zooms to the whole page.
 void zoomToWidth()
          Fits the width of the page into the page layout display area.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARPageLayout

public ARPageLayout(java.lang.Object obj)
             throws java.io.IOException
Construct a ARPageLayout using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ARPageLayout.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
ARPageLayout o = (ARPageLayout)obj; // will not work

ARPageLayout o = new ARPageLayout(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server ARPageLayout theARPageLayout = (ARPageLayout) obj;

Throws:
java.io.IOException - if there are interop problems
Method Detail

getAsIARPageLayout

public IARPageLayout getAsIARPageLayout()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

public boolean equals(java.lang.Object o)
Compare this object with another


hashCode

public int hashCode()
the hashcode for this object


setExtent

public void setExtent(double xMin,
                      double yMin,
                      double xMax,
                      double yMax)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IARPageLayout
Sets the visible extent of the page layout.

Specified by:
setExtent in interface IARPageLayout
Parameters:
xMin - The xMin (in)
yMin - The yMin (in)
xMax - The xMax (in)
yMax - The yMax (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public void getExtent(double[] xMin,
                      double[] yMin,
                      double[] xMax,
                      double[] yMax)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IARPageLayout
The visible extent of the page layout.

Specified by:
getExtent in interface IARPageLayout
Parameters:
xMin - The xMin (in/out: use single element array)
yMin - The yMin (in/out: use single element array)
xMax - The xMax (in/out: use single element array)
yMax - The yMax (in/out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setFocusARMapByRef

public void setFocusARMapByRef(IARMap ppARMap)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IARPageLayout
The current focus map that the current tool acts upon.

Specified by:
setFocusARMapByRef in interface IARPageLayout
Parameters:
ppARMap - A reference to a com.esri.arcgis.controls.IARMap (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getFocusARMap

public IARMap getFocusARMap()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IARPageLayout
The current focus map that the current tool acts upon.

Specified by:
getFocusARMap in interface IARPageLayout
Returns:
A reference to a com.esri.arcgis.controls.IARMap
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getARMapCount

public int getARMapCount()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IARPageLayout
The number of maps in the page layout's map collection.

Specified by:
getARMapCount in interface IARPageLayout
Returns:
The count
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getARMap

public IARMap getARMap(int index)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IARPageLayout
The map at the specified index.

Specified by:
getARMap in interface IARPageLayout
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IARMap
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setPageUnits

public void setPageUnits(int units)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IARPageLayout
The units of the page and all associated coordinates.

Specified by:
setPageUnits in interface IARPageLayout
Parameters:
units - A com.esri.arcgis.controls.esriARUnits constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPageUnits

public int getPageUnits()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IARPageLayout
The units of the page and all associated coordinates.

Specified by:
getPageUnits in interface IARPageLayout
Returns:
A com.esri.arcgis.controls.esriARUnits constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZoomPercent

public double getZoomPercent()
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IARPageLayout
The zoom percent (100 means 1:1, 200 means twice the normal size).

Specified by:
getZoomPercent in interface IARPageLayout
Returns:
The percent
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToPercent

public void zoomToPercent(int percent)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IARPageLayout
Magnifies the page by a percentage (100 means actual size, 200 means twice the normal size).

Specified by:
zoomToPercent in interface IARPageLayout
Parameters:
percent - The percent (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToWholePage

public void zoomToWholePage()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IARPageLayout
Zooms to the whole page.

Specified by:
zoomToWholePage in interface IARPageLayout
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

zoomToWidth

public void zoomToWidth()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IARPageLayout
Fits the width of the page into the page layout display area.

Specified by:
zoomToWidth in interface IARPageLayout
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh(boolean refreshNow)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IARPageLayout
Redraws the page layout display area.

Specified by:
refresh in interface IARPageLayout
Parameters:
refreshNow - The refreshNow (in, optional, pass false if not required)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapExtentType

public int getMapExtentType(IARMap pMap)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IARPageLayout
The extent type of the specified map.

Specified by:
getMapExtentType in interface IARPageLayout
Parameters:
pMap - A reference to a com.esri.arcgis.controls.IARMap (in)
Returns:
A com.esri.arcgis.controls.esriARExtentType constant
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

hitTestMap

public IARMap hitTestMap(int x,
                         int y)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IARPageLayout
Returns the first map present in the page layout at the specified coordinates. If there isn't a map or the coordinates are not over a map, nothing will be returned.

Specified by:
hitTestMap in interface IARPageLayout
Parameters:
x - The x (in)
y - The y (in)
Returns:
A reference to a com.esri.arcgis.controls.IARMap
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

zoomIn

public void zoomIn(double factor)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IARPageLayout
Zooms in on the page layout by a factor.

Specified by:
zoomIn in interface IARPageLayout
Parameters:
factor - The factor (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

zoomOut

public void zoomOut(double factor)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IARPageLayout
Zooms out on the page layout by a factor.

Specified by:
zoomOut in interface IARPageLayout
Parameters:
factor - The factor (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

pan

public void pan(int direction,
                double screenPercentage)
         throws java.io.IOException,
                AutomationException
Description copied from interface: IARPageLayout
Pans the page layout by a factor in a specified direction.

Specified by:
pan in interface IARPageLayout
Parameters:
direction - A com.esri.arcgis.controls.esriARDirection constant (in)
screenPercentage - The screenPercentage (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

centerAt

public void centerAt(double xCoord,
                     double yCoord)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IARPageLayout
Moves the center of the page layout to the specified point.

Specified by:
centerAt in interface IARPageLayout
Parameters:
xCoord - The xCoord (in)
yCoord - The yCoord (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWidth

public double getWidth()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IARPageLayout
The width of the page.

Specified by:
getWidth in interface IARPageLayout
Returns:
The dWidth
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getHeight

public double getHeight()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IARPageLayout
The height of the page.

Specified by:
getHeight in interface IARPageLayout
Returns:
The dHeight
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toPagePoint

public void toPagePoint(int x,
                        int y,
                        double[] xCoord,
                        double[] yCoord)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IARPageLayout
Converts a point in device coordinates (typically pixels) to coordinates in page units.

Specified by:
toPagePoint in interface IARPageLayout
Parameters:
x - The x (in)
y - The y (in)
xCoord - The xCoord (in/out: use single element array)
yCoord - The yCoord (in/out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanUndoExtent

public boolean isCanUndoExtent()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IARPageLayout
Indicates if there is a page layout extent that can be undone.

Specified by:
isCanUndoExtent in interface IARPageLayout
Returns:
The bCanUndo
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

undoExtent

public void undoExtent()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IARPageLayout
Undo to the previous page layout extent in the stack.

Specified by:
undoExtent in interface IARPageLayout
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isCanRedoExtent

public boolean isCanRedoExtent()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IARPageLayout
Indicates if there is a page layout extent that can be redone.

Specified by:
isCanRedoExtent in interface IARPageLayout
Returns:
The bCanRedo
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

redoExtent

public void redoExtent()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IARPageLayout
Redo the next page layout extent in the stack.

Specified by:
redoExtent in interface IARPageLayout
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getInternalObject

public java.lang.Object getInternalObject()
                                   throws java.io.IOException,
                                          AutomationException
Description copied from interface: IARPageLayout
The internal ArcObjects IPageLayout object.

Specified by:
getInternalObject in interface IARPageLayout
Returns:
A reference to another Object (IUnknown)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomProperty

public java.lang.Object getCustomProperty()
                                   throws java.io.IOException,
                                          AutomationException
Description copied from interface: IARPageLayout
A property to associate data with an object.

Specified by:
getCustomProperty in interface IARPageLayout
Returns:
A Variant
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setCustomProperty

public void setCustomProperty(java.lang.Object pVal)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IARPageLayout
A property to associate data with an object.

Specified by:
setCustomProperty in interface IARPageLayout
Parameters:
pVal - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTitle

public void setTitle(java.lang.String currentTitle)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IARPageLayout
The title in the page layout. Not all page layouts have a title that can be changed, use the HasTitle method to check this.

Specified by:
setTitle in interface IARPageLayout
Parameters:
currentTitle - The currentTitle (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTitle

public java.lang.String getTitle()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IARPageLayout
The title in the page layout. Not all page layouts have a title that can be changed, use the HasTitle method to check this.

Specified by:
getTitle in interface IARPageLayout
Returns:
The currentTitle
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasTitle

public boolean isHasTitle()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IARPageLayout
Indicates if the page layout has a title that can be changed.

Specified by:
isHasTitle in interface IARPageLayout
Returns:
The hasTitle
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.