|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
com.groovemanager.gui.custom.ProgressMonitor
This class can be used for showing a status dialog for monitoring a longer running operation (ProgressThread)
ProgressThread| Nested Class Summary | |
|---|---|
private class |
ProgressMonitor.ProgBarChanger
A Runnable implementation for thread-safe updating of the ProgressBar |
| Nested classes inherited from class org.eclipse.jface.window.Window |
|---|
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
|---|---|
private boolean |
cancelled
Indicates whether the user has pressed Cancel or not |
private java.lang.Runnable |
closer
Runnable for thread-safe closing of the dialog |
private org.eclipse.swt.widgets.Display |
d
The current Display |
private org.eclipse.swt.widgets.ProgressBar |
indetProgBar
The ProgressBar for displaying the progress |
private int |
max
Minimum value for the ProgressBar |
private java.lang.String |
message
The message displayed inside the dialog |
private org.eclipse.swt.widgets.Label |
messageLabel
The Label containing the message |
private int |
min
Minimum value for the ProgressBar |
private ProgressMonitor.ProgBarChanger |
pbChanger
Runnable for thread-safe updating of the ProgressBar |
private org.eclipse.swt.widgets.Composite |
pbComp
The Composite containing the two different ProgressBars |
private int |
pos
Minimum value for the ProgressBar |
private org.eclipse.swt.widgets.ProgressBar |
progBar
The ProgressBar for displaying the progress |
private ProgressThread |
pThread
The ProgressThread to monitor |
private org.eclipse.swt.custom.StackLayout |
stack
The Layout to use for the two different progress bars |
private java.lang.String |
title
The message displayed inside the dialog |
| Fields inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING |
| Fields inherited from class org.eclipse.jface.window.Window |
|---|
CANCEL, OK |
| Constructor Summary | |
|---|---|
ProgressMonitor(org.eclipse.swt.widgets.Shell parent,
ProgressThread t)
Construct a new ProgressMonitor without title or message |
|
ProgressMonitor(org.eclipse.swt.widgets.Shell parent,
ProgressThread t,
java.lang.String title,
java.lang.String message)
Construct a new ProgressMonitor with the given title and message |
|
| Method Summary | |
|---|---|
protected void |
cancelPressed()
|
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
|
org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
|
void |
progressCancelled()
Notification that the operation has been cancelled before finishing |
void |
progressElapsed(int i)
The part of te operation elapsed so far |
void |
progressFinished()
Notification htat the operation has been finished |
void |
progressStarted()
Notification about the start of the operation |
void |
progressTotal(int i)
The total length of the operation |
void |
setMax(int i)
Set the ProgressBarīs maximum value |
void |
setMessage(java.lang.String m)
Set the dialogīs message |
void |
setPosition(int i)
Set the ProgressBarīs selection value |
void |
setTitle(java.lang.String t)
Set the dialogīs title |
java.lang.Object |
start()
Start the ProgressThread and open this dialog |
| Methods inherited from class org.eclipse.jface.dialogs.Dialog |
|---|
applyDialogFont, buttonPressed, close, configureShell, constrainShellSize, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonBar, createContents, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setButtonLayoutData, setButtonLayoutFormData |
| Methods inherited from class org.eclipse.jface.window.Window |
|---|
canHandleShellCloseEvent, create, createShell, getContents, getDefaultImage, getInitialLocation, getInitialSize, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean cancelled
private java.lang.Runnable closer
private org.eclipse.swt.widgets.Display d
private org.eclipse.swt.widgets.ProgressBar indetProgBar
private int max
private java.lang.String message
private org.eclipse.swt.widgets.Label messageLabel
private int min
private ProgressMonitor.ProgBarChanger pbChanger
private org.eclipse.swt.widgets.Composite pbComp
private int pos
private org.eclipse.swt.widgets.ProgressBar progBar
private final ProgressThread pThread
private org.eclipse.swt.custom.StackLayout stack
private java.lang.String title
| Constructor Detail |
|---|
public ProgressMonitor(org.eclipse.swt.widgets.Shell parent,
ProgressThread t)
parent - The parent Shell for the dialogt - The ProgressThread to monitor
public ProgressMonitor(org.eclipse.swt.widgets.Shell parent,
ProgressThread t,
java.lang.String title,
java.lang.String message)
parent - The parent Shell for the dialogt - The ProgressThread to monitortitle - The dialog titlemessage - The dialog message| Method Detail |
|---|
protected void cancelPressed()
cancelPressed in class org.eclipse.jface.dialogs.Dialogprotected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialogpublic org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
createDialogArea in class org.eclipse.jface.dialogs.Dialogpublic void progressCancelled()
ProgressListener
progressCancelled in interface ProgressListenerProgressListener.progressCancelled()public void progressElapsed(int i)
ProgressListener
progressElapsed in interface ProgressListeneri - The length of the part of the operation elapsed so far. The
unit to use for this value is free defineableProgressListener.progressElapsed(int)public void progressFinished()
ProgressListener
progressFinished in interface ProgressListenerProgressListener.progressFinished()public void progressStarted()
ProgressListener
progressStarted in interface ProgressListenerProgressListener.progressStarted()public void progressTotal(int i)
ProgressListener
progressTotal in interface ProgressListeneri - The length, the operation will take. The unit to use for this
value is free defineable. If the total length of the operation can not
be specified, -1 will be returned to indicate "unknown".ProgressListener.progressTotal(int)public void setMax(int i)
i - The maximum valuepublic void setMessage(java.lang.String m)
m - The new messagepublic void setPosition(int i)
i - The new selection valuepublic void setTitle(java.lang.String t)
t - The new title
public java.lang.Object start()
throws NotFinishedException
NotFinishedException - If the ProgressThread didnīt finish
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||