|
||||||||||
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.WaitingDialog
public class WaitingDialog
A dialog displaying progress details.
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 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 | |
---|---|
WaitingDialog(Frame waitingHandlerParent,
Image normalIcon,
Image waitingIcon,
boolean shakeWhenFinished,
ArrayList<String> tips,
boolean modal)
Creates a new WaitingDialog. |
|
WaitingDialog(Frame waitingHandlerParent,
Image normalIcon,
Image waitingIcon,
boolean shakeWhenFinished,
boolean modal)
Creates a new WaitingDialog. |
Method Summary | |
---|---|
void |
appendReport(String report)
Append text to the report. |
void |
appendReportEndLine()
Append a new line to the report. |
void |
appendReportNewLineNoDate()
Append two tabs to the report. |
void |
displayHtmlMessage(JEditorPane messagePane,
String title,
int messageType)
Display a given html containing message to the user separatly from the main output. |
void |
displayMessage(String message,
String title,
int messageType)
Display a given message to the user separatly from the main output. |
String |
getLastSelectedFolder()
Returns the last selected folder. |
JProgressBar |
getSecondaryProgressBar()
Returns the secondary progress bar for updates from external processes. |
void |
increaseProgressValue()
Increase the progress bar value by one "counter". |
void |
increaseProgressValue(int amount)
Increase the progress bar value by the given amount. |
void |
increaseSecondaryProgressValue()
Increase the secondary progress bar value by one "counter". |
void |
increaseSecondaryProgressValue(int amount)
Increase the secondary progress bar value by the given amount. |
boolean |
isRunCanceled()
Returns true if the run is canceled. |
void |
resetSecondaryProgressBar()
Reset the secondary progress bar value to 0. |
void |
setLastSelectedFolder(String lastSelectedFolder)
Sets the last selected folder. |
void |
setMaxProgressValue(int maxProgressValue)
Set the maximum value of the progress bar. |
void |
setMaxSecondaryProgressValue(int maxProgressValue)
Set the maximum value of the secondary progress bar. |
void |
setRunCanceled()
Set the process as canceled. |
void |
setRunFinished()
Set the process as finished. |
void |
setSecondaryProgressDialogIntermediate(boolean intermediate)
Sets the secondary progress bar to intermediate or not. |
void |
setSecondaryProgressValue(int value)
Sets the secondary progress bar to the given value. |
void |
setWaitingText(String text)
Sets the text describing what is currently waited for. |
void |
startShake()
Make the dialog shake when the process has completed. |
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 WaitingDialog(Frame waitingHandlerParent, Image normalIcon, Image waitingIcon, boolean shakeWhenFinished, boolean modal)
waitingHandlerParent
- a reference to the handler parentwaitingIcon
- the dialog/frame icon to use when waitingnormalIcon
- the dialog/frame icon to use when donemodal
- public WaitingDialog(Frame waitingHandlerParent, Image normalIcon, Image waitingIcon, boolean shakeWhenFinished, ArrayList<String> tips, boolean modal)
waitingHandlerParent
- a reference to the handler parentwaitingIcon
- the dialog/frame icon to use when waitingnormalIcon
- the dialog/frame icon to use when donemodal
- tips
- the list of Tip of the dayMethod Detail |
---|
public void setMaxProgressValue(int maxProgressValue)
setMaxProgressValue
in interface WaitingHandler
maxProgressValue
- the max valuepublic void increaseProgressValue()
increaseProgressValue
in interface WaitingHandler
public void increaseProgressValue(int amount)
increaseProgressValue
in interface WaitingHandler
amount
- the amount to increase the value bypublic void setMaxSecondaryProgressValue(int maxProgressValue)
setMaxSecondaryProgressValue
in interface WaitingHandler
maxProgressValue
- the max valuepublic void resetSecondaryProgressBar()
resetSecondaryProgressBar
in interface WaitingHandler
public void increaseSecondaryProgressValue()
increaseSecondaryProgressValue
in interface WaitingHandler
public void setSecondaryProgressValue(int value)
setSecondaryProgressValue
in interface WaitingHandler
value
- the progress valuepublic void increaseSecondaryProgressValue(int amount)
increaseSecondaryProgressValue
in interface WaitingHandler
amount
- the amount to increase the value bypublic void setSecondaryProgressDialogIntermediate(boolean intermediate)
setSecondaryProgressDialogIntermediate
in interface WaitingHandler
intermediate
- if true, set to intermediatepublic String getLastSelectedFolder()
public void setLastSelectedFolder(String lastSelectedFolder)
lastSelectedFolder
- the last selected folder as stringpublic void setRunFinished()
setRunFinished
in interface WaitingHandler
public void setRunCanceled()
setRunCanceled
in interface WaitingHandler
public void appendReport(String report)
appendReport
in interface WaitingHandler
report
- the text to appendpublic void appendReportNewLineNoDate()
appendReportNewLineNoDate
in interface WaitingHandler
public void appendReportEndLine()
appendReportEndLine
in interface WaitingHandler
public boolean isRunCanceled()
isRunCanceled
in interface WaitingHandler
public void startShake()
public JProgressBar getSecondaryProgressBar()
getSecondaryProgressBar
in interface WaitingHandler
public void displayMessage(String message, String title, int messageType)
WaitingHandler
displayMessage
in interface WaitingHandler
message
- the message to displaytitle
- the title of the messagemessageType
- the message type in the, e.g.,
JOptionPane.INFORMATION_MESSAGEpublic void displayHtmlMessage(JEditorPane messagePane, String title, int messageType)
WaitingHandler
displayHtmlMessage
in interface WaitingHandler
public void setWaitingText(String text)
WaitingHandler
setWaitingText
in interface WaitingHandler
text
- a text describing what is currently waited for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |