org.bibalex.daf.managers.report
Class RateReportGUI

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

public class RateReportGUI
extends BaseManagerGUI

This class loads all users and enable the reporter to genearete rate report for selected user(s) during specified dates

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  javax.swing.JLabel activeOnlyLabel
           
private  javax.swing.JCheckBox booksCheckBox
          booksCheckBox gets rate report based on jobs count not pages count
private  javax.swing.JLabel booksLabel
           
private  int booksLevel
          Variables
private  javax.swing.JScrollPane expandedRatesScrollPane
          expandedRatesScrollPane is the container Pane for expandedRatesTable
private  SortableTable expandedRatesTable
          expandedRatesTable is the table that shows up the expanded rate report
private  javax.swing.JCheckBox expandReportCheckBox
          expandReportCheckBox enables expanded report
private  javax.swing.JLabel expandReportLabel
           
private  javax.swing.JCheckBox expandUserCheckBox
          expandUserCheckBox gets active users only
private  javax.swing.JButton exportButton
          exportButton exports pendingJobsTable to excel sheet
private  DateButton fromDateButton
          fromDateButton specifies report starting date
private  javax.swing.JLabel fromDateLabel
           
private  javax.swing.JComboBox jobTypesComboBox
          jobTypesComboBox loads all Job Types
private  javax.swing.JLabel jobTypesLabel
           
private  javax.swing.JPanel jPanel
          jPanel is Main panel which containes master panel and other components
private  javax.swing.JPanel masterPanel
          masterPanel is the panel that carries the basic components which are ratesScrollPane, usersScrollPane, expandedRatesScrollPane, retrieveDataButton, exportButton, fromDateButton, toDateButton and jobTypesComboBox and JCheckBoxes
private  javax.swing.JLabel ratesLabel
           
private  javax.swing.JScrollPane ratesScrollPane
          ratesScrollPane is the container Pane for ratesTable
private  SortableTable ratesTable
          ratesTable is the table that shows up the rate report
private  javax.swing.JButton retrieveDataButton
          retrieveDataButton submit the rate query and get results from DB
private  DateButton toDateButton
          toDateButton specifies report end date
private  javax.swing.JLabel toDateLabel
           
private  javax.swing.JList usersList
           
private  javax.swing.JScrollPane usersScrollPane
          ratesScrollPane is the container Pane for usersList
private  boolean viewAll
           
 
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
RateReportGUI()
          Class constructor
 
Method Summary
private  DataTable constructExpandedTable(DataTable columnDataTable)
           
private  DataTable constructRateTable(DataTable columnDataTable)
           
private  javax.swing.JCheckBox getBooksCheckBox()
           
private  javax.swing.JScrollPane getExpandedRatesScrollPane()
          This method initializes ExapandedRatesScrollPane
private  javax.swing.JTable getExpandedRatesTable()
           
private  java.lang.Object[] getExpandedRow(DataTable allDt, DataTable redoDt, DataTable columnDataTable, int userID, java.lang.String userName)
           
private  javax.swing.JCheckBox getExpandReportCheckBox()
           
private  javax.swing.JCheckBox getExpandUsersCheckBox()
           
private  javax.swing.JButton getExportButton()
          This method initializes exportButton which carries out the functionality of exporting ratereport excel sheet
private  javax.swing.JButton getFromDatetButton()
          This method initializes fromDateButton which carries out the functionality of specifying start date to calculate the rate report
private  javax.swing.JComboBox getJobTypesComboBox()
          This method initializes jobTypesComboBox
private  javax.swing.JPanel getJPanel()
          This method initializes jPanel
private  javax.swing.JPanel getMasterPanel()
          This method initializes masterPanel
 javax.swing.JScrollPane getRatesScrollPane()
          This method initializes RatesScrollPane
 javax.swing.JTable getRatesTable()
          Gets rate report and adjust column headers
private  javax.swing.JButton getRetrieveDataButton()
          This method initializes retrieveDataButton which carries out the functionality of executes the rates query and gets the result
private  java.lang.Object[] getRow(DataTable dt, DataTable columnDataTable, int userID, java.lang.String userName)
           
private  javax.swing.JTable getTables(boolean expand)
           
private  javax.swing.JButton getToDateButton()
          This method initializes toDateButton which carries out the functionality of specifying end date to calculate the rate report
 javax.swing.JScrollPane getUsersScrollPane()
          This method initializes usersScrollPane
private  void initialize()
          This method initializes RateReportGUI
private  void loadActiveUsersList()
          Loads active users only
private  void loadAllUsersList()
           
private  void loadCurrentUser()
           
private  javax.swing.JList loadUsersList()
          Loads all Users
 void reloadManager()
          Resets controls
private  void showMsg(java.lang.String msg)
          Show message box
 
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

jPanel

private javax.swing.JPanel jPanel
jPanel is Main panel which containes master panel and other components


masterPanel

private javax.swing.JPanel masterPanel
masterPanel is the panel that carries the basic components which are ratesScrollPane, usersScrollPane, expandedRatesScrollPane, retrieveDataButton, exportButton, fromDateButton, toDateButton and jobTypesComboBox and JCheckBoxes


ratesScrollPane

private javax.swing.JScrollPane ratesScrollPane
ratesScrollPane is the container Pane for ratesTable


usersScrollPane

private javax.swing.JScrollPane usersScrollPane
ratesScrollPane is the container Pane for usersList


expandedRatesScrollPane

private javax.swing.JScrollPane expandedRatesScrollPane
expandedRatesScrollPane is the container Pane for expandedRatesTable


ratesTable

private SortableTable ratesTable
ratesTable is the table that shows up the rate report


expandedRatesTable

private SortableTable expandedRatesTable
expandedRatesTable is the table that shows up the expanded rate report


retrieveDataButton

private javax.swing.JButton retrieveDataButton
retrieveDataButton submit the rate query and get results from DB


exportButton

private javax.swing.JButton exportButton
exportButton exports pendingJobsTable to excel sheet


fromDateButton

private DateButton fromDateButton
fromDateButton specifies report starting date


toDateButton

private DateButton toDateButton
toDateButton specifies report end date


jobTypesComboBox

private javax.swing.JComboBox jobTypesComboBox
jobTypesComboBox loads all Job Types


expandReportCheckBox

private javax.swing.JCheckBox expandReportCheckBox
expandReportCheckBox enables expanded report


expandUserCheckBox

private javax.swing.JCheckBox expandUserCheckBox
expandUserCheckBox gets active users only


booksCheckBox

private javax.swing.JCheckBox booksCheckBox
booksCheckBox gets rate report based on jobs count not pages count


jobTypesLabel

private javax.swing.JLabel jobTypesLabel

usersList

private javax.swing.JList usersList

fromDateLabel

private javax.swing.JLabel fromDateLabel

toDateLabel

private javax.swing.JLabel toDateLabel

activeOnlyLabel

private javax.swing.JLabel activeOnlyLabel

booksLabel

private javax.swing.JLabel booksLabel

expandReportLabel

private javax.swing.JLabel expandReportLabel

ratesLabel

private javax.swing.JLabel ratesLabel

booksLevel

private int booksLevel
Variables


viewAll

private boolean viewAll
Constructor Detail

RateReportGUI

public RateReportGUI()
Class constructor

Method Detail

initialize

private void initialize()
This method initializes RateReportGUI


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

getRatesScrollPane

public javax.swing.JScrollPane getRatesScrollPane()
This method initializes RatesScrollPane

Returns:
javax.swing.JScrollPane

getExpandedRatesScrollPane

private javax.swing.JScrollPane getExpandedRatesScrollPane()
This method initializes ExapandedRatesScrollPane

Returns:
javax.swing.JScrollPane

getUsersScrollPane

public javax.swing.JScrollPane getUsersScrollPane()
This method initializes usersScrollPane

Returns:
javax.swing.JScrollPane

getFromDatetButton

private javax.swing.JButton getFromDatetButton()
This method initializes fromDateButton which carries out the functionality of specifying start date to calculate the rate report

Returns:
JButton

getToDateButton

private javax.swing.JButton getToDateButton()
This method initializes toDateButton which carries out the functionality of specifying end date to calculate the rate report

Returns:
JButton

getExportButton

private javax.swing.JButton getExportButton()
This method initializes exportButton which carries out the functionality of exporting ratereport excel sheet

Returns:
JButton

getRetrieveDataButton

private javax.swing.JButton getRetrieveDataButton()
This method initializes retrieveDataButton which carries out the functionality of executes the rates query and gets the result

Returns:
JButton

getJobTypesComboBox

private javax.swing.JComboBox getJobTypesComboBox()
This method initializes jobTypesComboBox

Returns:
javax.swing.JComboBox

getExpandUsersCheckBox

private javax.swing.JCheckBox getExpandUsersCheckBox()

getBooksCheckBox

private javax.swing.JCheckBox getBooksCheckBox()

getExpandReportCheckBox

private javax.swing.JCheckBox getExpandReportCheckBox()

loadUsersList

private javax.swing.JList loadUsersList()
Loads all Users

Returns:
JList

loadAllUsersList

private void loadAllUsersList()

loadActiveUsersList

private void loadActiveUsersList()
Loads active users only


loadCurrentUser

private void loadCurrentUser()

getRatesTable

public javax.swing.JTable getRatesTable()
Gets rate report and adjust column headers

Returns:
JTable

getTables

private javax.swing.JTable getTables(boolean expand)

constructRateTable

private DataTable constructRateTable(DataTable columnDataTable)

constructExpandedTable

private DataTable constructExpandedTable(DataTable columnDataTable)

getRow

private java.lang.Object[] getRow(DataTable dt,
                                  DataTable columnDataTable,
                                  int userID,
                                  java.lang.String userName)

getExpandedRow

private java.lang.Object[] getExpandedRow(DataTable allDt,
                                          DataTable redoDt,
                                          DataTable columnDataTable,
                                          int userID,
                                          java.lang.String userName)

getExpandedRatesTable

private javax.swing.JTable getExpandedRatesTable()

showMsg

private void showMsg(java.lang.String msg)
Show message box

Parameters:
msg - string in Resource File

reloadManager

public void reloadManager()
Resets controls

Specified by:
reloadManager in class BaseManagerGUI