|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX
public class ProgressDialogX
A dialog for displaying information about progress.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.compomics.util.waiting.WaitingHandler |
---|
sdf, tab |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ProgressDialogX(boolean modal)
Opens a new ProgressDialog. |
|
ProgressDialogX(Frame waitingHandlerParent,
Image normalIcon,
Image waitingIcon,
boolean modal)
Opens a new ProgressDialogX with a Frame as a parent. |
|
ProgressDialogX(JDialog waitingHandlerParent,
Frame waitingHandlerParentFrame,
Image normalIcon,
Image waitingIcon,
boolean modal)
Opens a new ProgressDialog with a JDialog as a parent. |
Method Summary | |
---|---|
void |
addWaitingActionListener(WaitingActionListener waitingActionListener)
Adds a waiting action listener. |
void |
appendReport(String report,
boolean includeDate,
boolean addNewLine)
Append text to the report. |
void |
appendReportEndLine()
Append a new line to the report. |
void |
appendReportNewLineNoDate()
Append two tabs to the report. |
int |
getMaxPrimaryProgressCounter()
Returns the max primary progress counter. |
int |
getMaxSecondaryProgressCounter()
Returns the max secondary progress counter. |
int |
getPrimaryProgressCounter()
Returns the primary progress counter. |
JProgressBar |
getProgressBar()
Returns the progress bar for updates from external processes. |
int |
getSecondaryProgressCounter()
Returns the secondary progress counter. |
void |
increasePrimaryProgressCounter()
Increase the primary progress counter by one "counter". |
void |
increasePrimaryProgressCounter(int increment)
Increase the primary progress counter by the given increment. |
void |
increaseSecondaryProgressCounter()
Increases the progress bar. |
void |
increaseSecondaryProgressCounter(int number)
Increases the value of the progress bar. |
boolean |
isReport()
Indicates whether this waiting handler supports reports. |
boolean |
isRunCanceled()
Returns true if the run is canceled. |
boolean |
isRunFinished()
Returns true if the process is finished. |
void |
resetPrimaryProgressCounter()
Reset the primary progress counter to 0. |
void |
resetSecondaryProgressCounter()
Resets the value of the progress bar. |
void |
setMaxPrimaryProgressCounter(int maxProgressValue)
Set the maximum value for the primary progress counter. |
void |
setMaxSecondaryProgressCounter(int maxProgressValue)
Sets the maximal value of the progress bar. |
void |
setPrimaryProgressCounterIndeterminate(boolean indeterminate)
Sets whether the primary progress counter is indeterminate or not. |
void |
setRunCanceled()
Set the process as canceled. |
void |
setRunFinished()
Set the process as finished. |
void |
setSecondaryProgressCounter(int value)
Sets the value of the progress bar. |
void |
setSecondaryProgressCounterIndeterminate(boolean indeterminate)
Makes the dialog indeterminate or not indeterminate. |
void |
setSecondaryProgressText(String text)
Set the secondary progress counter text. |
void |
setString(String currentFileName)
Sets the string to display in the progress bar. |
void |
setUnstoppable(boolean unstoppable)
Set this to true of the process the progress bar is used for is not possible to stop, or not possible to stop nicely. |
void |
setValue(int value)
Sets the progress bar value. |
void |
setWaitingText(String text)
Sets the text describing what is currently being waited for. |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProgressDialogX(Frame waitingHandlerParent, Image normalIcon, Image waitingIcon, boolean modal)
waitingHandlerParent
- waitingIcon
- the frame icon to use when waitingnormalIcon
- the frame icon to use when donemodal
- public ProgressDialogX(JDialog waitingHandlerParent, Frame waitingHandlerParentFrame, Image normalIcon, Image waitingIcon, boolean modal)
waitingHandlerParent
- waitingHandlerParentFrame
- the dialog's parent frame (needed to set
the frame icons)waitingIcon
- the frame icon to use when waitingnormalIcon
- the frame icon to use when donemodal
- public ProgressDialogX(boolean modal)
modal
- Method Detail |
---|
public void setValue(int value)
value
- the progress bar valuepublic void setPrimaryProgressCounterIndeterminate(boolean indeterminate)
WaitingHandler
setPrimaryProgressCounterIndeterminate
in interface WaitingHandler
indeterminate
- a boolean indicating whether the primary progress
counter is indeterminate or notpublic void setString(String currentFileName)
currentFileName
- public void setUnstoppable(boolean unstoppable)
unstoppable
- public JProgressBar getProgressBar()
public void setMaxPrimaryProgressCounter(int maxProgressValue)
WaitingHandler
setMaxPrimaryProgressCounter
in interface WaitingHandler
maxProgressValue
- the max valuepublic void increasePrimaryProgressCounter()
WaitingHandler
increasePrimaryProgressCounter
in interface WaitingHandler
public void increasePrimaryProgressCounter(int increment)
WaitingHandler
increasePrimaryProgressCounter
in interface WaitingHandler
increment
- the increment to increase the value bypublic void setMaxSecondaryProgressCounter(int maxProgressValue)
setMaxSecondaryProgressCounter
in interface WaitingHandler
maxProgressValue
- the maximal progress valuepublic void resetSecondaryProgressCounter()
resetSecondaryProgressCounter
in interface WaitingHandler
public void increaseSecondaryProgressCounter()
increaseSecondaryProgressCounter
in interface WaitingHandler
public void setSecondaryProgressCounter(int value)
setSecondaryProgressCounter
in interface WaitingHandler
value
- the progress valuepublic void increaseSecondaryProgressCounter(int number)
increaseSecondaryProgressCounter
in interface WaitingHandler
number
- the increment numberpublic void setSecondaryProgressCounterIndeterminate(boolean indeterminate)
setSecondaryProgressCounterIndeterminate
in interface WaitingHandler
indeterminate
- public void setRunFinished()
WaitingHandler
setRunFinished
in interface WaitingHandler
public void setRunCanceled()
WaitingHandler
setRunCanceled
in interface WaitingHandler
public void appendReport(String report, boolean includeDate, boolean addNewLine)
WaitingHandler
appendReport
in interface WaitingHandler
report
- the text to appendincludeDate
- if the date and time is to be added to the front of
the textaddNewLine
- add a new line after the text?public void appendReportNewLineNoDate()
WaitingHandler
appendReportNewLineNoDate
in interface WaitingHandler
public void appendReportEndLine()
WaitingHandler
appendReportEndLine
in interface WaitingHandler
public boolean isRunCanceled()
WaitingHandler
isRunCanceled
in interface WaitingHandler
public boolean isRunFinished()
WaitingHandler
isRunFinished
in interface WaitingHandler
public void setWaitingText(String text)
WaitingHandler
setWaitingText
in interface WaitingHandler
text
- a text describing what is currently waited forpublic boolean isReport()
WaitingHandler
isReport
in interface WaitingHandler
public void addWaitingActionListener(WaitingActionListener waitingActionListener)
waitingActionListener
- public void setSecondaryProgressText(String text)
WaitingHandler
setSecondaryProgressText
in interface WaitingHandler
text
- the text to setpublic void resetPrimaryProgressCounter()
WaitingHandler
resetPrimaryProgressCounter
in interface WaitingHandler
public int getPrimaryProgressCounter()
WaitingHandler
getPrimaryProgressCounter
in interface WaitingHandler
public int getMaxPrimaryProgressCounter()
WaitingHandler
getMaxPrimaryProgressCounter
in interface WaitingHandler
public int getSecondaryProgressCounter()
WaitingHandler
getSecondaryProgressCounter
in interface WaitingHandler
public int getMaxSecondaryProgressCounter()
WaitingHandler
getMaxSecondaryProgressCounter
in interface WaitingHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |