|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
scheduler.view.view_ui.ViewSettingsUI
public class ViewSettingsUI
Class ViewSettingsUI provides a view of ViewSettings as an input to the viewSchedule method. Hence, the dialog is a view of both an ViewSettings object as well as the viewSchedule method. The data-entry components of the dialog constitute the ViewSettings view. The 'OK' button is the view of the viewSchedule method.
The data components consist of JLabels, JTables, JRadioButtons JCheckBoxes, and a JComboBox. The 'OK', 'Clear', and 'Cancel' buttons are JButtons. The description of the compose method has details of how the components are laid out in the dialog window.
For organizational clarity, some of the rows in the ViewSettingsUI are defined in separate classes.
The companion model for ViewSettingsUI is the View class, since View has the method that is invoked from the 'OK' button action listener.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private javax.swing.JRadioButton |
calendar
|
private javax.swing.JButton |
cancelButton
|
private javax.swing.JButton |
clearCourse
|
private javax.swing.JButton |
clearFilter
|
protected java.util.LinkedList<Course> |
courseList
The courses to be displayed in the left panel for a course view. |
private javax.swing.JScrollPane |
coursePanel
|
private javax.swing.JRadioButton |
daily
|
protected java.util.ArrayList<javax.swing.JCheckBox> |
dataCheckBoxList
List of checkboxes for each course, instructor, or location. |
private javax.swing.JComboBox |
dayComboBox
|
protected javax.swing.JCheckBox[] |
filterCheckBoxList
Array of checkboxes for each filter option. |
private javax.swing.JScrollPane |
filterPanel
|
protected java.util.LinkedList<Instructor> |
instructorList
The instructors to be displayed in the left panel for an instructor view. |
private javax.swing.JLabel |
jLabel1
|
private javax.swing.JPanel |
jPanel1
|
private javax.swing.JPanel |
jPanel2
|
private javax.swing.JPanel |
jPanel3
|
private javax.swing.JPanel |
jPanel4
|
private javax.swing.JRadioButton |
list
|
protected java.util.LinkedList<Location> |
locationList
The locations to be displayed in the left panel for a location view. |
private javax.swing.JButton |
okButton
|
private javax.swing.GroupLayout.ParallelGroup |
parallelGroup
|
private javax.swing.JButton |
selectAllCourse
|
private javax.swing.JButton |
selectAllFilter
|
private javax.swing.GroupLayout.SequentialGroup |
sequentialGroup
|
protected java.lang.String |
title
Title of this window. |
protected View |
view
View module |
private javax.swing.ButtonGroup |
viewLevel
|
private javax.swing.ButtonGroup |
viewMode
|
protected ViewType |
viewType
The type of view created by this UI dialog. |
protected java.util.ArrayList<java.lang.String> |
viewTypeFilter
List of label names for filtering ocurses, instructors, or locations. |
protected java.lang.String |
viewTypeFilterPrompt
Prompt for filters based on the ViewType. |
private javax.swing.JRadioButton |
weekly
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
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, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ViewSettingsUI(ViewType viewType,
View view)
Construct this by calling compose |
Method Summary | |
---|---|
private void |
cancelButtonActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
clearCourseActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
clearFilterActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
compose()
This method is called from within the constructor to initialize the form. |
java.util.ArrayList<java.lang.String> |
createFilterNames()
Makes a list of string representations of courses, instructors, or location, depending on view type. |
private void |
dailyActionPerformed(java.awt.event.ActionEvent evt)
|
protected void |
defaultFilterOptions()
The default filters options for a course, instructor, or location view. |
java.util.ArrayList<javax.swing.JCheckBox> |
getDataCheckBoxlist()
Returns the array of course, instructor, or location checkboxes. |
javax.swing.JCheckBox[] |
getFilterCheckBoxlist()
Returns the array of filter option checkboxes. |
static ViewSettingsUI |
getNewCourseViewSettingsUI(View view)
Returns an instance of this class using the settings for a course view. |
static ViewSettingsUI |
getNewInstructorViewSettingsUI(View view)
Returns an instance of this class using the settings for an instructor view. |
static ViewSettingsUI |
getNewLocationViewSettingsUI(View view)
Returns an instance of this class using the settings for a location view. |
ViewLevel |
getViewLevel()
Returns the view level selected in the dialog. |
ViewMode |
getViewMode()
Returns the view mode selected in the dialog. |
ViewType |
getViewType()
Returns the view type selected in the dialog. |
static void |
main(java.lang.String[] args)
stub main for testing. |
private void |
okButtonActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
selectAllCourseActionPerformed(java.awt.event.ActionEvent evt)
|
private void |
selectAllFilterActionPerformed(java.awt.event.ActionEvent evt)
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private javax.swing.JRadioButton calendar
private javax.swing.JButton cancelButton
private javax.swing.JButton clearCourse
private javax.swing.JButton clearFilter
private javax.swing.JScrollPane coursePanel
private javax.swing.JRadioButton daily
private javax.swing.JScrollPane filterPanel
private javax.swing.GroupLayout.ParallelGroup parallelGroup
private javax.swing.GroupLayout.SequentialGroup sequentialGroup
private javax.swing.JComboBox dayComboBox
private javax.swing.JLabel jLabel1
private javax.swing.JPanel jPanel1
private javax.swing.JPanel jPanel2
private javax.swing.JPanel jPanel3
private javax.swing.JPanel jPanel4
private javax.swing.JRadioButton list
private javax.swing.JButton okButton
private javax.swing.JButton selectAllCourse
private javax.swing.JButton selectAllFilter
private javax.swing.ButtonGroup viewLevel
private javax.swing.ButtonGroup viewMode
private javax.swing.JRadioButton weekly
protected java.lang.String title
protected java.lang.String viewTypeFilterPrompt
protected java.util.ArrayList<java.lang.String> viewTypeFilter
protected java.util.ArrayList<javax.swing.JCheckBox> dataCheckBoxList
protected javax.swing.JCheckBox[] filterCheckBoxList
protected ViewType viewType
protected java.util.LinkedList<Course> courseList
protected java.util.LinkedList<Instructor> instructorList
protected java.util.LinkedList<Location> locationList
protected View view
Constructor Detail |
---|
public ViewSettingsUI(ViewType viewType, View view)
viewType
- the viewtype specified in the menubarview
- the view to apply settings onMethod Detail |
---|
private void compose()
private void dailyActionPerformed(java.awt.event.ActionEvent evt)
private void okButtonActionPerformed(java.awt.event.ActionEvent evt)
private void selectAllCourseActionPerformed(java.awt.event.ActionEvent evt)
private void clearCourseActionPerformed(java.awt.event.ActionEvent evt)
private void selectAllFilterActionPerformed(java.awt.event.ActionEvent evt)
private void clearFilterActionPerformed(java.awt.event.ActionEvent evt)
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt)
protected void defaultFilterOptions()
public ViewMode getViewMode()
public ViewType getViewType()
public ViewLevel getViewLevel()
public java.util.ArrayList<java.lang.String> createFilterNames()
public javax.swing.JCheckBox[] getFilterCheckBoxlist()
public java.util.ArrayList<javax.swing.JCheckBox> getDataCheckBoxlist()
public static ViewSettingsUI getNewLocationViewSettingsUI(View view)
view
- the view to apply settings on
public static ViewSettingsUI getNewInstructorViewSettingsUI(View view)
view
- the view to apply settings on
public static ViewSettingsUI getNewCourseViewSettingsUI(View view)
view
- the view to apply settings on
public static void main(java.lang.String[] args)
args
- for main
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |