com.esri.arcgis.display
Class IScreenDisplayProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.display.IDisplayProxy
          extended bycom.esri.arcgis.display.IScreenDisplayProxy
All Implemented Interfaces:
java.io.Externalizable, IDisplay, IScreenDisplay, java.io.Serializable
Direct Known Subclasses:
IAppDisplayProxy

public class IScreenDisplayProxy
extends IDisplayProxy
implements IScreenDisplay, java.io.Serializable

Provides access to members that control Screen Display.

Product Availability

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

See Also:
Serialized Form

Field Summary
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF
 
Constructor Summary
  IScreenDisplayProxy()
          For internal use only
  IScreenDisplayProxy(java.lang.Object obj)
           
protected IScreenDisplayProxy(java.lang.Object obj, java.lang.String iid)
           
  IScreenDisplayProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IScreenDisplayProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, AuthInfo authInfo)
           
 
Method Summary
 short addCache()
          Creates a new cache and return its ID.
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
          Adds a Java object to be a listener for a specific kind of event generated by the COM object.
 void doScroll(int xDelta, int yDelta, boolean updateScreen)
          Scrolls the screen by the specified amount.
 void drawCache(int hDC, short index, tagRECT deviceRect, tagRECT cacheRect)
          Draws the specified screen cache to the specified window device context.
 short getActiveCache()
          Screen cache where drawing occurs.
 short getCacheCount()
          Number of screen caches.
 int getCacheMemDC(short index)
          Memory device context for the specified screen cache.
 ITrackCancel getCancelTracker()
          Cancel tracker that is associated with the display.
 int getHWnd()
          Associated window handle.
 int getWindowDC()
          Device context for the associated window.
 void invalidate(IEnvelope rect, boolean erase, short cacheIndex)
          Cause the specified area of the specified cache to redraw.
 boolean isCacheDirty(short cacheIndex)
          Indicates if the specified cache needs refreshing.
 boolean isFirstCacheTransparent()
          Indicates if the bottom cache is transparent.
 boolean isFramed()
          Indicates if drawing occurs in a frame rather than on the whole window.
 boolean isScaleContents()
          Indicates if the contents of the screen scale when a resize occurs.
 boolean isSuppressResize()
          Indicates if display resizing is suppressed.
 boolean isUseScrollbars()
          Indicates if scrollbars should appear.
 void panMoveTo(IPoint mouseLocation)
          Pans to a new point.
 void panStart(IPoint mouseLocation)
          Prepares display for panning.
 IEnvelope panStop()
          Stops panning and returns new visible bounds.
 void removeAllCaches()
          Removes all caches.
 void removeCache(short cacheID)
          Removes the specified cache.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 void rotateMoveTo(IPoint pPoint)
          Rotates to new point.
 void rotateStart(IPoint mousePt, IPoint centerPt)
          Prepares display for rotating.
 double rotateStop()
          Stops rotating and returns new angle.
 void rotateTimer()
          Draws the rotated display.
 void setActiveCache(short index)
          Screen cache where drawing occurs.
 void setCancelTrackerByRef(ITrackCancel cancelTracker)
          Cancel tracker that is associated with the display.
 void setHWnd(int hWnd)
          Associated window handle.
 void setIsFirstCacheTransparent(boolean flag)
          Indicates if the bottom cache is transparent.
 void setIsFramed(boolean flag)
          Indicates if drawing occurs in a frame rather than on the whole window.
 void setScaleContents(boolean flag)
          Indicates if the contents of the screen scale when a resize occurs.
 void setScrollbarHandles(int hWndHorzScrollbar, int hWndVertScrollbar)
          Optionally specify application supplied scrollbars.
 void setSuppressResize(boolean suppressResize)
          Indicates if display resizing is suppressed.
 void setUseScrollbars(boolean flag)
          Indicates if scrollbars should appear.
 void startRecording()
          Starts recording all output to the recording cache.
 void stopRecording()
          Stops recording to the recording cache.
 void trackPan()
          Interactively pans the screen.
 void trackRotate()
          Interactively rotates the screen.
 void updateWindow()
          Forces a redraw.
 
Methods inherited from class com.esri.arcgis.display.IDisplayProxy
drawMultipoint, drawPoint, drawPolygon, drawPolyline, drawRectangle, drawText, finishDrawing, getClipEnvelope, getClipEnvelopes, getClipGeometry, getDisplayTransformation, getFilter, getHDC, getHPalette, getIlluminationProps, isSuppressEvents, progress, setClipGeometry, setDisplayTransformation, setFilterByRef, setHPalette, setIlluminationProps, setSuppressEvents, setSymbol, startDrawing
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, hashCode, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, readExternal, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.display.IDisplay
drawMultipoint, drawPoint, drawPolygon, drawPolyline, drawRectangle, drawText, finishDrawing, getClipEnvelope, getClipEnvelopes, getClipGeometry, getDisplayTransformation, getFilter, getHDC, getHPalette, getIlluminationProps, isSuppressEvents, progress, setClipGeometry, setDisplayTransformation, setFilterByRef, setHPalette, setIlluminationProps, setSuppressEvents, setSymbol, startDrawing
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

IScreenDisplayProxy

public IScreenDisplayProxy(java.lang.String CLSID,
                           java.lang.String host,
                           AuthInfo authInfo)
                    throws java.net.UnknownHostException,
                           java.io.IOException

IScreenDisplayProxy

public IScreenDisplayProxy()
For internal use only


IScreenDisplayProxy

public IScreenDisplayProxy(java.lang.Object obj)
                    throws java.io.IOException

IScreenDisplayProxy

protected IScreenDisplayProxy(java.lang.Object obj,
                              java.lang.String iid)
                       throws java.io.IOException

IScreenDisplayProxy

protected IScreenDisplayProxy(java.lang.String CLSID,
                              java.lang.String iid,
                              java.lang.String host,
                              AuthInfo authInfo)
                       throws java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Description copied from class: Dispatch
Adds a Java object to be a listener for a specific kind of event generated by the COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
addListener in class IDisplayProxy
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Description copied from class: Dispatch
Removes a Java object as a listener to events generated by a COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
removeListener in class IDisplayProxy
Throws:
java.io.IOException

setHWnd

public void setHWnd(int hWnd)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IScreenDisplay
Associated window handle.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setHWnd in interface IScreenDisplay
Parameters:
hWnd - The hWnd (A COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHWnd

public int getHWnd()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IScreenDisplay
Associated window handle.

Supported Platforms

Windows, Solaris, Linux

Remarks

The hWnd property tells ScreenDisplay objects which window to draw in.  When a new view (a Map or PageLayout) is created and activated (IActiveView::Activate), a related ScreenDisplay is created and its hWnd is set to that of the main application.  Data windows, such as the MapInsetWindow, also have a related ScreenDisplay object and in this case the ScreenDisplay's hWnd property is set so that all drawing will occur in the data window and not the main application window.

Several Windows API calls require an hWnd in order to perform their operation; this property provides the hWnd for the ScreenDisplay object you are currently working with.  For example, several of ArcMap's zoom commands use the Windows API function 'GetClientRect' to get the coordinates of the main window's client area.  GetClientRect requires the hWnd of the window of interest and in ArcMap's case, IScreenDisplay::hWnd holds this.

Specified by:
getHWnd in interface IScreenDisplay
Returns:
The hWnd (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWindowDC

public int getWindowDC()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IScreenDisplay
Device context for the associated window. Only use this between calls to StartDrawing and FinishDrawing.

Supported Platforms

Windows, Solaris, Linux

Remarks

This property is a Windows operating environment device context handle. The Windows operating environment manages the system display by assigning a device context for each window in the application. You can use the WindowDC property to refer to the handle for an object's device context.

This property does not provide a value to pass to IDisplay::StartDrawing. Instead, call IDisplay::StartDrawing with a value of 0 for the hDC as this will automatically use the Windows API function GetDC to populate IScreenDisplay::WindowDC with the hDC of the main display and drawing will occur there.

The value of the WindowDC property can change while an application runs, so do not store the value in a variable; instead, use the WindowDC property each time you need it.

Specified by:
getWindowDC in interface IScreenDisplay
Returns:
The hDC (A COM typedef)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

addCache

public short addCache()
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IScreenDisplay
Creates a new cache and return its ID. The ID can be specified to StartDrawing to direct output to the cache. It can also be used with a number of other methods such as DrawCache and Invalidate.

Supported Platforms

Windows, Solaris, Linux

Remarks

ScreenDisplay objects make it possible for clients to create any number of caches.  A cache is an off screen bitmap representing the application's window.  Instead of drawing directly to the screen, graphics are drawn into caches, then the caches are drawn on the screen.  When the application's window is obscured and requires redrawing, it done so from the caches instead of from a database.  In this way, caches improve drawing performance - bitmap rendering is faster than reading and displaying data from a database.

In general, a Map object creates three caches: one for all the layers, another if there are annotation or graphics, and a third cache if there is a feature selection.  A layer can create its own private cache if it sets ILayer::Cached equal to TRUE.  In this case, the Map will create a separate cache for the layer and groups the layers above and below it into different caches.

The AppDisplay object has no implementation for this method.

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

removeCache

public void removeCache(short cacheID)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Removes the specified cache.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use this method to remove a cache that is no longer needed.  For example, calling the IActiveView::PartialRefresh method on a Map object will delete the Map's selection cache if one exists and there are no features selected.

The AppDisplay object has no implementation for this method.

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

getCacheCount

public short getCacheCount()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IScreenDisplay
Number of screen caches.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use this property to loop through all of the available screen caches.  For example, if you Invalidate using esriAllScreenCaches, this property is used to loop through all of the caches to invalidate each one.

The AppDisplay object has no implementation for this method.

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

removeAllCaches

public void removeAllCaches()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IScreenDisplay
Removes all caches.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use this property to clear all of the screen caches the current object has.  For example, when a Map is deactivated (IActiveView::Deactivate) it uses this property to remove all of its caches.

The AppDisplay object has no implementation for this method.

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

getCacheMemDC

public int getCacheMemDC(short index)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IScreenDisplay
Memory device context for the specified screen cache.

Supported Platforms

Windows, Solaris, Linux

Remarks

Each cache is an offscreen bitmap. Use this property to retrieve the device context (hDc) for the bitmap associated with a particular cache.  With the hDc you can, for example, draw the bitmap (cache) in a particular window using DrawCache.

Specified by:
getCacheMemDC in interface IScreenDisplay
Parameters:
index - The index (in)
Returns:
The hDC (A COM typedef)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setActiveCache

public void setActiveCache(short index)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IScreenDisplay
Screen cache where drawing occurs. Use rarely. Change cache inside StartDrawing/FinishDrawing sequence.

Supported Platforms

Windows, Solaris, Linux

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

getActiveCache

public short getActiveCache()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IScreenDisplay
Screen cache where drawing occurs. Use rarely. Change cache inside StartDrawing/FinishDrawing sequence.

Supported Platforms

Windows, Solaris, Linux

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

setIsFirstCacheTransparent

public void setIsFirstCacheTransparent(boolean flag)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: IScreenDisplay
Indicates if the bottom cache is transparent.

Supported Platforms

Windows, Solaris, Linux

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

isFirstCacheTransparent

public boolean isFirstCacheTransparent()
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: IScreenDisplay
Indicates if the bottom cache is transparent.

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

startRecording

public void startRecording()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IScreenDisplay
Starts recording all output to the recording cache.

Supported Platforms

Windows, Solaris, Linux

Remarks

In addition to the caches clients create, the ScreenDisplay object also provides a recording cache that accumulates all drawing that happens on the display.  This recording cache is used to redraw the application when the application is moved or exposed or when drawing rubber banding.

Note, StartRecording and StopRecording are exposed for developers creating custom applications that draw from multiple caches and need to refresh quickly.  If you are working with ArcMap or even the Map object, leave all cache management up to the Map.

Use StartRecording to let the display know exactly what to record.  Use DrawCache(esriScreenRecording) to display the recording cache.  Use CacheMemDC(esriScreenRecording) to get a handle to the memory device context for the recording bitmap.

The following C++ code excerpt is a drawing sequence example that uses StartRecording.

VARIANT_BOOL isCacheDirty;
m_ipScreen->IsCacheDirty(esriScreenRecording, &isCacheDirty);

if (isCacheDirty) // draw from scratch
{
  m_ipScreen->StartRecording();
  m_ipScreen->StartDrawing((OLE_HANDLE)hPaintDC, esriNoScreenCache);
  DrawContents();
  m_ipScreen->FinishDrawing();
  m_ipScreen->StopRecording();
}
  else // draw from offscreen bitmap
{
  m_ipScreen->DrawCache((OLE_HANDLE)hPaintDC, esriScreenRecording, 0, 0);
}

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

stopRecording

public void stopRecording()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IScreenDisplay
Stops recording to the recording cache.

Supported Platforms

Windows, Solaris, Linux

Remarks

In addition to the caches clients create, the ScreenDisplay object also provides a recording cache that accumulates all drawing that happens on the display.  This recording cache is used to redraw the application when the application is moved or exposed or when drawing rubber banding.

Note, StartRecording and StopRecording are exposed for developers creating custom applications that draw from multiple caches and need to refresh quickly.  If you are working with ArcMap or even the Map object, leave all cache management up to the Map.

Use StartRecording to let the display know exactly what to record.  Use DrawCache(esriScreenRecording) to display the recording cache.  Use CacheMemDC(esriScreenRecording) to get a handle to the memory device context for the recording bitmap.

The following C++ code excerpt is a drawing sequence example that uses StartRecording.

VARIANT_BOOL isCacheDirty;
m_ipScreen->IsCacheDirty(esriScreenRecording, &isCacheDirty);

if (isCacheDirty) // draw from scratch
{
  m_ipScreen->StartRecording();
  m_ipScreen->StartDrawing((OLE_HANDLE)hPaintDC, esriNoScreenCache);
  DrawContents();
  m_ipScreen->FinishDrawing();
  m_ipScreen->StopRecording();
}
  else // draw from offscreen bitmap
{
  m_ipScreen->DrawCache((OLE_HANDLE)hPaintDC, esriScreenRecording, 0, 0);
}

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

setUseScrollbars

public void setUseScrollbars(boolean flag)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IScreenDisplay
Indicates if scrollbars should appear.

Supported Platforms

Windows, Solaris, Linux

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

isUseScrollbars

public boolean isUseScrollbars()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IScreenDisplay
Indicates if scrollbars should appear.

Supported Platforms

Windows, Solaris, Linux

Remarks

IActiveView::ShowScrollBars redirects all its calls to this property.

Changes to this property are not reflected until the active view changes.  For example, when in layout view in ArcMap, programmatically changing the PageLayout to not show its scrollbars will have no effect until the next time the active view is set to the PageLayout; calling IActiveView::Refresh has no effect.

ArcMap uses this property to hide the Map's scroll bars when in layout view.  Programmatically trying to display a Map's scroll bar in layout view will have no effect; for Map's this setting is only honored in data view and again it requires an active view change before the setting is reflected in the applications window.

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

setScrollbarHandles

public void setScrollbarHandles(int hWndHorzScrollbar,
                                int hWndVertScrollbar)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IScreenDisplay
Optionally specify application supplied scrollbars.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setScrollbarHandles in interface IScreenDisplay
Parameters:
hWndHorzScrollbar - The hWndHorzScrollbar (A COM typedef) (in)
hWndVertScrollbar - The hWndVertScrollbar (A COM typedef) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setScaleContents

public void setScaleContents(boolean flag)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IScreenDisplay
Indicates if the contents of the screen scale when a resize occurs. True means scale contents to fit new window size. False means contents stays the same with more or less of it showing.

Supported Platforms

Windows, Solaris, Linux

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

isScaleContents

public boolean isScaleContents()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IScreenDisplay
Indicates if the contents of the screen scale when a resize occurs. True means scale contents to fit new window size. False means contents stays the same with more or less of it showing.

Supported Platforms

Windows, Solaris, Linux

Remarks

If a Map's ScaleContents property is set to TRUE, when its display is resized, the area shown stays the same and the scale changes.  When set to FALSE, the scale of the Map stays the same and the area shown changes.

The PageLayout object works similarly.  If set to TRUE, the contents are stretched when the display is resized.  The scale of all maps changes. When set to FALSE, the page remains the same size.

In ArcMap, on the Tools/Options menu, there are check boxes for controlling this property for the data and layout view.

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

setSuppressResize

public void setSuppressResize(boolean suppressResize)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IScreenDisplay
Indicates if display resizing is suppressed. True means the display doesn't resize with the window. False ensures that the display is the same size as the window.

Supported Platforms

Windows, Solaris, Linux

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

isSuppressResize

public boolean isSuppressResize()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IScreenDisplay
Indicates if display resizing is suppressed. True means the display doesn't resize with the window. False ensures that the display is the same size as the window.

Supported Platforms

Windows, Solaris, Linux

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

isFramed

public boolean isFramed()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Indicates if drawing occurs in a frame rather than on the whole window.

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

setIsFramed

public void setIsFramed(boolean flag)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Indicates if drawing occurs in a frame rather than on the whole window.

Supported Platforms

Windows, Solaris, Linux

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

getCancelTracker

public ITrackCancel getCancelTracker()
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: IScreenDisplay
Cancel tracker that is associated with the display.

Supported Platforms

Windows, Solaris, Linux

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

setCancelTrackerByRef

public void setCancelTrackerByRef(ITrackCancel cancelTracker)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IScreenDisplay
Cancel tracker that is associated with the display.

Specified by:
setCancelTrackerByRef in interface IScreenDisplay
Parameters:
cancelTracker - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

invalidate

public void invalidate(IEnvelope rect,
                       boolean erase,
                       short cacheIndex)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IScreenDisplay
Cause the specified area of the specified cache to redraw.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use Invalidate to refresh a specific region on the display.  For example, if you add a new feature, only the extent of the new feature requires refreshing; the remainder of the display can redraw from cache.

The rect parameter specifies the region to update.  Use 'Nothing' in Visual Basic or a zero in C++ to invalidate the entire display.

Erase specifies whether or not the background within the update region is erased when the update region is processed.  Usually this is set to TRUE.

CacheIndex controls which cache to update.  Use IActiveView::ScreenCacheID to get the cache index for a specific draw phase.  The valid draw phases are held in the esriViewDrawPhase enumeration and are as follows:

0 - esriViewNone
1 - esriViewBackground
2 - esriViewGeography
4 - esriViewGeoSelection
8 - esriViewGraphics
16 - esriViewGraphicSelection
32 - esriviewForeground

You can also specify esriAllScreenCaches, esriNoScreenCache, and esriScreenRecording.

Invalidate sets the cache(s) as dirty.  Use IsCacheDirty to check the state of a particular cache.

After completion, Invalidate fires the IDisplayEvents::DisplayInvalidated event.

 

IActiveView::PartialRefresh has similar parameters and itself calls Invalidate. Use this method instead as much as possible as it automatically determines the cache index based on the phase provided.

 

 

Specified by:
invalidate in interface IScreenDisplay
Parameters:
rect - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
erase - The erase (in)
cacheIndex - The cacheIndex (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isCacheDirty

public boolean isCacheDirty(short cacheIndex)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IScreenDisplay
Indicates if the specified cache needs refreshing.

Specified by:
isCacheDirty in interface IScreenDisplay
Parameters:
cacheIndex - The cacheIndex (in)
Returns:
The flag
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

drawCache

public void drawCache(int hDC,
                      short index,
                      tagRECT deviceRect,
                      tagRECT cacheRect)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IScreenDisplay
Draws the specified screen cache to the specified window device context. Pass an empty rectangle to copy the full bitmap to the DC origin.

Supported Platforms

Windows, Solaris, Linux

Remarks

Redrawing data from scratch is time consuming compared to drawing data that has been cached in an off-screen bitmap.  If a particular cache return FALSE for IsCacheDirty, use DrawCache to instantly redraw the bitmap. 

Use the CacheMemDC property to get the desired cache's hDC.

Specified by:
drawCache in interface IScreenDisplay
Parameters:
hDC - The hDC (A COM typedef) (in)
index - The index (in)
deviceRect - A Structure: com.esri.arcgis.display.tagRECT (in)
cacheRect - A Structure: com.esri.arcgis.display.tagRECT (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doScroll

public void doScroll(int xDelta,
                     int yDelta,
                     boolean updateScreen)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IScreenDisplay
Scrolls the screen by the specified amount.

Supported Platforms

Windows, Solaris, Linux

Remarks

ArcMap's scroll bars call this method to scroll the current display.  The updateScreen parameter specifies whether or not the display will be refreshed after the scroll.

Specified by:
doScroll in interface IScreenDisplay
Parameters:
xDelta - The xDelta (in)
yDelta - The yDelta (in)
updateScreen - The updateScreen (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

trackPan

public void trackPan()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IScreenDisplay
Interactively pans the screen.

Supported Platforms

Windows, Solaris, Linux

Remarks

There are two approaches to panning - this method, and the group PanStart, PanMoveTo, and PanStop.  This method is the easiest to use as it takes care of all the mouse events and refreshing the display when pan is complete. 

Call this method in the mouse down event and make certain you have a reference to the correct ScreenDisplay object.  For example, if you are in layout view and you want to pan just the focus map, do not use the ScreenDisplay object associated with IMxDocument::ActiveView.  Instead, get the focus Map via IMxDocument::FocusMap, and then get its ScreenDisplay

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

panStart

public void panStart(IPoint mouseLocation)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IScreenDisplay
Prepares display for panning.

Supported Platforms

Windows, Solaris, Linux

Remarks

Call PanStart to initiate panning.  The required point parameter specifies the pan's starting point.  Call PanMoveTo next to specify a destination point.

The typical sequence for using the pan methods is as follows:

See TrackPan for an alternative panning approach.

Specified by:
panStart in interface IScreenDisplay
Parameters:
mouseLocation - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

panMoveTo

public void panMoveTo(IPoint mouseLocation)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IScreenDisplay
Pans to a new point.

Supported Platforms

Windows, Solaris, Linux

Remarks

PanMoveTo pans the display by calculating an offset distance between the start point supplied to PanStart and the destination point provided to this method.  The recording cache is automatically redrawn each time PanMoveTo is called. Use the envelope PanStop returns to truly refresh the display.

The typical sequence for using the pan methods is as follows:

See TrackPan for an alternative panning approach.

Specified by:
panMoveTo in interface IScreenDisplay
Parameters:
mouseLocation - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

panStop

public IEnvelope panStop()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IScreenDisplay
Stops panning and returns new visible bounds.

Supported Platforms

Windows, Solaris, Linux

Remarks

PanStop creates an Envelope that should be used to reset the extent of the active view.  Because PanMoveTo redraws only the recording cache (bitmap), there are typically blank areas in the display.  Call IActiveView::Refresh after calling PanStop to invalidate the entire display.

The typical sequence for using the pan methods is as follows:

See TrackPan for an alternative panning approach.

Specified by:
panStop in interface IScreenDisplay
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IActiveView.setExtent(com.esri.arcgis.geometry.IEnvelope)

trackRotate

public void trackRotate()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Interactively rotates the screen.

Supported Platforms

Windows, Solaris, Linux

Remarks

There are two approaches to rotating the display - this method and the group RotateStart, RotateMoveTo, RotateTimer, and RotateStop.  This method is the easiest to use as it takes care of all the mouse events automatically, performs the final display rotation, and invalidates the display. 

Call this method in the mouse down event and make certain you have a reference to the correct ScreenDisplay object.  For example, if you are in layout view and you want to pan just the focus map, do not use the ScreenDisplay object associated with IMxDocument::ActiveView.  Instead, get the focus Map via IMxDocument::FocusMap, and then get its ScreenDisplay.

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

rotateStart

public void rotateStart(IPoint mousePt,
                        IPoint centerPt)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Prepares display for rotating. If centerPt is NULL, the center of the visible bounds is used.

Supported Platforms

Windows, Solaris, Linux

Remarks

Call RotateStart to initiate rotating the display.  The required point parameter specifies the starting point of the rotation.  Call RotateMoveTo next to specify the rotation destination point, a rotation angle is calculated based on these two points.

The typical sequence for using the rotate methods is as follows:

See TrackRotate for an alternative rotating approach.

Specified by:
rotateStart in interface IScreenDisplay
Parameters:
mousePt - A reference to a com.esri.arcgis.geometry.IPoint (in)
centerPt - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
Rotate

rotateMoveTo

public void rotateMoveTo(IPoint pPoint)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IScreenDisplay
Rotates to new point.

Supported Platforms

Windows, Solaris, Linux

Remarks

RotateMoveTo rotates the display based on the calculated angle between the start point supplied to RotateStart and the destination point provided to this method.  Next call RotateTimer to show the rotation degree readout and repaint the display from cache.

The typical sequence for using the rotate methods is as follows:

See TrackRotate for an alternative rotating approach.

Specified by:
rotateMoveTo in interface IScreenDisplay
Parameters:
pPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
Rotate

rotateTimer

public void rotateTimer()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IScreenDisplay
Draws the rotated display. Call in response to WM_TIMER.

Supported Platforms

Windows, Solaris, Linux

Remarks

RotateTimer shows the rotation degree readout and repaints the display from cache.

The typical sequence for using the rotate methods is as follows:

See TrackRotate for an alternative rotating approach.

Specified by:
rotateTimer in interface IScreenDisplay
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
Rotate

rotateStop

public double rotateStop()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IScreenDisplay
Stops rotating and returns new angle.

Supported Platforms

Windows, Solaris, Linux

Remarks

RotateStop returns the final rotation angle.  You must call IDisplayTransformation::Rotation with the final rotation angle to actually rotate the display.

The typical sequence for using the rotate methods is as follows:

See TrackRotate for an alternative rotating approach.

Specified by:
rotateStop in interface IScreenDisplay
Returns:
The degrees
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
Rotate

updateWindow

public void updateWindow()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IScreenDisplay
Forces a redraw.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use UpdateWindow to process pending Windows WM_PAINT messages immediately.  This may be the case if you have a routine that takes a long time to execute and you need the window to refresh while the code executes.  Typically, no drawing will occur until all your code has been executed and control returns to the ArcMap's message loop and the WM_PAINT message is handled.  UpdateWindow forces the window to invalidate by sending a WM_PAINT message directly to the window; the normal ArcMap message queue is bypassed.

See UpdateWindow in MSDN for more information.

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