|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWindow
Dialog
IconAndMessageDialog
ProgressMonitorDialog
ProgressWindow
public class ProgressWindow
Wrapper for geotools' ProgressListener
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Window |
---|
Window.IExceptionHandler |
Field Summary |
---|
Fields inherited from class ProgressMonitorDialog |
---|
arrowCursor, cancel, enableCancelButton, operationCancelableState, progressIndicator, subTaskLabel, taskLabel |
Fields inherited from class IconAndMessageDialog |
---|
imageLabel, message, messageLabel |
Fields inherited from class Dialog |
---|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
Fields inherited from class Window |
---|
CANCEL, OK |
Constructor Summary | |
---|---|
ProgressWindow(Shell parent,
int taskSize)
|
Method Summary | |
---|---|
void |
complete()
Notifies this listener that the operation has finished. |
void |
dispose()
Releases any resources used by this listener. |
void |
exceptionOccurred(Throwable exception)
Reports an exception. |
String |
getDescription()
Description for the lengthly operation to be reported, or null if none. |
float |
getProgress()
Returns the current progress as a percent completed. |
InternationalString |
getTask()
Returns the description of the current task being performed, or null if none. |
boolean |
isCanceled()
Returns true if this job is cancelled. |
void |
progress(float percent)
Notifies this listener of progress in the lengthly operation. |
void |
setCanceled(boolean value)
Indicates that task should be cancelled. |
void |
setDescription(String description)
Sets the description for the lenghtly operation to be reported. |
void |
setTask(InternationalString task)
Sets the description of the current task being performed. |
void |
started()
Notifies this listener that the operation begins. |
void |
warningOccurred(String source,
String location,
String warning)
Reports a warning. |
Methods inherited from class ProgressMonitorDialog |
---|
aboutToRun, cancelPressed, clearCursors, close, configureShell, createButtonsForButtonBar, createCancelButton, createDialogArea, decrementNestingDepth, finishedRun, getImage, getInitialSize, getNestingDepth, getOpenOnRun, getProgressMonitor, incrementNestingDepth, open, run, setCancelable, setOpenOnRun, setOperationCancelButtonEnabled, updateForClearBlocked, updateForSetBlocked |
Methods inherited from class IconAndMessageDialog |
---|
createButtonBar, createContents, createDialogAndButtonArea, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage |
Methods inherited from class Dialog |
---|
applyDialogFont, buttonPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText |
Methods inherited from class Window |
---|
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressWindow(Shell parent, int taskSize)
Method Detail |
---|
public boolean isCanceled()
ProgressListener
true
if this job is cancelled.
isCanceled
in interface ProgressListener
true
if this job is cancelled.public void setCanceled(boolean value)
ProgressListener
setCanceled
in interface ProgressListener
value
- true
for cancelling the task.public void setTask(InternationalString task)
ProgressListener
setTask
in interface ProgressListener
task
- Description of the task being performed, or null
if none.public InternationalString getTask()
ProgressListener
null
if none.
It is assumed that if the task is null
applications may simply report that the
process is "in progress" or "working" as represented in the current locale.
getTask
in interface ProgressListener
null
if none.public String getDescription()
ProgressListener
null
if none.
getDescription
in interface ProgressListener
public void setDescription(String description)
ProgressListener
setDescription
in interface ProgressListener
description
- The new description, or null
if none.public void started()
ProgressListener
started
in interface ProgressListener
public void progress(float percent)
ProgressListener
progress
in interface ProgressListener
percent
- The progress as a value between 0 and 100 inclusive.public float getProgress()
ProgressListener
getProgress
in interface ProgressListener
public void complete()
ProgressListener
complete
in interface ProgressListener
public void dispose()
ProgressListener
dispose
in interface ProgressListener
public void warningOccurred(String source, String location, String warning)
ProgressListener
warningOccurred
in interface ProgressListener
source
- Name of the warning source, or null
if none. This is typically the
filename in process of being parsed or the URL of the data being processedlocation
- Text to write on the left side of the warning message, or null
if none.
This is typically the line number where the error occured in the source
file or the feature ID of the feature that produced the messagewarning
- The warning message.public void exceptionOccurred(Throwable exception)
ProgressListener
exceptionOccurred
in interface ProgressListener
exception
- The exception to report.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |