fi.helsinki.cs.gist
Class GSchedule

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--fi.helsinki.cs.gist.GSchedule

public class GSchedule
extends javax.swing.JComponent

GSchedule is a time management component for timespan of one week or a few days. It shows calendarEvents stored in calendarModel and allows user to add, delete and change these events.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
 
Constructor Summary
GSchedule()
          Creates GSchedule with all default models
GSchedule(GScheduleViewModel aScheduleViewModel)
          Creates GSchedule with given scheduleViewModel.
GSchedule(GScheduleViewModel aScheduleViewModel, GCalendarModel aCalendarModel, GCalendarEventSelectionModel aCalendarEventSelectionModel, GCalendarEventBoxFactory aBoxFactory, GDaySheetColumnModel aColumnModel, GScheduleHeaderRenderer aScheduleHeaderRenderer)
          Creates GSchedule with scheduleViewModel, given calendar model, calendarEvent selection model, eventBox factory daySheetColumnModel and schedule header renderer.
 
Method Summary
 GScheduleViewModel getScheduleViewModel()
          Returns current scheduleViewModel for this schedule
 java.util.Vector getVisibleDays()
          Returns days that are visible on this schedule.
 void init(GScheduleViewModel aScheduleViewModel, GCalendarModel aCalendarModel, GCalendarEventSelectionModel aCalendarEventSelectionModel, GCalendarEventBoxFactory aBoxFactory, GDaySheetColumnModel aColumnModel, GScheduleHeaderRenderer aScheduleHeaderRenderer)
           
 void setBounds(int x, int y, int width, int height)
          Sets new bounds for this schedule
 void setScheduleViewModel(GScheduleViewModel aScheduleViewModel)
          Sets a new scheduleViewModel for this schedule
 void setVisibleDays(java.util.Vector aVisibleDays)
          Sets the days that are visible on this schedule.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GSchedule

public GSchedule()
Creates GSchedule with all default models
See Also:
GDefaultCalendarModel, GDefaultCalendarEventBoxFactory, GDefaultDaySheetColumnModel, GDefaultCalendarEventSelectionModel, GDefaultScheduleHeaderRenderer

GSchedule

public GSchedule(GScheduleViewModel aScheduleViewModel)
Creates GSchedule with given scheduleViewModel.
Parameters:
aScheduleViewModel - custom scheduleViewModel
See Also:
GDefaultScheduleViewModel

GSchedule

public GSchedule(GScheduleViewModel aScheduleViewModel,
                 GCalendarModel aCalendarModel,
                 GCalendarEventSelectionModel aCalendarEventSelectionModel,
                 GCalendarEventBoxFactory aBoxFactory,
                 GDaySheetColumnModel aColumnModel,
                 GScheduleHeaderRenderer aScheduleHeaderRenderer)
Creates GSchedule with scheduleViewModel, given calendar model, calendarEvent selection model, eventBox factory daySheetColumnModel and schedule header renderer.
Parameters:
GScheduleViewModel - custom scheduleViewModel
GCalendarModel - custom calendar model
GCalendarEventSelectionModel - custom calendarEventSelectionModel
GCalendarEventBoxFactory - custon calendarEventBox factory
GDaySheetColumnModel - custom daySheetColumnModel
GScheduleHeaderRenderer - custom schedule header renderer
See Also:
GDefaultScheduleViewModel, GDefaultCalendarModel, GDefaultCalendarEventSelectionModel, GDefaultCalendarEventBoxFactory, GDefaultDaySheetColumnModel, GDefaultScheduleHeaderRenderer
Method Detail

init

public void init(GScheduleViewModel aScheduleViewModel,
                 GCalendarModel aCalendarModel,
                 GCalendarEventSelectionModel aCalendarEventSelectionModel,
                 GCalendarEventBoxFactory aBoxFactory,
                 GDaySheetColumnModel aColumnModel,
                 GScheduleHeaderRenderer aScheduleHeaderRenderer)

setVisibleDays

public void setVisibleDays(java.util.Vector aVisibleDays)
Sets the days that are visible on this schedule. For example from Monday to Friday or Saturday and Sunday or from Monday to Sunday.
Parameters:
aVisibleDays - vector of visible days

getVisibleDays

public java.util.Vector getVisibleDays()
Returns days that are visible on this schedule.

setScheduleViewModel

public void setScheduleViewModel(GScheduleViewModel aScheduleViewModel)
Sets a new scheduleViewModel for this schedule
Parameters:
GScheduleViewModel - new scheduleViewModel
See Also:
GScheduleViewModel

getScheduleViewModel

public GScheduleViewModel getScheduleViewModel()
Returns current scheduleViewModel for this schedule

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets new bounds for this schedule
Parameters:
x - x coordinate
y - y coordinate
width - width of this schedule
height - height of this schedule
Overrides:
setBounds in class java.awt.Component