com.enderak.procol.client.gui
Class GenericUploadPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.enderak.procol.client.gui.GenericUploadPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, javax.swing.event.ListSelectionListener, java.awt.MenuContainer, java.util.Observer, java.io.Serializable
Direct Known Subclasses:
CheckInPanel, UploadPanel

public class GenericUploadPanel
extends javax.swing.JPanel
implements java.util.Observer, javax.swing.event.ListSelectionListener, java.awt.event.ActionListener

Displays a panel for use with checking in or uploading files to the server. Allows user to input versioning and changelog information

Author:
Justin Dieters
See Also:
Serialized Form

Field Summary
protected  javax.swing.JRadioButton absoluteRadioButton
           
protected  javax.swing.JPanel buttonPanel
           
protected  javax.swing.JButton cancelButton
           
protected  java.lang.String changeLog
           
protected  javax.swing.JPanel changeLogPanel
           
protected  javax.swing.JScrollPane changeLogScrollPane
           
protected  javax.swing.JTextArea changeLogTextArea
           
protected  ProColFileJList fileList
           
protected  javax.swing.JPanel fileListPanel
           
protected  javax.swing.JScrollPane fileListScrollPane
           
protected  boolean floating
           
protected  javax.swing.JRadioButton incrementRadioButton
           
protected  boolean isVerticalAlign
           
protected  javax.swing.JSpinner major
           
protected  javax.swing.JSpinner minor
           
protected  javax.swing.JPanel newInfoPanel
           
protected  int newMajor
           
protected  int newMinor
           
protected  int newRevision
           
protected  javax.swing.JRadioButton noChangeRadioButton
           
protected  javax.swing.JButton okButton
           
protected  java.lang.String position
           
protected  javax.swing.JSpinner revision
           
protected  java.lang.Object[] selectedFiles
           
protected  javax.swing.JSplitPane splitPane
           
protected  javax.swing.JPanel versionInputPanel
           
protected  javax.swing.ButtonGroup versionOptionsButtonGroup
           
protected  javax.swing.JPanel versionOptionsPanel
           
protected  javax.swing.JPanel versionPanel
           
protected  org.gjt.sp.jedit.View view
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GenericUploadPanel(org.gjt.sp.jedit.View view, java.lang.String position, java.lang.String type)
          Constructor for the GenericUploadPanel object
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
protected  int[] getMaxSelectedVersion()
          Gets the maximum version for all selected files
protected  void setSpinners(int majMin, int majVal, int minMin, int minVal, int revMin, int revVal, boolean enabled)
          Sets the values of the version spinners
 void update(java.util.Observable o, java.lang.Object arg)
           
protected  void validateVersionSpinners()
          Resets the version spinners to the default value, based on the current version mode selected
 void valueChanged(javax.swing.event.ListSelectionEvent e)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buttonPanel

protected javax.swing.JPanel buttonPanel

changeLogPanel

protected javax.swing.JPanel changeLogPanel

newInfoPanel

protected javax.swing.JPanel newInfoPanel

versionPanel

protected javax.swing.JPanel versionPanel

versionInputPanel

protected javax.swing.JPanel versionInputPanel

versionOptionsPanel

protected javax.swing.JPanel versionOptionsPanel

fileListPanel

protected javax.swing.JPanel fileListPanel

absoluteRadioButton

protected javax.swing.JRadioButton absoluteRadioButton

incrementRadioButton

protected javax.swing.JRadioButton incrementRadioButton

noChangeRadioButton

protected javax.swing.JRadioButton noChangeRadioButton

cancelButton

protected javax.swing.JButton cancelButton

okButton

protected javax.swing.JButton okButton

versionOptionsButtonGroup

protected javax.swing.ButtonGroup versionOptionsButtonGroup

changeLogScrollPane

protected javax.swing.JScrollPane changeLogScrollPane

fileListScrollPane

protected javax.swing.JScrollPane fileListScrollPane

changeLogTextArea

protected javax.swing.JTextArea changeLogTextArea

major

protected javax.swing.JSpinner major

minor

protected javax.swing.JSpinner minor

revision

protected javax.swing.JSpinner revision

newMajor

protected int newMajor

newMinor

protected int newMinor

newRevision

protected int newRevision

changeLog

protected java.lang.String changeLog

selectedFiles

protected java.lang.Object[] selectedFiles

splitPane

protected javax.swing.JSplitPane splitPane

fileList

protected ProColFileJList fileList

isVerticalAlign

protected boolean isVerticalAlign

floating

protected boolean floating

view

protected org.gjt.sp.jedit.View view

position

protected java.lang.String position
Constructor Detail

GenericUploadPanel

public GenericUploadPanel(org.gjt.sp.jedit.View view,
                          java.lang.String position,
                          java.lang.String type)
Constructor for the GenericUploadPanel object

Parameters:
view - View associated with panel, as specified from jEdit
position - Position of panel, as specified from jEdit
type - The type of panel, used when getting stuff from properties file
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - The ActionEvent event

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - The ListSelectionEvent event

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Parameters:
o - Observable that called the update
arg - Object argument

validateVersionSpinners

protected void validateVersionSpinners()
Resets the version spinners to the default value, based on the current version mode selected


getMaxSelectedVersion

protected int[] getMaxSelectedVersion()
Gets the maximum version for all selected files

Returns:
int array containing maximium major, minor, and revision values

setSpinners

protected void setSpinners(int majMin,
                           int majVal,
                           int minMin,
                           int minVal,
                           int revMin,
                           int revVal,
                           boolean enabled)
Sets the values of the version spinners

Parameters:
majMin - Minimum major version allowed
majVal - Current value for major version
minMin - Minimum minor version allowed
minVal - Current value for minor version
revMin - Minimum revision version allowed
revVal - Current value for revision version
enabled - Enable spinners?