|
||||||||||
| 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
org.peace_tools.core.DeleteDialog
public class DeleteDialog
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
javax.swing.JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private javax.swing.JPanel |
bottomPanel
The bottom panel in the dialog box that contains both the OK/Cancel buttons and the progress bar. |
private static java.lang.String |
CANT_FIND_SERVER
A message that is formatted and displayed to the user when a server corresponding to a given job entry could not be located in the work space. |
private static java.lang.String |
DATASET_ERROR
Message to be displayed to the user (after formatting) to report error when deleting a workspace entry. |
private javax.swing.JCheckBox |
deleteFiles
A check box to determine if the user wants the physical file to be deleted as well. |
private javax.swing.JLabel |
delPath
This label is used to display the actual path being deleted when physical file deletion is requested. |
private static java.lang.String |
FILE_DEL_ERROR
A message that is formatted and displayed to the user when an error occurs when deleting files or directories corresponding to a given entry in the work space. |
private javax.swing.JLabel |
icon
The icon that is displayed in this dialog box to the left. |
private MainFrame |
mainFrame
A convenient reference to the main frame that logically owns this dialog. |
private javax.swing.JLabel |
mainMessage
This label contains the main message displayed in this dialog. |
private static java.lang.String[] |
Message
A set of predefined static messages to be displayed to the user indicating the entry to be removed and the implications of removing the entry. |
private javax.swing.JProgressBar |
progressBar
The progress bar that is placed in indeterminate mode when deleting remote entries and directories. |
private static long |
serialVersionUID
A generated serialization UID to keep compiler happy. |
private java.lang.Object |
wsEntry
The actual work space entry to be removed by this dialog. |
| 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 | |
|---|---|
DeleteDialog(MainFrame mainFrame,
java.lang.Object wsEntry)
The constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handle clicking of OK or Cancel buttons. |
private void |
deleteLocalFile(java.lang.String fileName)
Helper method to delete a local file. |
private void |
deleteRemoteDir(Server server,
java.lang.String directory)
Helper method to recursively delete file on server. |
private void |
delJobFiles(Job job)
Helper method to delete files for a given job. |
private void |
disposeDialog()
Helper method to hide and dispose this dialog. |
private int |
getTypeCode(java.lang.Object wsObject)
An internal method to returns a type code for a given work space entry. |
private void |
removeDataSet(DataSet dataSet)
Helper method to delete a data set along with all underlying entries and files. |
void |
run()
This method is called when the user clicks the OK button to delete entry(s). |
| Methods inherited from class javax.swing.JDialog |
|---|
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 |
| 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.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront |
| Methods inherited from class java.awt.Container |
|---|
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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, isOpaque, 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, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final MainFrame mainFrame
private final java.lang.Object wsEntry
private javax.swing.JCheckBox deleteFiles
private javax.swing.JLabel icon
private javax.swing.JProgressBar progressBar
private javax.swing.JPanel bottomPanel
private javax.swing.JLabel delPath
private javax.swing.JLabel mainMessage
private static final java.lang.String[] Message
private static final java.lang.String FILE_DEL_ERROR
private static final java.lang.String CANT_FIND_SERVER
private static final java.lang.String DATASET_ERROR
private static final long serialVersionUID
| Constructor Detail |
|---|
public DeleteDialog(MainFrame mainFrame,
java.lang.Object wsEntry)
mainFrame - The main frame that ultimately owns all views and
this dialog box. This information is required to correctly create a
modal dialog that does not steal focus from other applications.wsEntry - The work space entry to be deleted. This object must
be a valid work space entry such as: Job, Server, MSTClusterData,
MSTData, or DataSet.| Method Detail |
|---|
private int getTypeCode(java.lang.Object wsObject)
| Object Type | Code |
| Job | 0 |
| Server | 1 |
| MSTClusterData | 2 |
| MSTData | 3 |
| DataSet | 4 |
wsObject - The wsObject whose type code is to be returned.
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - The action event to be processed by this method.public void run()
run in interface java.lang.Runnableprivate void disposeDialog()
private void removeDataSet(DataSet dataSet)
dataSet - The data set to be removed from the work space.
private void delJobFiles(Job job)
throws java.lang.Exception
job - The job entry to be removed.
java.lang.Exception
private void deleteLocalFile(java.lang.String fileName)
throws java.lang.Exception
fileName - The full path to the file to be deleted.
java.lang.Exception - This method throws an exception on errors.
private void deleteRemoteDir(Server server,
java.lang.String directory)
throws java.lang.Exception
server - The server entry which the file is to be deleted.directory - The path to the directory to be deleted.
java.lang.Exception - This method throws an exception on errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||