public class ProgressDialogX extends javax.swing.JDialog implements WaitingHandler
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
sdf, tab
Constructor and Description |
---|
ProgressDialogX(boolean modal)
Opens a new ProgressDialog.
|
ProgressDialogX(java.awt.Frame waitingHandlerParent,
java.awt.Image normalIcon,
java.awt.Image waitingIcon,
boolean modal)
Opens a new ProgressDialogX with a Frame as a parent.
|
ProgressDialogX(javax.swing.JDialog waitingHandlerParent,
java.awt.Frame waitingHandlerParentFrame,
java.awt.Image normalIcon,
java.awt.Image waitingIcon,
boolean modal)
Opens a new ProgressDialog with a JDialog as a parent.
|
Modifier and Type | Method and Description |
---|---|
void |
appendReport(java.lang.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.
|
void |
displayHtmlMessage(javax.swing.JEditorPane messagePane,
java.lang.String title,
int messageType)
Display a given HTML containing message to the user separately from the
main output.
|
void |
displayMessage(java.lang.String message,
java.lang.String title,
int messageType)
Display a given message to the user separately from the main output.
|
void |
doNothingOnClose()
Deprecated.
replace by setUnstoppable
|
javax.swing.JProgressBar |
getPrimaryProgressBar()
Returns the primary progress bar for updates from external processes.
|
javax.swing.JProgressBar |
getProgressBar()
Returns the progress bar for updates from external processes.
|
javax.swing.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 increment)
Increase the progress bar value by the given number.
|
void |
increaseSecondaryProgressValue()
Increases the progress bar.
|
void |
increaseSecondaryProgressValue(int number)
Increases the value of the progress bar.
|
void |
incrementValue()
Deprecated.
use waiting handler method instead
|
void |
incrementValue(int increment)
Deprecated.
use waiting handler method instead
|
boolean |
isRunCanceled()
Returns true if the run is canceled.
|
boolean |
isRunFinished()
Returns true if the run is finished.
|
void |
resetSecondaryProgressBar()
Resets the value of the progress bar.
|
void |
setIndeterminate(boolean indeterminate)
Sets whether the primary progress bar is indeterminate or not.
|
void |
setIntermidiate(boolean intermidiate)
Deprecated.
Replaced by setIndeterminate, from utilities 3.1.17.
|
void |
setMax(int value)
Deprecated.
use waiting handler method instead
|
void |
setMaxProgressValue(int maxProgressValue)
Set the maximum value of the progress bar.
|
void |
setMaxSecondaryProgressValue(int maxProgressValue)
Sets the maximal value of the progress bar.
|
void |
setRunCanceled()
Set the analysis as canceled.
|
void |
setRunFinished()
Set the analysis as finished.
|
void |
setSecondaryProgressDialogIndeterminate(boolean indeterminate)
Makes the dialog indeterminate or not indeterminate.
|
void |
setSecondaryProgressValue(int value)
Sets the value of the progress bar.
|
void |
setString(java.lang.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(java.lang.String text)
Sets the text describing what is currently waited for.
|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public ProgressDialogX(java.awt.Frame waitingHandlerParent, java.awt.Image normalIcon, java.awt.Image waitingIcon, boolean modal)
waitingHandlerParent
- waitingIcon
- the frame icon to use when waitingnormalIcon
- the frame icon to use when donemodal
- public ProgressDialogX(javax.swing.JDialog waitingHandlerParent, java.awt.Frame waitingHandlerParentFrame, java.awt.Image normalIcon, java.awt.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
- public void setValue(int value)
value
- the progress bar valuepublic void incrementValue()
public void incrementValue(int increment)
increment
- the value to increment bypublic void setMax(int value)
value
- the maximum valuepublic void setIntermidiate(boolean intermidiate)
intermidiate
- setIndeterminate(boolean)
public void setIndeterminate(boolean indeterminate)
WaitingHandler
setIndeterminate
in interface WaitingHandler
indeterminate
- a boolean indicating whether the primary progress
bar shall be indeterminate or notpublic void setString(java.lang.String currentFileName)
currentFileName
- public void doNothingOnClose()
public void setUnstoppable(boolean unstoppable)
unstoppable
- public javax.swing.JProgressBar getProgressBar()
public void setMaxProgressValue(int maxProgressValue)
WaitingHandler
setMaxProgressValue
in interface WaitingHandler
maxProgressValue
- the max valuepublic void increaseProgressValue()
WaitingHandler
increaseProgressValue
in interface WaitingHandler
public void increaseProgressValue(int increment)
WaitingHandler
increaseProgressValue
in interface WaitingHandler
increment
- the increment to increase the value bypublic void setMaxSecondaryProgressValue(int maxProgressValue)
setMaxSecondaryProgressValue
in interface WaitingHandler
maxProgressValue
- the maximal progress 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 number)
increaseSecondaryProgressValue
in interface WaitingHandler
number
- the increment numberpublic void setSecondaryProgressDialogIndeterminate(boolean indeterminate)
setSecondaryProgressDialogIndeterminate
in interface WaitingHandler
indeterminate
- public void setRunFinished()
WaitingHandler
setRunFinished
in interface WaitingHandler
public void setRunCanceled()
WaitingHandler
setRunCanceled
in interface WaitingHandler
public void appendReport(java.lang.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 javax.swing.JProgressBar getSecondaryProgressBar()
WaitingHandler
getSecondaryProgressBar
in interface WaitingHandler
public void displayMessage(java.lang.String message, java.lang.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(javax.swing.JEditorPane messagePane, java.lang.String title, int messageType)
WaitingHandler
displayHtmlMessage
in interface WaitingHandler
public void setWaitingText(java.lang.String text)
WaitingHandler
setWaitingText
in interface WaitingHandler
text
- a text describing what is currently waited forpublic javax.swing.JProgressBar getPrimaryProgressBar()
WaitingHandler
getPrimaryProgressBar
in interface WaitingHandler
Copyright © 2013. All Rights Reserved.