com.esri.arcgis.controls
Class PageLayoutControl

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.esri.arcgis.interop.Ocx
              extended by com.esri.arcgis.controls.PageLayoutControl
All Implemented Interfaces:
IMxdContents, IPageLayoutControl, IPageLayoutControl2, IPageLayoutControl3, IPageLayoutControlDefault, ITOCBuddy, IToolbarBuddy, IConnectionPointContainer, IPersistStreamInit, com.esri.arcgis.interop.RemoteObjRef, IPersist, ISupportErrorInfo, ImageObserver, MenuContainer, Serializable, Accessible

public class PageLayoutControl
extends com.esri.arcgis.interop.Ocx
implements com.esri.arcgis.interop.RemoteObjRef, IPageLayoutControlDefault, IPageLayoutControl, IPageLayoutControl2, IPageLayoutControl3, ITOCBuddy, IToolbarBuddy, IMxdContents, IConnectionPointContainer, IPersistStreamInit, IPersist, ISupportErrorInfo

ESRI PageLayoutControl

Description

The PageLayoutControl encapsulates the PageLayout CoClass and provides additional properties, methods and events for: managing the general appearance, display properties and page properties of the control; adding and finding elements within the control; loading map documents into the control; dropping data onto the control from other applications; and printing.

Remarks

The PageLayoutControl uses a ScreenDisplay as the display object for drawing and will therefore react to the same keyboard and mouse actions as the ScreenDisplay object.

There is no need to declare the PageLayoutControl 's outbound interface as described below in most development environments, because the interface is automaticlly implemented.

Product Availability

Available with ArcGIS Engine.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvas
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Ocx
rootParentContainers, rootWindows
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PageLayoutControl()
          Constructs a PageLayoutControl using ArcGIS Engine.
PageLayoutControl(Object o)
          Constructs a PageLayoutControl.
 
Method Summary
 void aboutBox()
          Displays a dialog of information about the PageLayoutControl.
 void addElement(IElement pElement, Object geometry, Object symbology, Object name, int zOrder)
          Adds the supplied element to the PageLayout, with optional geometry, symbolization, name and Z order.
 void addIPageLayoutControlEventsListener(IPageLayoutControlEvents theListener)
          addIPageLayoutControlEventsListener.
 void addITOCBuddyEventsListener(ITOCBuddyEvents theListener)
          addITOCBuddyEventsListener.
 void addNotify()
           
 void centerAt(IPoint centerPoint)
          Moves the center of the PageLayoutControl to the specified location.
 boolean checkMxFile(String fileName)
          Checks the specified filename to see if it is a map document that can be loaded into the PageLayoutControl.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 boolean esri_isEnabled()
          Indicates whether the PageLayoutControl can respond to user generated events.
 void esri_setEnabled(boolean rhs1)
          Indicates whether the PageLayoutControl can respond to user generated events.
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 IElement findElementByName(String name, int occurence)
          Find the first element with the supplied name, supply an occurrence parameter to find the second, third and so on.
 void fromPagePoint(IPoint pt, int[] x, int[] y)
          Converts a point on the page (in page units) to device co-ordinates (typically pixels).
 IActiveView getActiveView()
          The active view of the PageLayout contained by the PageLayoutControl.
 int getAppearance()
          The appearance of the PageLayoutControl.
 int getBackColor()
          Background color of the PageLayoutControl.
 int getBorderStyle()
          The border style of the PageLayoutControl.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 ITool getCurrentTool()
          Current active tool for the PageLayoutControl.
 Object getCustomProperty()
          A property to associate data with a control.
 String getDocumentFilename()
          The filename of the last map document loaded into the control.
 IEnvelope getExtent()
          Current extent of the PageLayout in page units.
 IEnvelope getFullExtent()
          Rectangular shape that encloses the PageLayout.
 IGraphicsContainer getGraphicsContainer()
          The graphics container of the PageLayout object contained by the PageLayoutControl.
 int getHWnd()
          Handle to the window associated with the PageLayoutControl.
 int getKeyIntercept()
          A property that specifies interception of key strokes that are normally handled by the container.
 IMap getMap()
          The Map object.
 Picture getMouseIcon()
          Custom mouse icon used if MousePointer is 99.
 int getMousePointer()
          The mouse pointer displayed over the PageLayoutControl.
 Object getObject()
          A property that returns the underlying control.
 IPage getPage()
          The Page associated with the PageLayout contained by the PageLayoutControl.
 IPageLayout getPageLayout()
          The PageLayout contained by the PageLayoutControl.
 IPrinter getPrinter()
          The printer object used by the PageLayoutControl for printing.
 short getPrinterPageCount(double overlap)
          The number of printer pages the PageLayout will cover.
 double getScale(IBasicMap pBasicMap)
          Returns the scale of the supplied BasicMap, this allows for objects that do not support IMap.
 void getSizeMax(_ULARGE_INTEGER[] pCbSize)
          getSizeMax
 ITrackCancel getTrackCancel()
          The object used by the PageLayoutControl to check if drawing has been aborted.
 void initNew()
          initNew
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isAutoKeyboardScrolling()
          Indicates whether keyboard scrolling is enabled.
 boolean isAutoMouseWheel()
          Indicates whether the mouse wheel is enabled.
 void isDirty()
          isDirty
 boolean isOleDropEnabled()
          Indicates if the PageLayoutControl will fire events when data is dragged over the control's window.
 void load(IStream pStm)
          load
 void loadMxFile(String fileName, Object password)
          Loads the specified map document into the PageLayout contained by the PageLayoutControl.
 IElement locateFrontElement(double pageX, double pageY, double tolerance)
          Locates an element at the given page co-ordinates.
 void pan()
          Tracks the mouse while panning the PageLayoutControl.
 void printPageLayout(short startPage, short endPage, double overlap)
          Sends the specified range of pages on the printer.
 void refresh(int phase, Object layerOrElement, Object envelope)
          Redraws the PageLayout, optionally just redraw specified phases or envelope.
 void removeIPageLayoutControlEventsListener(IPageLayoutControlEvents theListener)
          removeIPageLayoutControlEventsListener.
 void removeITOCBuddyEventsListener(ITOCBuddyEvents theListener)
          removeITOCBuddyEventsListener.
 void save(IStream pStm, int fClearDirty)
          save
 void setAppearance(int rhs1)
          The appearance of the PageLayoutControl.
 void setAutoKeyboardScrolling(boolean rhs1)
          Indicates whether keyboard scrolling is enabled.
 void setAutoMouseWheel(boolean rhs1)
          Indicates whether the mouse wheel is enabled.
 void setBackColor(int rhs1)
          Background color of the PageLayoutControl.
 void setBorderStyle(int rhs1)
          The border style of the PageLayoutControl.
 void setCurrentToolByRef(ITool rhs1)
          Current active tool for the PageLayoutControl.
 void setCustomProperty(Object rhs1)
          A property to associate data with a control.
 void setDocumentFilename(String rhs1)
          The filename of the last map document loaded into the control.
 void setExtent(IEnvelope rhs1)
          Current extent of the PageLayout in page units.
 void setFullExtent(IEnvelope rhs1)
          Rectangular shape that encloses the PageLayout.
 void setKeyIntercept(int rhs1)
          A property that specifies interception of key strokes that are normally handled by the container.
 void setMouseIconByRef(Picture rhs1)
          Custom mouse icon used if MousePointer is 99.
 void setMousePointer(int rhs1)
          The mouse pointer displayed over the PageLayoutControl.
 void setOleDropEnabled(boolean rhs1)
          Indicates if the PageLayoutControl will fire events when data is dragged over the control's window.
 void setPageLayoutByRef(IPageLayout rhs1)
          The PageLayout contained by the PageLayoutControl.
 void setPrinterByRef(IPrinter rhs1)
          The printer object used by the PageLayoutControl for printing.
 void setTrackCancelByRef(ITrackCancel rhs1)
          The object used by the PageLayoutControl to check if drawing has been aborted.
 void suppressResizeDrawing(boolean suppressResize, int resizeHWnd)
          Suppress full redraw of control during resize operations.
 IPoint toPagePoint(int x, int y)
          Converts device co-ordinates (typically pixels) to a point on the page (in page units).
 IEnvelope trackRectangle()
          Rubber-bands a rectangle on the PageLayoutControl.
 void zoomToWholePage()
          Changes the extent of the PageLayout to show a whole page.
 
Methods inherited from class com.esri.arcgis.interop.Ocx
checkIfVisible, getCanvasWindowHandle, getControlWindowHandle, getMinimumSize, getObjRef, getPreferredSize, paint, removeNotify, setBounds, setBounds, setSize, setSize, zz_doQueuedSets, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_get, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet, zz_queueSet
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

PageLayoutControl

public PageLayoutControl()
Constructs a PageLayoutControl using ArcGIS Engine.


PageLayoutControl

public PageLayoutControl(Object o)
Constructs a PageLayoutControl.

Method Detail

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

addIPageLayoutControlEventsListener

public void addIPageLayoutControlEventsListener(IPageLayoutControlEvents theListener)
                                         throws IOException
addIPageLayoutControlEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IPageLayoutControlEvents interface.
Throws:
IOException - If there are communications problems.

removeIPageLayoutControlEventsListener

public void removeIPageLayoutControlEventsListener(IPageLayoutControlEvents theListener)
                                            throws IOException
removeIPageLayoutControlEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.IPageLayoutControlEvents interface.
Throws:
IOException - If there are communications problems.

addITOCBuddyEventsListener

public void addITOCBuddyEventsListener(ITOCBuddyEvents theListener)
                                throws IOException
addITOCBuddyEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.ITOCBuddyEvents interface.
Throws:
IOException - If there are communications problems.

removeITOCBuddyEventsListener

public void removeITOCBuddyEventsListener(ITOCBuddyEvents theListener)
                                   throws IOException
removeITOCBuddyEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.controls.ITOCBuddyEvents interface.
Throws:
IOException - If there are communications problems.

addNotify

public void addNotify()
Overrides:
addNotify in class com.esri.arcgis.interop.Ocx

setBackColor

public void setBackColor(int rhs1)
                  throws IOException,
                         AutomationException
Background color of the PageLayoutControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
setBackColor in interface IPageLayoutControl
Specified by:
setBackColor in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackColor

public int getBackColor()
                 throws IOException,
                        AutomationException
Background color of the PageLayoutControl.

Description

Returns or sets the Background Color of the PageLayoutControl. The Background color is used to draw the area of the Control outside the Page itself. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

Product Availability

Available with ArcGIS Engine.

Specified by:
getBackColor in interface IPageLayoutControl
Specified by:
getBackColor in interface IPageLayoutControlDefault
Returns:
The returnValue (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBorderStyle

public void setBorderStyle(int rhs1)
                    throws IOException,
                           AutomationException
The border style of the PageLayoutControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
setBorderStyle in interface IPageLayoutControl
Specified by:
setBorderStyle in interface IPageLayoutControlDefault
Parameters:
rhs1 - A com.esri.arcgis.controls.esriControlsBorderStyle constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBorderStyle

public int getBorderStyle()
                   throws IOException,
                          AutomationException
The border style of the PageLayoutControl.

Description

Returns or sets the border style of a PageLayoutControl. By default a border is drawn.

Product Availability

Available with ArcGIS Engine.

Specified by:
getBorderStyle in interface IPageLayoutControl
Specified by:
getBorderStyle in interface IPageLayoutControlDefault
Returns:
A com.esri.arcgis.controls.esriControlsBorderStyle constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_setEnabled

public void esri_setEnabled(boolean rhs1)
                     throws IOException,
                            AutomationException
Indicates whether the PageLayoutControl can respond to user generated events.

Product Availability

Available with ArcGIS Engine.

Specified by:
esri_setEnabled in interface IPageLayoutControl
Specified by:
esri_setEnabled in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_isEnabled

public boolean esri_isEnabled()
                       throws IOException,
                              AutomationException
Indicates whether the PageLayoutControl can respond to user generated events.

Product Availability

Available with ArcGIS Engine.

Specified by:
esri_isEnabled in interface IPageLayoutControl
Specified by:
esri_isEnabled in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAppearance

public void setAppearance(int rhs1)
                   throws IOException,
                          AutomationException
The appearance of the PageLayoutControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAppearance in interface IPageLayoutControl
Specified by:
setAppearance in interface IPageLayoutControlDefault
Parameters:
rhs1 - A com.esri.arcgis.controls.esriControlsAppearance constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAppearance

public int getAppearance()
                  throws IOException,
                         AutomationException
The appearance of the PageLayoutControl.

Description

Returns or sets the paint style of a PageLayoutControl to either Flat or 3D. By default the appearance is flat.

Product Availability

Available with ArcGIS Engine.

Specified by:
getAppearance in interface IPageLayoutControl
Specified by:
getAppearance in interface IPageLayoutControlDefault
Returns:
A com.esri.arcgis.controls.esriControlsAppearance constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMousePointer

public void setMousePointer(int rhs1)
                     throws IOException,
                            AutomationException
The mouse pointer displayed over the PageLayoutControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
setMousePointer in interface IPageLayoutControl
Specified by:
setMousePointer in interface IPageLayoutControlDefault
Parameters:
rhs1 - A com.esri.arcgis.controls.esriControlsMousePointer constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMousePointer

public int getMousePointer()
                    throws IOException,
                           AutomationException
The mouse pointer displayed over the PageLayoutControl.

Description

Use this property when you want to indicate changes in functionality as the mouse pointer passes over the PageLayoutControl. The esriPointerArrowHourglass setting (11) is useful for indicating that the user should wait for a process or operation to finish.

Product Availability

Available with ArcGIS Engine.

Specified by:
getMousePointer in interface IPageLayoutControl
Specified by:
getMousePointer in interface IPageLayoutControlDefault
Returns:
A com.esri.arcgis.controls.esriControlsMousePointer constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.getMouseIcon()

setMouseIconByRef

public void setMouseIconByRef(Picture rhs1)
                       throws IOException,
                              AutomationException
Custom mouse icon used if MousePointer is 99.

Description

The MouseIcon property provides a custom icon that is used when the IPageLayoutControlDefault::MousePointer property is set to 99.

You can use the MouseIcon property to load either cursor (.cur) or icon (.ico) files. The MouseIcon property provides your program with easy access to custom cursors of any size, with any desired hot spot location. This property cannot be used to load animated cursor (.ani) files.

PageLayoutControl1.MouseIcon = LoadPicture("c:\winnt\cursors\mycursor.cur")

Product Availability

Available with ArcGIS Engine.

Specified by:
setMouseIconByRef in interface IPageLayoutControl
Specified by:
setMouseIconByRef in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMouseIcon

public Picture getMouseIcon()
                     throws IOException,
                            AutomationException
Custom mouse icon used if MousePointer is 99.

Description

The MouseIcon property provides a custom icon that is used when the MousePointer property is set to esriPointerArrowHourglass (99).

Remarks

In most development evironments the control's property pages can be used to load either a cursor (.cur) or icon (.ico) file. A cursor contains a custom 'hotspot' location and can be any size. The 'hotspot' location for an icon file defaults to the center of the icon. This property cannot be used to load animated cursor (.ani) files.

To programatically create an object implementing IPictureDisp there is the win32 function OleLoadPicture or helper methods depending on the development environment.

Product Availability

Available with ArcGIS Engine.

Specified by:
getMouseIcon in interface IPageLayoutControl
Specified by:
getMouseIcon in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.support.ms.stdole.Picture (A com.esri.arcgis.support.ms.stdole.Picture COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.getMousePointer()

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
Handle to the window associated with the PageLayoutControl.

Description

The operating environment identifies each window, form and control in an application by assigning it a handle, or hWnd. Many ArcObjects methods and Windows API calls require the hWnd as an argument.

Product Availability

Available with ArcGIS Engine.

Specified by:
getHWnd in interface IPageLayoutControl
Specified by:
getHWnd in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

aboutBox

public void aboutBox()
              throws IOException,
                     AutomationException
Displays a dialog of information about the PageLayoutControl.

Description

The AboutBox method causes a modal dialog box to display on top of the PageLayoutControl, containing information about the version and creation date of the PageLayoutControl as well as listing relevant legal and copyright information from ESRI.

Product Availability

Available with ArcGIS Engine.

Specified by:
aboutBox in interface IPageLayoutControl
Specified by:
aboutBox in interface IPageLayoutControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentTool

public ITool getCurrentTool()
                     throws IOException,
                            AutomationException
Current active tool for the PageLayoutControl. Set to nothing to clear the tool.

Description

The CurrentTool is the tool used to interact will the PageLayoutControl's display. Always check if a tool is enabled before setting it to the CurrentTool property, otherwise a user will be able to use a tool that is actually disabled.

Remarks

When the CurrentTool is set the following events occur:

  1. The ITool::Deactivate event is triggered on the 'old' CurrentTool if one was set. If this event returns false a trappable error ocurrs. If this event returns true the 'old' CurrentTool is removed and replaced.
  2. The ICommand::OnClick event is triggered on the 'new' CurrentTool and its cursor is picked up.

Within an ITool implementation it is recommended that the ITool::Deactivate event returns true. This allows a 'new' CurrentTool to be set, and allows the release of the CurrentTool when an application is shutting down.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCurrentTool in interface IPageLayoutControl
Specified by:
getCurrentTool in interface IPageLayoutControlDefault
Specified by:
getCurrentTool in interface IToolbarBuddy
Returns:
A reference to a com.esri.arcgis.systemUI.ITool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentToolByRef

public void setCurrentToolByRef(ITool rhs1)
                         throws IOException,
                                AutomationException
Current active tool for the PageLayoutControl. Set to nothing to clear the tool.

Product Availability

Available with ArcGIS Engine.

Specified by:
setCurrentToolByRef in interface IPageLayoutControl
Specified by:
setCurrentToolByRef in interface IPageLayoutControlDefault
Specified by:
setCurrentToolByRef in interface IToolbarBuddy
Parameters:
rhs1 - A reference to a com.esri.arcgis.systemUI.ITool (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPageLayout

public IPageLayout getPageLayout()
                          throws IOException,
                                 AutomationException
The PageLayout contained by the PageLayoutControl.

Description

This is the PageLayout CoClass contained within the PageLayoutControl. If the PageLayout is replaced the IPageLayoutControlEvents::OnPageLayoutReplaced event is triggered.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPageLayout in interface IMxdContents
Specified by:
getPageLayout in interface IPageLayoutControl
Specified by:
getPageLayout in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.carto.IPageLayout
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.getPrinterPageCount(double), IPageLayoutControl.printPageLayout(short, short, double), IPageLayoutControl.getPrinter(), IPageLayoutControl.getPage()

setPageLayoutByRef

public void setPageLayoutByRef(IPageLayout rhs1)
                        throws IOException,
                               AutomationException
The PageLayout contained by the PageLayoutControl.

Product Availability

Available with ArcGIS Engine.

Specified by:
setPageLayoutByRef in interface IPageLayoutControl
Specified by:
setPageLayoutByRef in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.carto.IPageLayout (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveView

public IActiveView getActiveView()
                          throws IOException,
                                 AutomationException
The active view of the PageLayout contained by the PageLayoutControl.

Description

This is the ActiveView on the PageLayout CoClass contained within the PageLayoutControl.

Remarks

When the PageLayoutControl is added to a container the PageLayout's element selection, IActiveView::Selection, is Nothing. This causes the esriViewGraphicSelection draw phase to ignore any selected graphics. To resolve this, set the IActiveView::Selection property to the IViewManager::ElementSelection property. This will result in the MapFrame element becoming selected.

The IActiveView::ShowRuler property will not display any rulers on the PageLayout because the PageLayoutControl does not itself manage rulers. An application must draw its own rulers.

Product Availability

Available with ArcGIS Engine.

Specified by:
getActiveView in interface IMxdContents
Specified by:
getActiveView in interface IPageLayoutControl
Specified by:
getActiveView in interface IPageLayoutControlDefault
Specified by:
getActiveView in interface ITOCBuddy
Returns:
A reference to a com.esri.arcgis.carto.IActiveView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws IOException,
                           AutomationException
Current extent of the PageLayout in page units.

Description

Returns or sets a new envelope which is represents the visible extent of the PageLayout. Setting the Extent property will automatically cause the PageLayoutControl to refresh its display.

Product Availability

Available with ArcGIS Engine.

Specified by:
getExtent in interface IPageLayoutControl
Specified by:
getExtent in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExtent

public void setExtent(IEnvelope rhs1)
               throws IOException,
                      AutomationException
Current extent of the PageLayout in page units.

Product Availability

Available with ArcGIS Engine.

Specified by:
setExtent in interface IPageLayoutControl
Specified by:
setExtent in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullExtent

public IEnvelope getFullExtent()
                        throws IOException,
                               AutomationException
Rectangular shape that encloses the PageLayout.

Description

Returns or sets an envelope object which by default is the PageLayout's page size expanded by a factor of 1.9 and which is automatically set whenever the page size changes. Setting the FullExtent triggers the IPageLayoutControlEvents::OnFullExtentUpated event.

Remarks

The FullExtent property is a shortcut to IActiveView::FullExtent which is in turn a shortcut to IDisplayTransformation::Bounds. Setting the FullExtent property will not affect the Extent property.

Product Availability

Available with ArcGIS Engine.

Specified by:
getFullExtent in interface IPageLayoutControl
Specified by:
getFullExtent in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFullExtent

public void setFullExtent(IEnvelope rhs1)
                   throws IOException,
                          AutomationException
Rectangular shape that encloses the PageLayout.

Product Availability

Available with ArcGIS Engine.

Specified by:
setFullExtent in interface IPageLayoutControl
Specified by:
setFullExtent in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPage

public IPage getPage()
              throws IOException,
                     AutomationException
The Page associated with the PageLayout contained by the PageLayoutControl.

Description

The Page property is based upon the IPageLayout::Page property. Use the Page to manage the on screen visual representation of the printer page such as page size and orientation.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPage in interface IPageLayoutControl
Specified by:
getPage in interface IPageLayoutControlDefault
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:
IPageLayoutControl.getPrinterPageCount(double), IPageLayoutControl.printPageLayout(short, short, double), IPageLayoutControl.getPageLayout(), IPageLayoutControl.getPrinter()

getGraphicsContainer

public IGraphicsContainer getGraphicsContainer()
                                        throws IOException,
                                               AutomationException
The graphics container of the PageLayout object contained by the PageLayoutControl.

Description

This property is a shortcut to IActiveView::GraphicsContainer.

Remarks

This property will always return a reference to the PageLayout's GraphicsContainer rather than to any GraphicsContainer associated with a Map.

Product Availability

Available with ArcGIS Engine.

Specified by:
getGraphicsContainer in interface IPageLayoutControl
Specified by:
getGraphicsContainer in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.carto.IGraphicsContainer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

printPageLayout

public void printPageLayout(short startPage,
                            short endPage,
                            double overlap)
                     throws IOException,
                            AutomationException
Sends the specified range of pages on the printer.

Description

PrintPageLayout sends the PageLayout to the Printer. If the Page does not fit the IPrinter::Paper, the value of IPage::PageToPrinterMapping will determine whether the Page is cropped, scaled or tiled across the Printer's paper.

Remarks

Before using the PrintPageLayout property, ensure that the orientation of IPrinter::Paper is the same orientation as the Page.

Product Availability

Available with ArcGIS Engine.

Specified by:
printPageLayout in interface IPageLayoutControl
Specified by:
printPageLayout in interface IPageLayoutControlDefault
Parameters:
startPage - The startPage (in, optional, pass 1 if not required)
endPage - The endPage (in, optional, pass 0 if not required)
overlap - The overlap (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.getPrinterPageCount(double), IPageLayoutControl.getPageLayout(), IPageLayoutControl.getPrinter(), IPageLayoutControl.getPage()

getPrinter

public IPrinter getPrinter()
                    throws IOException,
                           AutomationException
The printer object used by the PageLayoutControl for printing.

Description

Unless the Printer property has been set to a specific printer, the property will return the default system printer. Before issuing a print always check that the PageLayoutControl has a printer.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPrinter in interface IPageLayoutControl
Specified by:
getPrinter in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.output.IPrinter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.getPrinterPageCount(double), IPageLayoutControl.printPageLayout(short, short, double), IPageLayoutControl.getPageLayout(), IPageLayoutControl.getPage()

setPrinterByRef

public void setPrinterByRef(IPrinter rhs1)
                     throws IOException,
                            AutomationException
The printer object used by the PageLayoutControl for printing.

Product Availability

Available with ArcGIS Engine.

Specified by:
setPrinterByRef in interface IPageLayoutControl
Specified by:
setPrinterByRef in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.output.IPrinter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTrackCancel

public ITrackCancel getTrackCancel()
                            throws IOException,
                                   AutomationException
The object used by the PageLayoutControl to check if drawing has been aborted.

Remarks

Use the TrackCancel object to enable users to stop printing, exporting or drawing processes by using the escape or spacebar keys.

Product Availability

Available with ArcGIS Engine.

Specified by:
getTrackCancel in interface IPageLayoutControl
Specified by:
getTrackCancel in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.system.ITrackCancel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTrackCancelByRef

public void setTrackCancelByRef(ITrackCancel rhs1)
                         throws IOException,
                                AutomationException
The object used by the PageLayoutControl to check if drawing has been aborted.

Product Availability

Available with ArcGIS Engine.

Specified by:
setTrackCancelByRef in interface IPageLayoutControl
Specified by:
setTrackCancelByRef in interface IPageLayoutControlDefault
Parameters:
rhs1 - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

pan

public void pan()
         throws IOException,
                AutomationException
Tracks the mouse while panning the PageLayoutControl.

Description

Pan preserves the scale of the PageLayout, but changes the Extent property.

Remarks

Use the Pan method within the IPageLayoutControlEvents::OnMouseDown event to allow the user to pan contents of the PageLayoutControl. The IPageLayoutControlEvents::OnMouseMove event will be triggered during the pan, but no IPageLayoutControlEvents::OnMouseUp event will occur. The ESC key on the keyboard can be used during panning to cancel the Pan.

Product Availability

Available with ArcGIS Engine.

Specified by:
pan in interface IPageLayoutControl
Specified by:
pan in interface IPageLayoutControlDefault
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

centerAt

public void centerAt(IPoint centerPoint)
              throws IOException,
                     AutomationException
Moves the center of the PageLayoutControl to the specified location.

Description

The CenterAt method positions the supplied point in the center of the PageLayoutControl. The Extent of the PageLayoutControl will change, but the scale will remain the same.

Product Availability

Available with ArcGIS Engine.

Specified by:
centerAt in interface IPageLayoutControl
Specified by:
centerAt in interface IPageLayoutControlDefault
Parameters:
centerPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trackRectangle

public IEnvelope trackRectangle()
                         throws IOException,
                                AutomationException
Rubber-bands a rectangle on the PageLayoutControl.

Description

Use the TrackRectangle method within the IPageLayoutControlEvents::OnMouseDown event to rubberband a user defined rectangle. The IPageLayoutControlEvents::OnMouseMove event will be triggered during the track, but no IPageLayoutControlEvents::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackRectangle.

Product Availability

Available with ArcGIS Engine.

Specified by:
trackRectangle in interface IPageLayoutControl
Specified by:
trackRectangle in interface IPageLayoutControlDefault
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addElement

public void addElement(IElement pElement,
                       Object geometry,
                       Object symbology,
                       Object name,
                       int zOrder)
                throws IOException,
                       AutomationException
Adds the supplied element to the PageLayout, with optional geometry, symbolization, name and Z order.

Description

Adds an element to the GraphicsContainer.

geometry an object that implements IGeometry
symbology an object that implements ISymbol or IColor (symbology is applied to the element using the IPropertySupport interface)
name a string

Product Availability

Available with ArcGIS Engine.

Specified by:
addElement in interface IPageLayoutControl
Specified by:
addElement in interface IPageLayoutControlDefault
Parameters:
pElement - A reference to a com.esri.arcgis.carto.IElement (in)
geometry - A Variant (in, optional, pass null if not required)
symbology - A Variant (in, optional, pass null if not required)
name - A Variant (in, optional, pass null if not required)
zOrder - The zOrder (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.locateFrontElement(double, double, double), IPageLayoutControl.findElementByName(String, int)

locateFrontElement

public IElement locateFrontElement(double pageX,
                                   double pageY,
                                   double tolerance)
                            throws IOException,
                                   AutomationException
Locates an element at the given page co-ordinates. If more than one element is at the location the element nearest the front is returned.

Description

LocateFrontElement is typically used within the IPageLayoutControlEvents::OnMouseDown event to retrieve an element at the given page coordinates. If more than one element exists at the given page coordinates, the element located at the front is returned.

Product Availability

Available with ArcGIS Engine.

Specified by:
locateFrontElement in interface IPageLayoutControl
Specified by:
locateFrontElement in interface IPageLayoutControlDefault
Parameters:
pageX - The pageX (in)
pageY - The pageY (in)
tolerance - The tolerance (in, optional, pass 0 if not required)
Returns:
A reference to a com.esri.arcgis.carto.IElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.findElementByName(String, int), IPageLayoutControl.addElement(com.esri.arcgis.carto.IElement, java.lang.Object, java.lang.Object, java.lang.Object, int)

findElementByName

public IElement findElementByName(String name,
                                  int occurence)
                           throws IOException,
                                  AutomationException
Find the first element with the supplied name, supply an occurrence parameter to find the second, third and so on.

Description

If an empty string is supplied then any elements with no name are found. By default new elements are created with no name. To give an element a name so it can easily be found use one of the following methods: either supply a name string when using the AddElement method, or implement the IElementProperties interface.

Product Availability

Available with ArcGIS Engine.

Specified by:
findElementByName in interface IPageLayoutControl
Specified by:
findElementByName in interface IPageLayoutControlDefault
Parameters:
name - The name (in)
occurence - The occurence (in, optional, pass 1 if not required)
Returns:
A reference to a com.esri.arcgis.carto.IElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.locateFrontElement(double, double, double), IPageLayoutControl.addElement(com.esri.arcgis.carto.IElement, java.lang.Object, java.lang.Object, java.lang.Object, int)

loadMxFile

public void loadMxFile(String fileName,
                       Object password)
                throws IOException,
                       AutomationException
Loads the specified map document into the PageLayout contained by the PageLayoutControl.

Description

Loads an map document into the PageLayoutControl. The map document can be an ArcMap document, an ArcMap template or an ArcReader document. Use the CheckMxFile method to determine if the specified map document is a valid map document.

Remarks

When LoadMXfile is used the user may be prompted for a password; refer to the tables below to determine when this may occur. Additionally, password prompts may be given if accessing MapDocuments using either the PageLayoutControl's PropertyPage, ArcMap or ArcReader; the tables also show in what circumstances this will occur.

Loading Map Documents (*.mxd, *.mxt, *.pmf) which reference IMS Services (with and without security)

Application No Secure Services MXD/ MXT/ PMF files Secure Servcies MXD/ MXT/ PMF files Secure Servcies (password cached) MXD/ MXT files Secure Servcies (password cached) PMF files
PageLayoutControl (programmatically) No Prompt Prompt No Prompt Prompt
PageLayoutControl (property pages) No Prompt Prompt No Prompt Prompt
ArcMap No Prompt Prompt No Prompt Prompt
ArcReader (PMF files only) No Prompt Prompt N/A No Prompt

* The Connection to the Internet server must have the Save User/ Password setting enabled. This can be set, for example, when using Add Internet Server in the Add Layers Dialog. Additionally, in the case of PMF files the ArcPublisher Cache password in PMF file setting must be enabled.

Loading Published Map Files (*.pmf) (with and without password protection)

Application PMF with No Password PMF with Password
PageLayoutControl (programmatically) No Prompt Supply in Code
PageLayoutControl (property pages) No Prompt Prompt
ArcMap No Prompt Prompt
ArcReader No Prompt Prompt

Product Availability

Available with ArcGIS Engine.

Specified by:
loadMxFile in interface IPageLayoutControl
Specified by:
loadMxFile in interface IPageLayoutControlDefault
Parameters:
fileName - The fileName (in)
password - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.checkMxFile(String)

isOleDropEnabled

public boolean isOleDropEnabled()
                         throws IOException,
                                AutomationException
Indicates if the PageLayoutControl will fire events when data is dragged over the control's window.

Description

Indicates if the PageLayoutControl will accept data dragged from another application and fire the IPageLayoutControlEvents::OnOleDrop event. By default the OleDropEnabled property is set to false.

Product Availability

Available with ArcGIS Engine.

Specified by:
isOleDropEnabled in interface IPageLayoutControl
Specified by:
isOleDropEnabled in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOleDropEnabled

public void setOleDropEnabled(boolean rhs1)
                       throws IOException,
                              AutomationException
Indicates if the PageLayoutControl will fire events when data is dragged over the control's window.

Product Availability

Available with ArcGIS Engine.

Specified by:
setOleDropEnabled in interface IPageLayoutControl
Specified by:
setOleDropEnabled in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkMxFile

public boolean checkMxFile(String fileName)
                    throws IOException,
                           AutomationException
Checks the specified filename to see if it is a map document that can be loaded into the PageLayoutControl.

Description

Determines whether the specified map document (*.mxd, *.mxt, *.pmf) is a valid map document and can be loaded into the PageLayoutControl. The method verifies the file exists and verifies the file internals conform to an expected storage format. The method does not read and validate the entire contents of the file; use the LoadMxFile to do this.

Product Availability

Available with ArcGIS Engine.

Specified by:
checkMxFile in interface IPageLayoutControl
Specified by:
checkMxFile in interface IPageLayoutControlDefault
Parameters:
fileName - The fileName (in)
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.loadMxFile(String, java.lang.Object)

zoomToWholePage

public void zoomToWholePage()
                     throws IOException,
                            AutomationException
Changes the extent of the PageLayout to show a whole page.

Description

The method is based upon the IPageLayout::ZoomToWhole method.

Product Availability

Available with ArcGIS Engine.

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

getPrinterPageCount

public short getPrinterPageCount(double overlap)
                          throws IOException,
                                 AutomationException
The number of printer pages the PageLayout will cover.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPrinterPageCount in interface IPageLayoutControl
Specified by:
getPrinterPageCount in interface IPageLayoutControlDefault
Parameters:
overlap - The overlap (in, optional, pass 0 if not required)
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refresh

public void refresh(int phase,
                    Object layerOrElement,
                    Object envelope)
             throws IOException,
                    AutomationException
Redraws the PageLayout, optionally just redraw specified phases or envelope.

Description

Use the Refresh method to redraw the display. If the Refresh method is used and no arguments are supplied the refresh is based upon the IActiveView::Refresh method.

In all other cases the refresh is based upon the IActiveView::PartialRefresh method. The Refresh method supports the esriViewDrawPhases given below:

0 :esriViewNone

1 :esriViewBackground

2 :esriViewGeography

4 :esriViewGeoSelection

8 :esriViewGraphics

16 :esriViewSelection

32 :esriViewForeground

If the Refresh method is used and no phase argument is supplied, but one of the other arguments is supplied then all phases will be refreshed and the phase value will be 65535. Always supply a phase whenever possible to increase efficiency.

Use the layerOrElement argument to refresh a particular layer or graphic element. Use the envelope argument to refresh only a particular region. For example, if a new graphic is added you may only want to refresh the area surrounding the graphic.

Remarks

Use the TrackCancel object to set whether users can stop drawing processes by using the escape or spacebar keys or by clicking the mouse.

Product Availability

Available with ArcGIS Engine.

Specified by:
refresh in interface IPageLayoutControl
Specified by:
refresh in interface IPageLayoutControlDefault
Parameters:
phase - A com.esri.arcgis.carto.esriViewDrawPhase constant (in, optional, pass 65535 if not required)
layerOrElement - A Variant (in, optional, pass null if not required)
envelope - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromPagePoint

public void fromPagePoint(IPoint pt,
                          int[] x,
                          int[] y)
                   throws IOException,
                          AutomationException
Converts a point on the page (in page units) to device co-ordinates (typically pixels).

Description

The FromPagePoint method takes an input point in IPage::Units, and populates two variables with the equivalent control coordinates in pixels.

Product Availability

Available with ArcGIS Engine.

Specified by:
fromPagePoint in interface IPageLayoutControl
Specified by:
fromPagePoint in interface IPageLayoutControlDefault
Parameters:
pt - A reference to a com.esri.arcgis.geometry.IPoint (in)
x - The x (in/out: use single element array)
y - The y (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.toPagePoint(int, int)

toPagePoint

public IPoint toPagePoint(int x,
                          int y)
                   throws IOException,
                          AutomationException
Converts device co-ordinates (typically pixels) to a point on the page (in page units).

Description

ToPagePoint converts a (X,Y) location in pixels to IPage::Units.

Product Availability

Available with ArcGIS Engine.

Specified by:
toPagePoint in interface IPageLayoutControl
Specified by:
toPagePoint in interface IPageLayoutControlDefault
Parameters:
x - The x (in)
y - The y (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPageLayoutControl.fromPagePoint(com.esri.arcgis.geometry.IPoint, int[], int[])

getCustomProperty

public Object getCustomProperty()
                         throws IOException,
                                AutomationException
A property to associate data with a control.

Description

Use the CustomProperty to associate any useful data with the PageLayoutControl. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.

Product Availability

Available with ArcGIS Engine.

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

setCustomProperty

public void setCustomProperty(Object rhs1)
                       throws IOException,
                              AutomationException
A property to associate data with a control.

Product Availability

Available with ArcGIS Engine.

Specified by:
setCustomProperty in interface IPageLayoutControl2
Specified by:
setCustomProperty in interface IPageLayoutControlDefault
Parameters:
rhs1 - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

suppressResizeDrawing

public void suppressResizeDrawing(boolean suppressResize,
                                  int resizeHWnd)
                           throws IOException,
                                  AutomationException
Suppress full redraw of control during resize operations.

Description

If the PageLayoutControl contains a lot of data, redrawing this data during a resize event can be costly. To increase performance you can suppress the data redraw until the resizing is complete with the SuppressResizeDrawing method. During the resize a stretched bitmap will be drawn instead.

Passing the suppressResize value sets the IScreenDisplay::SuppressResize property on the ActiveView. Pass True to suppress normal drawing and draw a stretched bitmap when a resize event begins. During the resize the data is not refereshed and the captured image is stretched. As such, the image can appear pixelated when a small display area is resized to a large display area. Pass False to resume normal drawing when a resize event ends.

In development environments that do not trap the beginning and end of a resize event, the PageLayoutControl can 'watch' the hwnd supplied to the SuppressResizeDrawing method. When a form or container starts resizing the WM_ENTERSIZEMOVE windows messge is sent and the PageLayoutControl will set suppressResize to True. When windows sends the WM_EXITSIZEMOVE message the form or container is released from resizing and the the PageLayoutControl will set suppressResize to False. Pass the hwnd of the form or container to the SuppressResizeDrawing method when the form or container is initialized. Passing an hwnd of 0 will stop the PageLayoutControl watching the hwnd.

Product Availability

Available with ArcGIS Engine.

Specified by:
suppressResizeDrawing in interface IPageLayoutControl2
Specified by:
suppressResizeDrawing in interface IPageLayoutControlDefault
Parameters:
suppressResize - The suppressResize (in)
resizeHWnd - The resizeHWnd (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentFilename

public String getDocumentFilename()
                           throws IOException,
                                  AutomationException
The filename of the last map document loaded into the control.

Description

Returns the DocumentFilename of the last document loaded into the PagelayoutControl with the LoadMxFile method. An empty string will be returned if no document is loaded.

Product Availability

Available with ArcGIS Engine.

Specified by:
getDocumentFilename in interface IPageLayoutControl2
Specified by:
getDocumentFilename in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDocumentFilename

public void setDocumentFilename(String rhs1)
                         throws IOException,
                                AutomationException
The filename of the last map document loaded into the control.

Product Availability

Available with ArcGIS Engine.

Specified by:
setDocumentFilename in interface IPageLayoutControl2
Specified by:
setDocumentFilename in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObject

public Object getObject()
                 throws IOException,
                        AutomationException
A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.

Description

In some development environments it is not possible to query interface directly on the control to other COM interfaces, beacuse the control is contained within a wrapper object. To get the real control use the Object property.

Product Availability

Available with ArcGIS Engine.

Specified by:
getObject in interface IPageLayoutControl2
Specified by:
getObject in interface IPageLayoutControlDefault
Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getKeyIntercept

public int getKeyIntercept()
                    throws IOException,
                           AutomationException
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

Description

Returns or sets keys on the keyboard that will be intercepted by the PageLayoutControl, triggering the OnKeyDown and OnKeyUp events when pressed. These keys are often hidden from the PageLayoutControl by the development environment container. By default the KeyIntercept is set to esriKeyInterceptNone.

Many development environment containers use the up, down, left and right arrow keys to change control focus on a form. These keys can also be useful for navigating around the display. To intercept the arrow keys and the Tab key combine the enum values using a logical OR operation (esriKeyInterceptArrowKeys OR esriKeyInterceptTabKey, which is 1 OR 4 = 5).

Product Availability

Available with ArcGIS Engine.

Specified by:
getKeyIntercept in interface IPageLayoutControl2
Specified by:
getKeyIntercept in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setKeyIntercept

public void setKeyIntercept(int rhs1)
                     throws IOException,
                            AutomationException
A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.

Product Availability

Available with ArcGIS Engine.

Specified by:
setKeyIntercept in interface IPageLayoutControl2
Specified by:
setKeyIntercept in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAutoMouseWheel

public boolean isAutoMouseWheel()
                         throws IOException,
                                AutomationException
Indicates whether the mouse wheel is enabled.

Description

Determines whether the mouse wheel can be used to zoom in and zoom out of the control's display. This property is true by default.

Product Availability

Available with ArcGIS Engine.

Specified by:
isAutoMouseWheel in interface IPageLayoutControl3
Specified by:
isAutoMouseWheel in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAutoMouseWheel

public void setAutoMouseWheel(boolean rhs1)
                       throws IOException,
                              AutomationException
Indicates whether the mouse wheel is enabled.

Description

Determines whether the keyboard the control's display. This property is true by default.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAutoMouseWheel in interface IPageLayoutControl3
Specified by:
setAutoMouseWheel in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAutoKeyboardScrolling

public boolean isAutoKeyboardScrolling()
                                throws IOException,
                                       AutomationException
Indicates whether keyboard scrolling is enabled.

Description

Determines whether the 'Home' (keyCode 36), 'End' (keyCode 35), 'Page Down' (keyCode 34), 'PageUp' (keyCode 33) and 'Arrow' (keyCode 37-40) keys on the keyboard can be used to pan around the control's display. This property is true by default.

Most development environments use the 'Arrow' keys to switch focus between the controls embedded in a form or container. In such environments the PageLayoutControl will not by default receive the 'Arrow' keys to pan the display. To ensure 'Arrow' keys are received by the PageLayoutControl the KeyIntercept property must be set to intercept the 'Arrow' keys in order to pan the display when AutoKeyboardScrolling is true.

Product Availability

Available with ArcGIS Engine.

Specified by:
isAutoKeyboardScrolling in interface IPageLayoutControl3
Specified by:
isAutoKeyboardScrolling in interface IPageLayoutControlDefault
Returns:
The returnValue
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAutoKeyboardScrolling

public void setAutoKeyboardScrolling(boolean rhs1)
                              throws IOException,
                                     AutomationException
Indicates whether keyboard scrolling is enabled.

Product Availability

Available with ArcGIS Engine.

Specified by:
setAutoKeyboardScrolling in interface IPageLayoutControl3
Specified by:
setAutoKeyboardScrolling in interface IPageLayoutControlDefault
Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getScale

public double getScale(IBasicMap pBasicMap)
                throws IOException,
                       AutomationException
Returns the scale of the supplied BasicMap, this allows for objects that do not support IMap.

Description

The GetScale method returns scale of the supplied Map or Scene. If the scale is unknown the GetScale method returns 0.0.

Product Availability

Available with ArcGIS Engine.

Specified by:
getScale in interface ITOCBuddy
Parameters:
pBasicMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
Returns:
The dScale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMap

public IMap getMap()
            throws IOException,
                   AutomationException
The Map object.

Remarks

The map property is not supported in the case of new map being set into the focus map of the PageLayoutControl.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMap in interface IMxdContents
Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStreamInit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pStm)
          throws IOException,
                 AutomationException
load

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStreamInit
Parameters:
pStm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pStm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStreamInit
Parameters:
pStm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pCbSize)
                throws IOException,
                       AutomationException
getSizeMax

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStreamInit
Parameters:
pCbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initNew

public void initNew()
             throws IOException,
                    AutomationException
initNew

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
initNew in interface IPersistStreamInit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.