public class ProgressDialogX extends JDialog implements WaitingHandler
JDialog.AccessibleJDialogDialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyaccessibleContext, rootPane, rootPaneCheckingEnabledDEFAULT_MODALITY_TYPEBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTSIMPLE_DATA_FORMAT, TAB_HTML, TAB_NON_HTMLDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
getDisplayProgress()
Returns if the waiting handler is to show the progress for the current
process or not.
|
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 |
setDisplayProgress(boolean displayProgress)
Set if the waiting handler is to show the progress for the current
process or not.
|
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 |
setPrimaryProgressCounter(int value)
Sets the 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.
|
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, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackaddPropertyChangeListener, 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, toFrontadd, 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, validateTreeaction, 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, transferFocusUpCyclepublic ProgressDialogX(Frame waitingHandlerParent, Image normalIcon, Image waitingIcon, boolean modal)
waitingHandlerParent - the waiting handler parentwaitingIcon - the frame icon to use when waitingnormalIcon - the frame icon to use when donemodal - if the dialog is to be modal or notpublic ProgressDialogX(JDialog waitingHandlerParent, Frame waitingHandlerParentFrame, Image normalIcon, Image waitingIcon, boolean modal)
waitingHandlerParent - the waiting handler parentwaitingHandlerParentFrame - 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 - if the dialog is to be modal or notpublic ProgressDialogX(boolean modal)
modal - if the dialog is to be modal or notpublic void setValue(int value)
value - the progress bar valuepublic void setPrimaryProgressCounterIndeterminate(boolean indeterminate)
WaitingHandlersetPrimaryProgressCounterIndeterminate in interface WaitingHandlerindeterminate - a boolean indicating whether the primary progress
counter is indeterminate or notpublic void setString(String currentFileName)
currentFileName - the current file namepublic void setUnstoppable(boolean unstoppable)
unstoppable - if the current process is unstoppablepublic JProgressBar getProgressBar()
public void setMaxPrimaryProgressCounter(int maxProgressValue)
WaitingHandlersetMaxPrimaryProgressCounter in interface WaitingHandlermaxProgressValue - the max valuepublic void increasePrimaryProgressCounter()
WaitingHandlerincreasePrimaryProgressCounter in interface WaitingHandlerpublic void increasePrimaryProgressCounter(int increment)
WaitingHandlerincreasePrimaryProgressCounter in interface WaitingHandlerincrement - the increment to increase the value bypublic void setMaxSecondaryProgressCounter(int maxProgressValue)
setMaxSecondaryProgressCounter in interface WaitingHandlermaxProgressValue - the maximal progress valuepublic void resetSecondaryProgressCounter()
resetSecondaryProgressCounter in interface WaitingHandlerpublic void setPrimaryProgressCounter(int value)
setPrimaryProgressCounter in interface WaitingHandlervalue - the progress valuepublic void increaseSecondaryProgressCounter()
increaseSecondaryProgressCounter in interface WaitingHandlerpublic void setSecondaryProgressCounter(int value)
setSecondaryProgressCounter in interface WaitingHandlervalue - the progress valuepublic void increaseSecondaryProgressCounter(int number)
increaseSecondaryProgressCounter in interface WaitingHandlernumber - the increment numberpublic void setSecondaryProgressCounterIndeterminate(boolean indeterminate)
setSecondaryProgressCounterIndeterminate in interface WaitingHandlerindeterminate - if the progress is indeterminatepublic void setRunFinished()
WaitingHandlersetRunFinished in interface WaitingHandlerpublic void setRunCanceled()
WaitingHandlersetRunCanceled in interface WaitingHandlerpublic void appendReport(String report, boolean includeDate, boolean addNewLine)
WaitingHandlerappendReport in interface WaitingHandlerreport - 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()
WaitingHandlerappendReportNewLineNoDate in interface WaitingHandlerpublic void appendReportEndLine()
WaitingHandlerappendReportEndLine in interface WaitingHandlerpublic boolean isRunCanceled()
WaitingHandlerisRunCanceled in interface WaitingHandlerpublic boolean isRunFinished()
WaitingHandlerisRunFinished in interface WaitingHandlerpublic void setWaitingText(String text)
WaitingHandlersetWaitingText in interface WaitingHandlertext - a text describing what is currently waited forpublic boolean isReport()
WaitingHandlerisReport in interface WaitingHandlerpublic void addWaitingActionListener(WaitingActionListener waitingActionListener)
waitingActionListener - the waiting action listenerpublic void setSecondaryProgressText(String text)
WaitingHandlersetSecondaryProgressText in interface WaitingHandlertext - the text to setpublic void resetPrimaryProgressCounter()
WaitingHandlerresetPrimaryProgressCounter in interface WaitingHandlerpublic int getPrimaryProgressCounter()
WaitingHandlergetPrimaryProgressCounter in interface WaitingHandlerpublic int getMaxPrimaryProgressCounter()
WaitingHandlergetMaxPrimaryProgressCounter in interface WaitingHandlerpublic int getSecondaryProgressCounter()
WaitingHandlergetSecondaryProgressCounter in interface WaitingHandlerpublic int getMaxSecondaryProgressCounter()
WaitingHandlergetMaxSecondaryProgressCounter in interface WaitingHandlerpublic void setDisplayProgress(boolean displayProgress)
WaitingHandlersetDisplayProgress in interface WaitingHandlerdisplayProgress - if the waiting handler is to show the progress for
the current process or notpublic boolean getDisplayProgress()
WaitingHandlergetDisplayProgress in interface WaitingHandlerCopyright © 2016. All rights reserved.