|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.bibalex.daf.managers.admin.ReasonGUI
public class ReasonGUI
This class manages operations over Job Types like add, remove, update,...
Nested Class Summary | |
---|---|
private static class |
ReasonGUI.UIStates
UIStates is enum indicates to the state of the selected row (Add for new , Edit for update) |
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
javax.swing.JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
java.awt.Dialog.AccessibleAWTDialog |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 |
availableReasonsLabel
|
private javax.swing.JScrollPane |
availableReasonsScrollPane
availableReasonsScrollPane is the container Pane for available reasons table |
private SortableTable |
availableReasonsTable
availableJobTypesTable is the table that shows up the system JobTypes |
private javax.swing.JButton |
createNewReasonButton
createNewReasonButton is the button to craete new Reason |
private javax.swing.JButton |
deleteReasonButton
deleteReasonButton is the button to delete Reason |
private javax.swing.JLabel |
descriptionLabel
|
private javax.swing.JTextArea |
descriptionTextArea
descriptionTextArea is a text field shows the description of selectd JobType |
private javax.swing.JPanel |
detailsPanel
detailsPanel is the panel that carry the derived components for reason |
private javax.swing.JPanel |
jPanel
jPanel is Main panel which containes master and details panels |
private int |
lastSelectedReasonIndex
lastSelectedJobTypeIndex used to indicate to the last selected row of available JobTypes table |
private javax.swing.JPanel |
masterPanel
masterPanel is the panel that carry the basic components which are availableReasonsTable,deleteReasonButton and createNewReasonButton |
private int |
phaseID
phase ID that reasons belong to |
private javax.swing.JLabel |
reasonNameLabel
|
private javax.swing.JTextField |
reasonNameTextField
reasonNameTextField is a text field shows the name of selectd Reason |
private boolean |
recordModified
recordModified used to check if there are updates or modifications applied but not saved yet to the selected jobType |
protected ResourceManager |
resourceManager
|
private javax.swing.JButton |
saveButton
saveButton is the button to save the changes of Reason these changes could be updates or even new data |
private ReasonGUI.UIStates |
uiState
|
private java.awt.event.KeyAdapter |
updatesKeyAdapter
key listener handles the events of change the text of text fields. |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
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 | |
---|---|
ReasonGUI(int PhaseID)
This is the default constructor |
Method Summary | |
---|---|
private void |
adjustDetailsPanel()
Extract the data of the selected JobType and fill up the correspondence fileds |
private void |
clearDetailsPanel()
Reset GUI controls |
private boolean |
confirmDiscardChanges()
Confirm discard User changes message |
javax.swing.JScrollPane |
getAvailableReasonsScrollPane()
This method initializes availableJobTypesScrollPane |
javax.swing.JTable |
getAvailableReasonsTable()
This method initializes availableJobTypesTable |
private javax.swing.JButton |
getCreateNewReasonButton()
This method initializes createNewJobTypeButton |
private javax.swing.JButton |
getDeleteReasonButton()
This method initializes deleteJobTypeButton |
private javax.swing.JTextArea |
getDescriptionTextArea()
This method initializes descriptionTextArea |
private javax.swing.JPanel |
getDetailsPanel()
This method initializes detailsPanel |
private javax.swing.JPanel |
getJPanel()
This method initializes jPanel |
private javax.swing.JPanel |
getMasterPanel()
This method initializes masterPanel |
private javax.swing.JTextField |
getReasonNameTextField()
This method initializes reasonNameTextField |
private javax.swing.JButton |
getSaveButton()
This method initializes saveButton |
private void |
initialize()
This method initializes layout |
private void |
loadAvailableJobTypesTable()
Load availableJobTypesTable |
private void |
setCreateMode()
Clear the GUI and set mode to Add |
private void |
setEditMode()
Set GUI mode to Edit |
private void |
showMsg(java.lang.String msg)
Show message box |
private boolean |
validateValues()
Validate filed values |
Methods inherited from class javax.swing.JDialog |
---|
addImpl, createRootPane, 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, 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, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 |
---|
private javax.swing.JPanel jPanel
private javax.swing.JPanel masterPanel
private javax.swing.JPanel detailsPanel
private javax.swing.JScrollPane availableReasonsScrollPane
private SortableTable availableReasonsTable
private javax.swing.JButton deleteReasonButton
private javax.swing.JButton createNewReasonButton
private javax.swing.JButton saveButton
private javax.swing.JTextField reasonNameTextField
private javax.swing.JTextArea descriptionTextArea
private javax.swing.JLabel availableReasonsLabel
private javax.swing.JLabel reasonNameLabel
private javax.swing.JLabel descriptionLabel
protected ResourceManager resourceManager
private int lastSelectedReasonIndex
private boolean recordModified
private int phaseID
private ReasonGUI.UIStates uiState
private java.awt.event.KeyAdapter updatesKeyAdapter
Constructor Detail |
---|
public ReasonGUI(int PhaseID)
Method Detail |
---|
private void initialize()
private javax.swing.JPanel getJPanel()
private javax.swing.JPanel getMasterPanel()
private javax.swing.JPanel getDetailsPanel()
public javax.swing.JScrollPane getAvailableReasonsScrollPane()
private javax.swing.JButton getDeleteReasonButton()
private javax.swing.JButton getCreateNewReasonButton()
private javax.swing.JButton getSaveButton()
private javax.swing.JTextField getReasonNameTextField()
private javax.swing.JTextArea getDescriptionTextArea()
private boolean validateValues()
private void showMsg(java.lang.String msg)
msg
- string in Resource Fileprivate boolean confirmDiscardChanges()
private void setEditMode()
private void setCreateMode()
private void adjustDetailsPanel()
private void clearDetailsPanel()
public javax.swing.JTable getAvailableReasonsTable()
private void loadAvailableJobTypesTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |