org.bibalex.daf.managers.checkin
Class AdvancedSearchGUI

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.AdvancedSearchGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class AdvancedSearchGUI
extends BaseManagerGUI

This class gives the user ability to form advanced and detailed query. It introduces almost all searchable entities and status in DAFv2

Author:
mohammed.abuouda
See Also:
Serialized Form

Nested Class Summary
 
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  CheckBoxList batchCheckList
           
private  javax.swing.JLabel batchLabel
           
private  javax.swing.JScrollPane batchScrollPane
           
private  javax.swing.JCheckBox checkedInOnlyCheckBox
           
private  javax.swing.JLabel checkedInOnlyLabel
           
private  javax.swing.JButton clearButton
          clearButton is the button that clear all
private  CheckBoxList collectionCheckList
           
private  javax.swing.JScrollPane collectionScrollPane
          Collections Lists
private  javax.swing.JLabel collLabel
           
private  javax.swing.JCheckBox detailedWorkFlowCheckBox
           
private  javax.swing.JLabel detailedWorkFlowLabel
           
private  CheckBoxList externalTypeCheckList
           
private  javax.swing.JScrollPane externalTypeScrollPane
           
private  javax.swing.JLabel extIDLabel
           
private  javax.swing.JTextField extIDTextField
           
private  javax.swing.JLabel extTypeLabel
           
private  DateButton fromDateButton
          Date Buttons
private  javax.swing.JLabel fromDateLabel
           
private  javax.swing.JLabel jobIDlabel
           
private  javax.swing.JTextField jobIDTextField
           
private  CheckBoxList jobStatusCheckList
           
private  javax.swing.JScrollPane jobStatusScrollPane
           
private  CheckBoxList jobTypeCheckList
           
private  javax.swing.JLabel jobTypeLabel
           
private  javax.swing.JScrollPane jobTypeScrollPane
           
private  javax.swing.JPanel jPanel
           
private  javax.swing.JLabel langLabel
           
private  CheckBoxList languageCheckList
           
private  javax.swing.JScrollPane languageScrollPane
           
private  javax.swing.JPanel masterPanel
           
private  CheckBoxList oldNewCheckList
           
private  javax.swing.JLabel oldNewLabel
           
private  javax.swing.JScrollPane oldNewScrollPane
           
private  CheckBoxList phaseCheckList
           
private  javax.swing.JLabel phaseLabel
           
private  javax.swing.JScrollPane phaseScrollPane
           
private  javax.swing.JLabel statusLabel
           
private  CheckBoxList storageCheckList
           
private  javax.swing.JLabel storageLabel
           
private  javax.swing.JScrollPane storageScrollPane
           
private  javax.swing.JButton submitButton
           
private  DateButton toDateButton
           
private  javax.swing.JLabel toDateLabel
           
private  CheckBoxList userCheckList
           
private  javax.swing.JLabel userLabel
           
private  javax.swing.JScrollPane userScrollPane
           
 
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
AdvancedSearchGUI()
           
 
Method Summary
private  void adjustRelation(CheckBoxList checkBoxList, int ID, int parentColumn, boolean select)
          Selects or deselects all elements belongs to ID
private  void adjustRelation(CheckBoxList checkBoxList, int ID, java.lang.String parentColumn, boolean select)
          Selects or deselects all elements belongs to ID
private  void clearAll()
           
private  void clearList(CheckBoxList checkBoxList, int selectedIndex)
          This method deselects the "Any" entry if there at least one entry selected<>"Any"
private  javax.swing.JScrollPane getBatchScrollPane()
           
private  javax.swing.JCheckBox getCheckedInOnlyCheckBox()
          This method initializes checkedInOnlyCheckBox
private  javax.swing.JButton getClearButton()
          This method initializes clearButton Which clear the GUI
private  javax.swing.JScrollPane getCollectionScrollPane()
           
private  javax.swing.JCheckBox getDetailedWorkFlowCheckBoxCheckBox()
          This method initializes detailedWorkFlowCheckBox
private  javax.swing.JScrollPane getExternalTypeScrollPane()
           
private  javax.swing.JTextField getExtIDTextField()
          This method initializes extIDTextField
private  javax.swing.JButton getFromDatetButton()
          This method initializes fromDateButton
private  int getID(CheckBoxList checkBoxList, int Index)
          Gets selected mapped ID from the selected index
private  int[] getIDsArray(CheckBoxList checkBoxList)
          Gets selected IDs from the argument checkList
private  java.lang.String getIDsString(CheckBoxList checkBoxList)
          Gets selected IDs from the argument checkList
private  javax.swing.JTextField getJobIDTextField()
          This method initializes jobIDTextField
private  javax.swing.JScrollPane getJobStatusScrollPane()
           
private  javax.swing.JScrollPane getJobTypeScrollPane()
           
private  javax.swing.JPanel getJPanel()
          This method initializes jPanel
private  javax.swing.JScrollPane getLanguageScrollPane()
           
private  javax.swing.JPanel getMasterPanel()
          This method initializes masterPanel
private  javax.swing.JScrollPane getOldNewScrollPane()
           
private  javax.swing.JScrollPane getPhaseScrollPane()
           
private  javax.swing.JScrollPane getStorageScrollPane()
           
private  javax.swing.JButton getSubmitButton()
          This method initializes SubmitButton
private  javax.swing.JButton getToDateButton()
          This method initializes toDateButton
private  javax.swing.JScrollPane getUserScrollPane()
           
private  boolean hasID(CheckBoxList checkBoxList, int ID)
          Checks if checkList has argument ID or not
private  void initialize()
          This method initializes this
 void reloadManager()
          This method Resets Controls
private  void setNewJobControls(boolean onOff)
          This method enables checkLists that used in forming qury qbout New or Old Jobs
private  void showMsg(java.lang.String msg)
           
 
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

collLabel

private javax.swing.JLabel collLabel

batchLabel

private javax.swing.JLabel batchLabel

langLabel

private javax.swing.JLabel langLabel

storageLabel

private javax.swing.JLabel storageLabel

jobTypeLabel

private javax.swing.JLabel jobTypeLabel

phaseLabel

private javax.swing.JLabel phaseLabel

extTypeLabel

private javax.swing.JLabel extTypeLabel

userLabel

private javax.swing.JLabel userLabel

statusLabel

private javax.swing.JLabel statusLabel

oldNewLabel

private javax.swing.JLabel oldNewLabel

jobIDlabel

private javax.swing.JLabel jobIDlabel

extIDLabel

private javax.swing.JLabel extIDLabel

fromDateLabel

private javax.swing.JLabel fromDateLabel

toDateLabel

private javax.swing.JLabel toDateLabel

detailedWorkFlowLabel

private javax.swing.JLabel detailedWorkFlowLabel

checkedInOnlyLabel

private javax.swing.JLabel checkedInOnlyLabel

jPanel

private javax.swing.JPanel jPanel

masterPanel

private javax.swing.JPanel masterPanel

extIDTextField

private javax.swing.JTextField extIDTextField

jobIDTextField

private javax.swing.JTextField jobIDTextField

submitButton

private javax.swing.JButton submitButton

clearButton

private javax.swing.JButton clearButton
clearButton is the button that clear all


fromDateButton

private DateButton fromDateButton
Date Buttons


toDateButton

private DateButton toDateButton

collectionScrollPane

private javax.swing.JScrollPane collectionScrollPane
Collections Lists


batchScrollPane

private javax.swing.JScrollPane batchScrollPane

languageScrollPane

private javax.swing.JScrollPane languageScrollPane

storageScrollPane

private javax.swing.JScrollPane storageScrollPane

jobTypeScrollPane

private javax.swing.JScrollPane jobTypeScrollPane

phaseScrollPane

private javax.swing.JScrollPane phaseScrollPane

externalTypeScrollPane

private javax.swing.JScrollPane externalTypeScrollPane

userScrollPane

private javax.swing.JScrollPane userScrollPane

jobStatusScrollPane

private javax.swing.JScrollPane jobStatusScrollPane

oldNewScrollPane

private javax.swing.JScrollPane oldNewScrollPane

collectionCheckList

private CheckBoxList collectionCheckList

batchCheckList

private CheckBoxList batchCheckList

languageCheckList

private CheckBoxList languageCheckList

storageCheckList

private CheckBoxList storageCheckList

jobTypeCheckList

private CheckBoxList jobTypeCheckList

phaseCheckList

private CheckBoxList phaseCheckList

externalTypeCheckList

private CheckBoxList externalTypeCheckList

userCheckList

private CheckBoxList userCheckList

jobStatusCheckList

private CheckBoxList jobStatusCheckList

oldNewCheckList

private CheckBoxList oldNewCheckList

detailedWorkFlowCheckBox

private javax.swing.JCheckBox detailedWorkFlowCheckBox

checkedInOnlyCheckBox

private javax.swing.JCheckBox checkedInOnlyCheckBox
Constructor Detail

AdvancedSearchGUI

public AdvancedSearchGUI()
Method Detail

initialize

private void initialize()
This method initializes this


getJPanel

private javax.swing.JPanel getJPanel()
This method initializes jPanel

Returns:
javax.swing.JPanel

getMasterPanel

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

Returns:
javax.swing.JPanel

getSubmitButton

private javax.swing.JButton getSubmitButton()
This method initializes SubmitButton

Returns:
javax.swing.JButton

getClearButton

private javax.swing.JButton getClearButton()
This method initializes clearButton Which clear the GUI

Returns:
javax.swing.JButton

showMsg

private void showMsg(java.lang.String msg)

getJobIDTextField

private javax.swing.JTextField getJobIDTextField()
This method initializes jobIDTextField

Returns:
javax.swing.JTextField

getExtIDTextField

private javax.swing.JTextField getExtIDTextField()
This method initializes extIDTextField

Returns:
javax.swing.JTextField

getFromDatetButton

private javax.swing.JButton getFromDatetButton()
This method initializes fromDateButton

Returns:
JButton

getToDateButton

private javax.swing.JButton getToDateButton()
This method initializes toDateButton

Returns:
JButton

getDetailedWorkFlowCheckBoxCheckBox

private javax.swing.JCheckBox getDetailedWorkFlowCheckBoxCheckBox()
This method initializes detailedWorkFlowCheckBox

Returns:
JCheckBox

getCheckedInOnlyCheckBox

private javax.swing.JCheckBox getCheckedInOnlyCheckBox()
This method initializes checkedInOnlyCheckBox

Returns:
JCheckBox

clearList

private void clearList(CheckBoxList checkBoxList,
                       int selectedIndex)
This method deselects the "Any" entry if there at least one entry selected<>"Any"

Parameters:
checkBoxList -

getIDsString

private java.lang.String getIDsString(CheckBoxList checkBoxList)
Gets selected IDs from the argument checkList

Returns:
string representing selected IDs (Comma seperated)

getIDsArray

private int[] getIDsArray(CheckBoxList checkBoxList)
Gets selected IDs from the argument checkList

Returns:
Array Of integers representing selected IDs

hasID

private boolean hasID(CheckBoxList checkBoxList,
                      int ID)
Checks if checkList has argument ID or not

Returns:
true if CheckBoxList contains the ID, false otherwise

getID

private int getID(CheckBoxList checkBoxList,
                  int Index)
Gets selected mapped ID from the selected index

Returns:
actual ID (database)

adjustRelation

private void adjustRelation(CheckBoxList checkBoxList,
                            int ID,
                            java.lang.String parentColumn,
                            boolean select)
Selects or deselects all elements belongs to ID

Parameters:
CheckBoxList - the list to be selected or deselected
ID - parent ID;
parentColumn - the column to filter on (String)
select - select elements if select = true else select batches else deselect them

adjustRelation

private void adjustRelation(CheckBoxList checkBoxList,
                            int ID,
                            int parentColumn,
                            boolean select)
Selects or deselects all elements belongs to ID

Parameters:
CheckBoxList - the list to be selected or deselected
ID - parent ID;
parentColumn - the column to filter on (integer)
select - select elements if select = true else select batches else deselect them

getCollectionScrollPane

private javax.swing.JScrollPane getCollectionScrollPane()

getBatchScrollPane

private javax.swing.JScrollPane getBatchScrollPane()

getStorageScrollPane

private javax.swing.JScrollPane getStorageScrollPane()

getLanguageScrollPane

private javax.swing.JScrollPane getLanguageScrollPane()

getJobTypeScrollPane

private javax.swing.JScrollPane getJobTypeScrollPane()

getPhaseScrollPane

private javax.swing.JScrollPane getPhaseScrollPane()

getExternalTypeScrollPane

private javax.swing.JScrollPane getExternalTypeScrollPane()

getUserScrollPane

private javax.swing.JScrollPane getUserScrollPane()

getJobStatusScrollPane

private javax.swing.JScrollPane getJobStatusScrollPane()

getOldNewScrollPane

private javax.swing.JScrollPane getOldNewScrollPane()

setNewJobControls

private void setNewJobControls(boolean onOff)
This method enables checkLists that used in forming qury qbout New or Old Jobs

Parameters:
onOff - to enable -->onOff=true. to disable --> onOff=false

clearAll

private void clearAll()

reloadManager

public void reloadManager()
This method Resets Controls

Specified by:
reloadManager in class BaseManagerGUI