public class ProgressView extends javax.swing.JPanel implements ProgressObserver
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
ProgressView(java.lang.String message,
java.lang.String note)
Creates a new indeterminate ProgressView.
|
ProgressView(java.lang.String message,
java.lang.String note,
boolean isIndeterminate)
Creates a new ProgressView.
|
ProgressView(java.lang.String message,
java.lang.String note,
int min,
int max)
Creates a new ProgressView.
|
ProgressView(java.lang.String message,
java.lang.String note,
int min,
int max,
boolean isIndeterminate)
Creates a new ProgressView.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the operation.
|
void |
close()
Closes the progress view.
|
void |
complete()
Indicate that the operation is complete.
|
java.lang.String |
getError()
Specifies the error message that is displayed along with the
progress message.
|
int |
getMaximum()
Returns the maximum value -- the higher end of the progress value.
|
int |
getMinimum()
Returns the minimum value -- the lower end of the progress value.
|
javax.swing.BoundedRangeModel |
getModel() |
java.lang.String |
getNote()
Specifies the additional note that is displayed along with the
progress message.
|
int |
getProgress()
Returns the progress of the operation being monitored.
|
java.lang.String |
getWarning()
Specifies the warning message that is displayed along with the
progress message.
|
boolean |
isCanceled()
Returns true if the user has hit the Cancel button in the progress dialog.
|
boolean |
isClosed()
Returns true if the progress view is closed.
|
boolean |
isCompleted()
Returns true if the operation is completed.
|
boolean |
isIndeterminate()
Returns true if the progress observer is set to indeterminate.
|
void |
setCancelable(boolean b)
Set cancelable to false if the operation can not be canceled.
|
void |
setDoCancel(java.lang.Runnable doCancel)
The specified Runnable is executed when the user presses
the cancel button.
|
void |
setError(java.lang.String message)
Specifies the additional error message that is displayed along with the
progress message.
|
void |
setIndeterminate(boolean newValue)
Sets the progress observer to indeterminate.
|
void |
setMaximum(int m)
Specifies the maximum value.
|
void |
setMinimum(int m)
Specifies the minimum value.
|
void |
setModel(javax.swing.BoundedRangeModel brm) |
void |
setNote(java.lang.String note)
Specifies the additional note that is displayed along with the
progress message.
|
void |
setProgress(int nv)
Indicate the progress of the operation being monitored.
|
void |
setWarning(java.lang.String message)
Specifies the additional warning message that is displayed along with the
progress message.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic ProgressView(java.lang.String message,
java.lang.String note,
boolean isIndeterminate)
public ProgressView(java.lang.String message,
java.lang.String note,
int min,
int max)
public ProgressView(java.lang.String message,
java.lang.String note,
int min,
int max,
boolean isIndeterminate)
public ProgressView(java.lang.String message,
java.lang.String note)
public void setModel(javax.swing.BoundedRangeModel brm)
setModel in interface ProgressObserverpublic javax.swing.BoundedRangeModel getModel()
getModel in interface ProgressObserverpublic void setCancelable(boolean b)
setCancelable in interface ProgressObserverpublic void setDoCancel(java.lang.Runnable doCancel)
setDoCancel in interface ProgressObserverpublic void setProgress(int nv)
setProgress in interface ProgressObservernv - an int specifying the current value, between the
maximum and minimum specified for this componentsetMinimum(int),
setMaximum(int),
close()public int getProgress()
getProgress in interface ProgressObserverpublic void complete()
complete in interface ProgressObserverpublic void close()
close in interface ProgressObserverpublic int getMinimum()
getMinimum in interface ProgressObserversetMinimum(int)public void setMinimum(int m)
setMinimum in interface ProgressObserverm - an int specifying the minimum valuegetMinimum()public int getMaximum()
getMaximum in interface ProgressObserversetMaximum(int)public void setMaximum(int m)
setMaximum in interface ProgressObserverm - an int specifying the maximum valuegetMaximum()public boolean isCanceled()
isCanceled in interface ProgressObserverpublic boolean isCompleted()
isCompleted in interface ProgressObserverpublic boolean isClosed()
isClosed in interface ProgressObserverpublic void cancel()
cancel in interface ProgressObserverpublic void setNote(java.lang.String note)
setNote in interface ProgressObservernote - a String specifying the note to displaygetNote()public java.lang.String getNote()
getNote in interface ProgressObserversetNote(java.lang.String)public void setWarning(java.lang.String message)
ProgressObserversetWarning in interface ProgressObservermessage - a String specifying the message to display, or null
if there is no warning.ProgressObserver.getWarning()public java.lang.String getWarning()
ProgressObservergetWarning in interface ProgressObserverpublic void setError(java.lang.String message)
ProgressObserversetError in interface ProgressObservermessage - a String specifying the message to display, or null
if there is no error.ProgressObserver.getWarning()public java.lang.String getError()
ProgressObservergetError in interface ProgressObserverpublic void setIndeterminate(boolean newValue)
ProgressObserversetIndeterminate in interface ProgressObserverpublic boolean isIndeterminate()
ProgressObserverisIndeterminate in interface ProgressObserver