|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITrackCancel
Provides access to members that control the Cancel Tracker.
The CancelTracker object is the object used by ArcObjects to monitor the Esc key (optionally, the space bar and mouse clicks as well) and to terminate processes at the request of the user. A CancelTracker is typically handed into or created just prior to functions that execute a lengthy operation such as, printing, exporting and drawing.
The ITrackCancel interface provides access to properties and methods that determine if a cancellation has been executed by the user, and also allows developers to specify what actions constitute a cancellation.
Method Summary | |
---|---|
void |
cancel()
Cancels the associated operation. |
boolean |
esri_continue()
Called frequently while associated operation is progressing. |
int |
getCheckTime()
The interval at which the operation will be interrupted to advance progressors and process messages. |
IProgressor |
getProgressor()
The progressor used to show progress during lengthy operations. |
boolean |
isCancelOnClick()
Indicates whether mouse clicks should cancel the operation. |
boolean |
isCancelOnKeyPress()
Indicates whether the escape key and spacebar should cancel the operation. |
boolean |
isProcessMessages()
An obsolete method. |
boolean |
isTimerFired()
An obsolete method. |
void |
reset()
Resets the manager after the associated operation is finished. |
void |
setCancelOnClick(boolean pCancelOnClick)
Indicates whether mouse clicks should cancel the operation. |
void |
setCancelOnKeyPress(boolean pCancelOnKeyPress)
Indicates whether the escape key and spacebar should cancel the operation. |
void |
setCheckTime(int milliseconds)
The interval at which the operation will be interrupted to advance progressors and process messages. |
void |
setProcessMessages(boolean processMessages)
An obsolete method. |
void |
setProgressor(IProgressor progressor)
The progressor used to show progress during lengthy operations. |
void |
startTimer(int hWnd,
int milliseconds)
An obsolete method. |
void |
stopTimer()
An obsolete method. |
Method Detail |
---|
void setCheckTime(int milliseconds) throws IOException, AutomationException
milliseconds
- The milliseconds (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getCheckTime() throws IOException, AutomationException
The CheckTime property indicates the frequency the CancelTracker will process any pending Windows (mouse and keyboard) messages. By default the CheckTime is 1000 milliseconds.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setProgressor(IProgressor progressor) throws IOException, AutomationException
progressor
- A reference to a com.esri.arcgis.system.IProgressor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IProgressor getProgressor() throws IOException, AutomationException
Use the Progressor property to bind the CancelTracker with a progress object (for example, a progress bar, a progress dialog or a progress animation) that displays the progress of the lengthy operation. Once the Progressor has been set it will be updated automatically as the operation is executed.
If the progressor is a step progressor, the MaxRange should be set to equal the number of iterations that the operation will progress through; this number should also match the number of times Continue will be called in the operation’s innermost loop.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void cancel() throws IOException, AutomationException
By default a cancel will occur under the following circumstances:
Whether a cancel occurs will depend on when the key or button was pressed and the CheckTime property. For example, if a map redraw was cancelled by a key press then it is possible that some phases of the redraw will complete before the key press is handled.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void reset() throws IOException, AutomationException
The Reset method should be called just before a process that may be cancelled, such as a lengthy operation, begins. The Reset method sets the state of the CancelTracker to uncancelled and returns the internal counter, which is used to update the Progressor to zero.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean esri_continue() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setProcessMessages(boolean processMessages) throws IOException, AutomationException
processMessages
- The processMessages (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isProcessMessages() throws IOException, AutomationException
Do not use this method as it is obsolete.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void startTimer(int hWnd, int milliseconds) throws IOException, AutomationException
Do not use this method as it is obsolete.
hWnd
- The hWnd (in)milliseconds
- The milliseconds (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isTimerFired() throws IOException, AutomationException
Do not use this method as it is obsolete.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void stopTimer() throws IOException, AutomationException
Do not use this method as it is obsolete.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isCancelOnClick() throws IOException, AutomationException
Indicates whether the user can use the left and right mouse buttons to cancel the operation.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCancelOnClick(boolean pCancelOnClick) throws IOException, AutomationException
pCancelOnClick
- The pCancelOnClick (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isCancelOnKeyPress() throws IOException, AutomationException
Indicates whether the user can use the space bar to cancel the operation.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCancelOnKeyPress(boolean pCancelOnKeyPress) throws IOException, AutomationException
pCancelOnKeyPress
- The pCancelOnKeyPress (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |