scheduler.view.view_ui
Class CourseScheduleViewDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by scheduler.view.view_ui.CourseScheduleViewDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class CourseScheduleViewDialog
extends javax.swing.JFrame

See Also:
Serialized Form

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
protected  javax.swing.JRadioButton calendarRadio
          The radio button to select calendar mode.
protected  CheckBoxTable courseInfoTable
          The table of course info filters.
protected  javax.swing.JCheckBox courseName
          A checkbox in the info filters table.
protected  CheckBoxTable courseTable
          The table of course filters.
protected  javax.swing.JComboBox day
          The combo box to select the day if dayRadio is selected.
protected  javax.swing.JRadioButton dayRadio
          The radio button to select viewing by day.
protected  CheckBoxTable instructorInfoTable
          The table of instructor info filters.
protected  javax.swing.JRadioButton listRadio
          The radio button to select list mode.
protected  CheckBoxTable locationInfoTable
          The table of location info filters.
protected  double maxComponentHeight
          The max height of a text field or combobox; this is necessary since these components stretch when the outer frame is resized, and look very funky when they do
protected  int maxComponentWidth
          The max width of any component; this is only necessary because the max height cannot be set separately, so we must pick some max width.
protected  javax.swing.JPanel panel
          The background panel of this.
protected  javax.swing.JRadioButton weekRadio
          The radio button to select viewing by week.
 
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
CourseScheduleViewDialog(Schedule schedule)
          Construct this with the given schedule.
 
Method Summary
protected  void clear()
          Clear all the checkboxes.
 java.awt.Component compose()
          Compose this in 4 parts: (1) a top part consisting of the prompt; (2) a part consisting of view mode and view level options; (3) a middle part with info filters and course filters along with their associated 'Select all' and 'Clear' buttons; (4) the bottom row consisting of the 'OK' and 'Cancel' buttons.
protected  javax.swing.Box composeBottomButtons()
           
protected  javax.swing.Box composeCourseButtons()
           
protected  javax.swing.Box composeCourses()
           
protected  javax.swing.Box composeFilterButtons()
           
protected  javax.swing.Box composeFilters()
           
protected  javax.swing.Box composeFiltersCoursesRow()
           
protected  javax.swing.Box composeLevel()
           
protected  javax.swing.Box composeLevelDialog()
           
protected  javax.swing.Box composeLevelRadio()
           
protected  javax.swing.Box composeMode()
           
protected  javax.swing.Box composeModeLevelRow()
           
protected  javax.swing.Box composePrompt()
          Compose the prompt as an hbox with a label.
protected  void composeRows()
          Compose each of the rows and add to the vertically laid out panel.
 boolean getCourseNameFilter()
           
 ViewLevel getViewLevel()
           
 ViewMode getViewMode()
           
static void main(java.lang.String[] args)
           
 
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

maxComponentHeight

protected final double maxComponentHeight
The max height of a text field or combobox; this is necessary since these components stretch when the outer frame is resized, and look very funky when they do


maxComponentWidth

protected final int maxComponentWidth
The max width of any component; this is only necessary because the max height cannot be set separately, so we must pick some max width.


panel

protected javax.swing.JPanel panel
The background panel of this.


calendarRadio

protected javax.swing.JRadioButton calendarRadio
The radio button to select calendar mode.


listRadio

protected javax.swing.JRadioButton listRadio
The radio button to select list mode.


dayRadio

protected javax.swing.JRadioButton dayRadio
The radio button to select viewing by day.


weekRadio

protected javax.swing.JRadioButton weekRadio
The radio button to select viewing by week.


day

protected javax.swing.JComboBox day
The combo box to select the day if dayRadio is selected.


courseName

protected javax.swing.JCheckBox courseName
A checkbox in the info filters table.


courseTable

protected CheckBoxTable courseTable
The table of course filters.


courseInfoTable

protected CheckBoxTable courseInfoTable
The table of course info filters.


instructorInfoTable

protected CheckBoxTable instructorInfoTable
The table of instructor info filters.


locationInfoTable

protected CheckBoxTable locationInfoTable
The table of location info filters.

Constructor Detail

CourseScheduleViewDialog

public CourseScheduleViewDialog(Schedule schedule)
Construct this with the given schedule.

Method Detail

compose

public java.awt.Component compose()
Compose this in 4 parts: (1) a top part consisting of the prompt; (2) a part consisting of view mode and view level options; (3) a middle part with info filters and course filters along with their associated 'Select all' and 'Clear' buttons; (4) the bottom row consisting of the 'OK' and 'Cancel' buttons.


composeRows

protected void composeRows()
Compose each of the rows and add to the vertically laid out panel. Put some around spacing between each row, in the form of a vertical strut.


composePrompt

protected javax.swing.Box composePrompt()
Compose the prompt as an hbox with a label.


composeModeLevelRow

protected javax.swing.Box composeModeLevelRow()

composeMode

protected javax.swing.Box composeMode()

composeLevel

protected javax.swing.Box composeLevel()

composeLevelDialog

protected javax.swing.Box composeLevelDialog()

composeLevelRadio

protected javax.swing.Box composeLevelRadio()

composeFiltersCoursesRow

protected javax.swing.Box composeFiltersCoursesRow()

composeFilters

protected javax.swing.Box composeFilters()

composeCourses

protected javax.swing.Box composeCourses()

composeFilterButtons

protected javax.swing.Box composeFilterButtons()

composeCourseButtons

protected javax.swing.Box composeCourseButtons()

composeBottomButtons

protected javax.swing.Box composeBottomButtons()

clear

protected void clear()
Clear all the checkboxes.


getCourseNameFilter

public boolean getCourseNameFilter()

getViewLevel

public ViewLevel getViewLevel()

getViewMode

public ViewMode getViewMode()

main

public static void main(java.lang.String[] args)