org.bibalex.daf.managers.checkin
Class BatchManagerGUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.bibalex.daf.managers.BaseManagerGUI
                      extended by org.bibalex.daf.managers.checkin.BatchManagerGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class BatchManagerGUI
extends BaseManagerGUI

The Batch Manager GUI.

Author:
Shehab.Kamal
See Also:
Serialized Form

Nested Class Summary
private static class BatchManagerGUI.UIStates
           
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JLabel availableBatchLabel
           
private  javax.swing.JList availableBatchList
           
private  javax.swing.JScrollPane availableBatchScrollPane
           
private  javax.swing.JLabel availableCollectionLabel
           
private  javax.swing.JList availableCollectionList
           
private  javax.swing.JScrollPane availableCollectionScrollPane
           
private  javax.swing.JComboBox collectionComboBox
           
private  javax.swing.JLabel collectionLabel
           
private  javax.swing.JLabel commentLabel
           
private  javax.swing.JTextField commentTextField
           
private  javax.swing.JButton createNewBatchButton
           
private  DateButton dateDateButton
           
private  javax.swing.JLabel dateLabel
           
private  javax.swing.JButton deleteBatchButton
           
private  javax.swing.JPanel detailsPanel
           
private  javax.swing.JPanel jContentPane
           
private  javax.swing.JComboBox jobTypeComboBox
           
private  javax.swing.JLabel jobTypeLabel
           
protected  int lastSelectedBatchIndex
           
private  javax.swing.JPanel masterPanel
           
private  javax.swing.JLabel nameLabel
           
private  javax.swing.JTextField nameTextField
           
private  boolean recordModified
           
private  javax.swing.JButton saveButton
           
private  BatchManagerGUI.UIStates uiState
           
private  java.awt.event.KeyAdapter updatesKeyAdapter
           
 
Fields inherited from class org.bibalex.daf.managers.BaseManagerGUI
currentInstance, resourceManager
 
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
BatchManagerGUI()
          Creates a new instance of BatchManagerGUI.
 
Method Summary
private  void adjustDetailsPanel()
           
private  void clearDetailsPanel()
          Clears the Details JPanel.
private  boolean confirmDiscardChanges()
          Confirm discard User changes message
private  void fieldsChanged()
           
private  void fillCollectionComboBox()
          Fills the collection ComboBox.
private  void fillJobTypeComboBox()
          Fills the jobType ComboBox.
private  javax.swing.JLabel getAvailableBatchLabel()
          Initializes availableBatch JLabel
private  javax.swing.JList getAvailableBatchList()
          Initializes availableBatch JList
private  javax.swing.JScrollPane getAvailableBatchScrollPane()
           
private  javax.swing.JLabel getAvailableCollectionLabel()
          Initializes availableCollection JLabel
private  javax.swing.JList getAvailableCollectionList()
          Initializes availableBatch JList
private  javax.swing.JScrollPane getAvailableCollectionScrollPane()
           
private  javax.swing.JComboBox getCollectionComboBox()
          Initializes collection ComboBox.
private  javax.swing.JLabel getCollectionLabel()
          Initializes collection JLabel.
private  javax.swing.JLabel getCommentLabel()
          Initializes comment JLabel.
private  javax.swing.JTextField getCommentTextField()
          Initializes comment JTextField
private  javax.swing.JButton getCreateNewBatchButton()
          This method initializes CreateNewBatch JButton.
private  DateButton getDateDateButton()
          Initializes date DateButton
private  javax.swing.JLabel getDateLabel()
          Initializes date JLabel.
private  javax.swing.JButton getDeleteBatchButton()
          Initializes deleteBatch JButton
private  javax.swing.JPanel getDetailsPanel()
          This method initializes detailsPanel
private  java.awt.Container getJContentPane()
           
private  javax.swing.JComboBox getJobTypeComboBox()
          Initializes job type ComboBox
private  javax.swing.JLabel getJobTypeLabel()
          Initializes job type JLabel.
private  javax.swing.JPanel getMasterPanel()
          This method initializes masterPanel
private  javax.swing.JLabel getNameLabel()
          Initializes name JLabel.
private  javax.swing.JTextField getNameTextField()
          Initializes name JTextField.
private  javax.swing.JButton getSaveButton()
          This method initializes saveButton
private  void initialize()
          Initializes this instance.
private  void loadAvailableBatchList()
           
private  void loadAvailableCollectionList()
           
 void reloadManager()
           
private  void saveBatch()
           
private  void setCreateMode()
          Sets this panel in create mode.
private  void setEditMode()
          Sets this panel in edit mode.
private  void showMsg(java.lang.String msg)
           
private  boolean validateValues()
          Makes sure taht the values entered are valid.
 
Methods inherited from class org.bibalex.daf.managers.BaseManagerGUI
setFocus, updateTitle
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, 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, update
 
Methods inherited from class java.awt.Container
add, 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, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uiState

private BatchManagerGUI.UIStates uiState

lastSelectedBatchIndex

protected int lastSelectedBatchIndex

recordModified

private boolean recordModified

jContentPane

private javax.swing.JPanel jContentPane

masterPanel

private javax.swing.JPanel masterPanel

availableCollectionLabel

private javax.swing.JLabel availableCollectionLabel

availableCollectionScrollPane

private javax.swing.JScrollPane availableCollectionScrollPane

availableCollectionList

private javax.swing.JList availableCollectionList

availableBatchLabel

private javax.swing.JLabel availableBatchLabel

availableBatchScrollPane

private javax.swing.JScrollPane availableBatchScrollPane

availableBatchList

private javax.swing.JList availableBatchList

deleteBatchButton

private javax.swing.JButton deleteBatchButton

createNewBatchButton

private javax.swing.JButton createNewBatchButton

detailsPanel

private javax.swing.JPanel detailsPanel

nameLabel

private javax.swing.JLabel nameLabel

nameTextField

private javax.swing.JTextField nameTextField

dateLabel

private javax.swing.JLabel dateLabel

dateDateButton

private DateButton dateDateButton

commentLabel

private javax.swing.JLabel commentLabel

commentTextField

private javax.swing.JTextField commentTextField

collectionLabel

private javax.swing.JLabel collectionLabel

collectionComboBox

private javax.swing.JComboBox collectionComboBox

jobTypeLabel

private javax.swing.JLabel jobTypeLabel

jobTypeComboBox

private javax.swing.JComboBox jobTypeComboBox

saveButton

private javax.swing.JButton saveButton

updatesKeyAdapter

private java.awt.event.KeyAdapter updatesKeyAdapter
Constructor Detail

BatchManagerGUI

public BatchManagerGUI()
Creates a new instance of BatchManagerGUI.

Method Detail

initialize

private void initialize()
Initializes this instance.


getJContentPane

private java.awt.Container getJContentPane()

getMasterPanel

private javax.swing.JPanel getMasterPanel()
This method initializes masterPanel

Returns:
javax.swing.JPanel

getAvailableCollectionLabel

private javax.swing.JLabel getAvailableCollectionLabel()
Initializes availableCollection JLabel

Returns:
AvailableBatchLabel

getAvailableCollectionScrollPane

private javax.swing.JScrollPane getAvailableCollectionScrollPane()

getAvailableCollectionList

private javax.swing.JList getAvailableCollectionList()
Initializes availableBatch JList

Returns:
javax.swing.JList

loadAvailableCollectionList

private void loadAvailableCollectionList()

getAvailableBatchLabel

private javax.swing.JLabel getAvailableBatchLabel()
Initializes availableBatch JLabel

Returns:
AvailableBatchLabel

getAvailableBatchScrollPane

private javax.swing.JScrollPane getAvailableBatchScrollPane()

getAvailableBatchList

private javax.swing.JList getAvailableBatchList()
Initializes availableBatch JList

Returns:
javax.swing.JList

loadAvailableBatchList

private void loadAvailableBatchList()

getDeleteBatchButton

private javax.swing.JButton getDeleteBatchButton()
Initializes deleteBatch JButton

Returns:
javax.swing.JButton

getCreateNewBatchButton

private javax.swing.JButton getCreateNewBatchButton()
This method initializes CreateNewBatch JButton.

Returns:
javax.swing.JButton.

setCreateMode

private void setCreateMode()
Sets this panel in create mode.


setEditMode

private void setEditMode()
Sets this panel in edit mode.


adjustDetailsPanel

private void adjustDetailsPanel()

clearDetailsPanel

private void clearDetailsPanel()
Clears the Details JPanel.


getDetailsPanel

private javax.swing.JPanel getDetailsPanel()
This method initializes detailsPanel

Returns:
javax.swing.JPanel

getNameLabel

private javax.swing.JLabel getNameLabel()
Initializes name JLabel.

Returns:
javax.swing.JLabel

getNameTextField

private javax.swing.JTextField getNameTextField()
Initializes name JTextField.

Returns:
javax.swing.JTextField

getDateLabel

private javax.swing.JLabel getDateLabel()
Initializes date JLabel.

Returns:
javax.swing.JLabel

getDateDateButton

private DateButton getDateDateButton()
Initializes date DateButton

Returns:
DateButton

getCommentLabel

private javax.swing.JLabel getCommentLabel()
Initializes comment JLabel.

Returns:
javax.swing.JLabel

getCommentTextField

private javax.swing.JTextField getCommentTextField()
Initializes comment JTextField

Returns:
javax.swing.JTextField

getCollectionLabel

private javax.swing.JLabel getCollectionLabel()
Initializes collection JLabel.

Returns:
javax.swing.JLabel

getCollectionComboBox

private javax.swing.JComboBox getCollectionComboBox()
Initializes collection ComboBox.

Returns:
javax.swing.JComboBox.

fillCollectionComboBox

private void fillCollectionComboBox()
Fills the collection ComboBox. The ComboBox is filled by loading all records from the table Collection. A default entry, (-1, <None>), is added to indicate that nothing is selected.


getJobTypeLabel

private javax.swing.JLabel getJobTypeLabel()
Initializes job type JLabel.

Returns:
javax.swing.JLabel

getJobTypeComboBox

private javax.swing.JComboBox getJobTypeComboBox()
Initializes job type ComboBox

Returns:
javax.swing.JComboBox

fillJobTypeComboBox

private void fillJobTypeComboBox()
Fills the jobType ComboBox. The ComboBox is filled by loading all records from the table JobType. A default entry, (-1, <None>), is added to indicate that nothing is selected.


fieldsChanged

private void fieldsChanged()

getSaveButton

private javax.swing.JButton getSaveButton()
This method initializes saveButton

Returns:
javax.swing.JButton

saveBatch

private void saveBatch()

validateValues

private boolean validateValues()
Makes sure taht the values entered are valid.

Returns:
True if the values are valid, otherwise false.

confirmDiscardChanges

private boolean confirmDiscardChanges()
Confirm discard User changes message

Returns:
true if confirmed and false otherwise

showMsg

private void showMsg(java.lang.String msg)

reloadManager

public void reloadManager()
Specified by:
reloadManager in class BaseManagerGUI
See Also:
BaseManagerGUI.reloadManager()