org.sourcejammer.client.gui.dialog
Class AddFilesDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--org.sourcejammer.client.gui.dialog.SJDialog
                                      |
                                      +--org.sourcejammer.client.gui.dialog.AddFilesDialog
All Implemented Interfaces:
javax.accessibility.Accessible, ClickValues, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class AddFilesDialog
extends SJDialog
implements ClickValues

Title: $FileName: AddFilesDialog.java$

Version:
$VerNum: 8$
Author:
$AuthorName: Rob MacGrogan$

$Description: $
$KeyWordsOff: $

See Also:
Serialized Form

Field Summary
private  javax.swing.JPanel advancedPane
           
private  javax.swing.JPanel buttonPanel
           
private  javax.swing.JPanel centerPane
           
private  AddFilesDialog dialog
           
private  boolean mbAddAllContentsRecursively
           
private  boolean mbOverrideDefaultTypes
           
private  boolean mbStoreAsBinary
           
private  int miButtonClicked
           
private  javax.swing.JCheckBox mjAddContentsRecursively
           
private  javax.swing.JRadioButton mjBinaryRadio
           
private  javax.swing.JButton mjBtnAdvanced
           
private  javax.swing.JTextArea mjDescription
           
private  javax.swing.JComboBox mjHistoryType
           
private  javax.swing.JLabel mjHistoryTypeLabel
           
private  javax.swing.JPanel mjHistoryTypePanel
           
private  javax.swing.JList mjList
           
private  javax.swing.JRadioButton mjNothingRadio
           
private  javax.swing.JCheckBox mjOverrideDefaultTypes
           
private  javax.swing.JRadioButton mjReadOnlyRadio
           
private  javax.swing.JRadioButton mjRemoveRadio
           
private  javax.swing.JRadioButton mjTextRadio
           
private  java.lang.String msAfterAddAction
           
private  java.lang.String msDescription
           
private  java.lang.String[] msSelectedFileList
           
(package private) static javax.swing.JFrame testFrame
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.sourcejammer.client.gui.dialog.ClickValues
CANCEL_BUTTON_CLICKED, DIALOG_CLOSED, NO_BUTTON_CLICKED, OK_BUTTON_CLICKED, YES_BUTTON_CLICKED
 
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
AddFilesDialog(java.awt.Dialog owner, java.io.File directory, org.sourcejammer.project.view.NodeName node, java.lang.String[] existingFiles)
           
AddFilesDialog(java.awt.Dialog owner, java.io.File directory, org.sourcejammer.project.view.NodeName node, java.lang.String[] existingFiles, boolean preSelectAll)
           
AddFilesDialog(java.awt.Frame owner, java.io.File directory, org.sourcejammer.project.view.NodeName node, java.lang.String[] existingFiles)
          Construct a new AddFilesDialog.
AddFilesDialog(java.awt.Frame owner, java.io.File directory, org.sourcejammer.project.view.NodeName node, java.lang.String[] existingFiles, boolean preSelectAll)
           
 
Method Summary
private  void addAdvancedPane()
           
private  void addStringToVector(java.util.Vector vec, java.lang.String s)
           
private  javax.swing.JCheckBox buildAddAllContents()
           
private  javax.swing.JButton buildAdvancedButton()
           
private  javax.swing.JPanel buildAdvancedPanel()
           
private  javax.swing.JPanel buildAfterAddActionPanel()
           
private  javax.swing.JPanel buildAfterAddCheckBoxes()
           
private  javax.swing.JPanel buildButtonPanel()
           
private  javax.swing.JButton buildCancelButton()
           
private  javax.swing.JPanel buildCenterPanel(java.io.File directory, java.lang.String[] existingFiles)
           
private  javax.swing.JPanel buildCheckBoxGroup()
           
private  javax.swing.JPanel buildDescriptionPane()
           
private  javax.swing.JScrollPane buildFileListPane(java.io.File directory, java.lang.String[] existingFiles)
           
private  javax.swing.JPanel buildFileTypeOptionsPanel()
           
private  javax.swing.JComboBox buildHistorySelector()
           
private  javax.swing.JPanel buildHistoryTypePanel()
           
private  javax.swing.JPanel buildLabelPanel(java.lang.String sCurrentProject, java.lang.String sCurrentDirectory)
           
private  javax.swing.JButton buildOKButton()
           
private  javax.swing.JPanel buildOverrideDefaultTypes()
           
private  javax.swing.JPanel buildPlaceHolderPanel(java.lang.String placeHolder)
           
 java.lang.String getAfterAddAction()
           
private  java.util.Vector getChildFileNames(java.io.File dir, java.lang.String[] existingFiles)
          Returns a vector of the names of the files in the directory dir, excluding all names in the existingFiles[].
private  int getDefaultFileType()
           
 java.lang.String getDescription()
           
 int getHistoryType()
           
 java.lang.String[] getSelectedFiles()
           
 boolean getStoreAsBinary()
           
private  void initializeDialog(java.io.File directory, org.sourcejammer.project.view.NodeName node, java.lang.String[] existingFiles, boolean preSelectAll)
          Build the dialog.
 boolean isAddAllContentsRecursively()
           
 boolean isOverrideDefaults()
           
static void main(java.lang.String[] args)
           
 int showDialog(java.awt.Component c)
          Display the dialog.
 
Methods inherited from class org.sourcejammer.client.gui.dialog.SJDialog
createRootPane
 
Methods inherited from class javax.swing.JDialog
addImpl, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, 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, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dialog

private AddFilesDialog dialog

mjList

private javax.swing.JList mjList

msSelectedFileList

private java.lang.String[] msSelectedFileList

msDescription

private java.lang.String msDescription

mjDescription

private javax.swing.JTextArea mjDescription

miButtonClicked

private int miButtonClicked

mjBinaryRadio

private javax.swing.JRadioButton mjBinaryRadio

mjTextRadio

private javax.swing.JRadioButton mjTextRadio

mbStoreAsBinary

private boolean mbStoreAsBinary

mjAddContentsRecursively

private javax.swing.JCheckBox mjAddContentsRecursively

mbAddAllContentsRecursively

private boolean mbAddAllContentsRecursively

mjHistoryType

private javax.swing.JComboBox mjHistoryType

mjHistoryTypeLabel

private javax.swing.JLabel mjHistoryTypeLabel

mbOverrideDefaultTypes

private boolean mbOverrideDefaultTypes

mjOverrideDefaultTypes

private javax.swing.JCheckBox mjOverrideDefaultTypes

mjHistoryTypePanel

private javax.swing.JPanel mjHistoryTypePanel

centerPane

private javax.swing.JPanel centerPane

advancedPane

private javax.swing.JPanel advancedPane

buttonPanel

private javax.swing.JPanel buttonPanel

mjBtnAdvanced

private javax.swing.JButton mjBtnAdvanced

mjReadOnlyRadio

private javax.swing.JRadioButton mjReadOnlyRadio

mjRemoveRadio

private javax.swing.JRadioButton mjRemoveRadio

mjNothingRadio

private javax.swing.JRadioButton mjNothingRadio

msAfterAddAction

private java.lang.String msAfterAddAction

testFrame

static javax.swing.JFrame testFrame
Constructor Detail

AddFilesDialog

public AddFilesDialog(java.awt.Frame owner,
                      java.io.File directory,
                      org.sourcejammer.project.view.NodeName node,
                      java.lang.String[] existingFiles)
Construct a new AddFilesDialog.


AddFilesDialog

public AddFilesDialog(java.awt.Dialog owner,
                      java.io.File directory,
                      org.sourcejammer.project.view.NodeName node,
                      java.lang.String[] existingFiles)

AddFilesDialog

public AddFilesDialog(java.awt.Dialog owner,
                      java.io.File directory,
                      org.sourcejammer.project.view.NodeName node,
                      java.lang.String[] existingFiles,
                      boolean preSelectAll)

AddFilesDialog

public AddFilesDialog(java.awt.Frame owner,
                      java.io.File directory,
                      org.sourcejammer.project.view.NodeName node,
                      java.lang.String[] existingFiles,
                      boolean preSelectAll)
Method Detail

getAfterAddAction

public java.lang.String getAfterAddAction()

initializeDialog

private void initializeDialog(java.io.File directory,
                              org.sourcejammer.project.view.NodeName node,
                              java.lang.String[] existingFiles,
                              boolean preSelectAll)
Build the dialog.


buildCenterPanel

private javax.swing.JPanel buildCenterPanel(java.io.File directory,
                                            java.lang.String[] existingFiles)

addAdvancedPane

private void addAdvancedPane()

buildPlaceHolderPanel

private javax.swing.JPanel buildPlaceHolderPanel(java.lang.String placeHolder)

buildAdvancedPanel

private javax.swing.JPanel buildAdvancedPanel()

buildAfterAddActionPanel

private javax.swing.JPanel buildAfterAddActionPanel()

buildAfterAddCheckBoxes

private javax.swing.JPanel buildAfterAddCheckBoxes()

buildFileTypeOptionsPanel

private javax.swing.JPanel buildFileTypeOptionsPanel()

buildHistoryTypePanel

private javax.swing.JPanel buildHistoryTypePanel()

getHistoryType

public int getHistoryType()

isOverrideDefaults

public boolean isOverrideDefaults()

getSelectedFiles

public java.lang.String[] getSelectedFiles()

getDescription

public java.lang.String getDescription()

getStoreAsBinary

public boolean getStoreAsBinary()

isAddAllContentsRecursively

public boolean isAddAllContentsRecursively()

getChildFileNames

private java.util.Vector getChildFileNames(java.io.File dir,
                                           java.lang.String[] existingFiles)
Returns a vector of the names of the files in the directory dir, excluding all names in the existingFiles[].


addStringToVector

private void addStringToVector(java.util.Vector vec,
                               java.lang.String s)

buildHistorySelector

private javax.swing.JComboBox buildHistorySelector()

getDefaultFileType

private int getDefaultFileType()

buildOverrideDefaultTypes

private javax.swing.JPanel buildOverrideDefaultTypes()

buildAddAllContents

private javax.swing.JCheckBox buildAddAllContents()

buildCheckBoxGroup

private javax.swing.JPanel buildCheckBoxGroup()

buildFileListPane

private javax.swing.JScrollPane buildFileListPane(java.io.File directory,
                                                  java.lang.String[] existingFiles)

buildDescriptionPane

private javax.swing.JPanel buildDescriptionPane()

buildButtonPanel

private javax.swing.JPanel buildButtonPanel()

buildAdvancedButton

private javax.swing.JButton buildAdvancedButton()

buildOKButton

private javax.swing.JButton buildOKButton()

buildCancelButton

private javax.swing.JButton buildCancelButton()

buildLabelPanel

private javax.swing.JPanel buildLabelPanel(java.lang.String sCurrentProject,
                                           java.lang.String sCurrentDirectory)

showDialog

public int showDialog(java.awt.Component c)
Display the dialog.

Returns:
the button click value.

main

public static void main(java.lang.String[] args)


Copyright © 2003 Soucejammer project.