JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.calendar
Class DayTable

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JScrollPane
                          |
                          +--com.klg.jclass.util.calendar.DayTable
All Implemented Interfaces:
Accessible, CalendarComponent, EventListener, ImageObserver, MenuContainer, MouseListener, MouseMotionListener, ScrollPaneConstants, Serializable

public class DayTable
extends JScrollPane
implements CalendarComponent, MouseListener, MouseMotionListener

DayTable is the table of days used to form the day portion of a calendar.

See Also:
Serialized Form

Nested Class Summary
protected  class DayTable.DayModel
          Build data model wrapper around DateSymbols that builds a 7x6 table of month with the current date for picking.
protected  class DayTable.Renderer
          Use a table cell renderer to draw current day in reverse video
 
Nested classes inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  com.klg.jclass.util.JCListenerList actionListeners
          A list of action listeners
protected  int cellSize
           
protected  int componentSpacing
           
protected  int day
           
protected  DayTable.DayModel dayModel
          The model used for the table
protected  String[] days
           
protected  boolean editable
           
protected  int firstDayOfWeek
           
protected  Calendar intermediateDate
          Date used when click-dragging date.
protected  boolean isDragging
           
protected  Locale locale
           
protected static int MIN_CELL_SIZE
           
protected  int month
           
protected static int NUM_DAYS
           
protected static int NUM_ROWS
           
protected  Color otherBackground
           
protected  Color otherForeground
           
protected  com.klg.jclass.util.value.JCValueModel selectedDate
           
protected  Color selectionBackground
           
protected  Color selectionForeground
           
protected  Color specialBackground
           
protected  com.klg.jclass.util.calendar.JCCalendar specialDates
           
protected  Color specialForeground
           
protected  int startingCell
           
protected  JTable table
           
protected  int tableCellSize
           
protected  boolean userSetDays
           
protected  int year
           
 
Fields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
 
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 javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DayTable(com.klg.jclass.util.value.JCValueModel date, com.klg.jclass.util.calendar.JCCalendar special_dates, Locale locale)
          Creates a DayTable with specified a calendar, list of special dates, and locale.
DayTable(com.klg.jclass.util.value.JCValueModel date, com.klg.jclass.util.calendar.JCCalendar special_dates, Locale locale, String[] days)
          Creates a DayTable with a specified calendar model, list of special dates, locale, and set of day strings.
 
Method Summary
 void addActionListener(ActionListener l)
          Add listener to receive action event when data is changed by the user.
 void addNotify()
          Override addNotify to also set the size of the table.
protected  void adjustSize()
          Adjust the size of the table
protected  void calculateCalendar()
          Find out which cell to begin drawing - first day of week may not start on Sunday.
protected  void calculateCellSize()
          Calculates the cell size.
 int dayFromRowColumn(int row, int column)
          Returns the day given the row and column on the DayTable.
 void fireActionEvent()
          Fire the Action events.
protected  void fireActionEvent(boolean hidePopup)
           
protected  Calendar getCalendarFromDay(int dayValue)
          Return a copy of the current selected date with the day changed to the passed in value.
protected  Calendar getCalendarFromPoint(Point point)
          Calculate the day on the table which corresponds to the passed in point.
 com.klg.jclass.util.value.JCValueModel getCalendarModel()
          Get the value model the DayTable is using.
 int getCellSize()
          Returns the current cell size used.
protected  int getDayFromPoint(Point point)
          Calculate the day on the table which corresponds to the passed in point.
 Locale getLocale()
          Get the locale object being used by the DayTable.
 Dimension getPreferredSize()
          Gets the preferred size of the DayTable.
 com.klg.jclass.util.calendar.JCCalendar getSpecialDates()
          Get the special dates being used by the DayTable.
 com.klg.jclass.util.calendar.JCCalendar getSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
          Deprecated. As the parameter is unused, should use getSpecialDates()
protected  void inferLookAndFeel()
          Set Look and Feel specific values (note that these overrided user specified values).
protected  boolean isDayInCurrentMonth(int dayValue)
          Is passed in day, within the current month?
 boolean isEditable()
          Test whether the DayTable is editable.
 boolean isSelectedDate(int row, int column)
          Test to see if the day at a certain row and column is selected.
 boolean isSelectedMonth(int row, int column)
          Test to see if the day at a certain row and column is in the month that has been selected to be displayed.
protected  boolean isValidDate(Calendar c)
          Is the passed in calendar valid? If the parent is a JCDateChooser, check the date thru its bounds validator.
 void mouseClicked(MouseEvent e)
          React to a mouseClicked event.
 void mouseDragged(MouseEvent e)
          mouseDragged.
 void mouseEntered(MouseEvent e)
          mouseEntered.
 void mouseExited(MouseEvent e)
          mouseExited.
 void mouseMoved(MouseEvent e)
          mouseMoved.
 void mousePressed(MouseEvent ev)
          React to a mousePressed event.
 void mouseReleased(MouseEvent ev)
          React to a mouseReleased event.
 void removeActionListener(ActionListener l)
          Remove listener to receive action event when data is changed by the user.
 void setCalendarModel(com.klg.jclass.util.value.JCValueModel model)
          Set the value model the DayTable should use.
 void setCellSize(int cellSize)
          Sets the size of the cells in the table.
 void setEditable(boolean e)
          Set whether the DayTable will allow the selection of a day or not.
 void setFont(Font font)
          Override setFont to store the table font.
 void setLocale(Locale l)
          Set the locale the DayTable should use.
 void setOtherDateBackground(Color c)
          Set the background color of other information (not normal dates and special dates.
 void setOtherDateForeground(Color c)
          Set the foreground color of other information (not normal dates and special dates.
 void setSelectedDateBackground(Color c)
          Set the background color of the selected date.
 void setSelectedDateForeground(Color c)
          Set the foreground color of selected date.
 void setSpecialDateBackground(Color c)
          Set the background color of special dates.
 void setSpecialDateForeground(Color c)
          Set the foreground color of special dates.
 void setSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
          Set special dates to appear on the DayTable.
protected  void setUI(ComponentUI ui)
          Set the UI.
 void updateUI()
          Update the UI.
 
Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, 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

selectedDate

protected com.klg.jclass.util.value.JCValueModel selectedDate

specialDates

protected com.klg.jclass.util.calendar.JCCalendar specialDates

componentSpacing

protected int componentSpacing

otherBackground

protected Color otherBackground

otherForeground

protected Color otherForeground

specialBackground

protected Color specialBackground

specialForeground

protected Color specialForeground

selectionBackground

protected Color selectionBackground

selectionForeground

protected Color selectionForeground

tableCellSize

protected int tableCellSize

cellSize

protected int cellSize

locale

protected Locale locale

days

protected String[] days

userSetDays

protected boolean userSetDays

firstDayOfWeek

protected int firstDayOfWeek

year

protected int year

month

protected int month

day

protected int day

startingCell

protected int startingCell

isDragging

protected boolean isDragging

NUM_ROWS

protected static int NUM_ROWS

NUM_DAYS

protected static int NUM_DAYS

MIN_CELL_SIZE

protected static int MIN_CELL_SIZE

table

protected JTable table

editable

protected boolean editable

actionListeners

protected com.klg.jclass.util.JCListenerList actionListeners
A list of action listeners


intermediateDate

protected Calendar intermediateDate
Date used when click-dragging date.


dayModel

protected DayTable.DayModel dayModel
The model used for the table

Constructor Detail

DayTable

public DayTable(com.klg.jclass.util.value.JCValueModel date,
                com.klg.jclass.util.calendar.JCCalendar special_dates,
                Locale locale)
Creates a DayTable with specified a calendar, list of special dates, and locale. Note:The locale passed in is used to calculate locale specific values, like the default day of week names and the first day of week, not the locale of calendar model's calendar value

Parameters:
date - The calendar value model to use (which stores a date)
special_dates - The list of special dates for this calendar stored within a JCCalendar object
locale - The locale to be used
See Also:
Calendar, Locale

DayTable

public DayTable(com.klg.jclass.util.value.JCValueModel date,
                com.klg.jclass.util.calendar.JCCalendar special_dates,
                Locale locale,
                String[] days)
Creates a DayTable with a specified calendar model, list of special dates, locale, and set of day strings. Note:The locale passed in is used to calculate locale specific values, like the default day of week names and the first day of week, not the locale of calendar model's calendar value

Parameters:
date - The calendar value model to use (which stores a date)
special_dates - The list of special dates for this calendar stored within a JCCalendar object
locale - The locale to be used
days - A list of day of week names to use (null means use locale specific names)
See Also:
Calendar, Locale
Method Detail

setEditable

public void setEditable(boolean e)
Set whether the DayTable will allow the selection of a day or not.

Parameters:
e - true for editable false for non-editable.

isEditable

public boolean isEditable()
Test whether the DayTable is editable.

Returns:
Can the dates be changed interactively on this DayTable?

setSelectedDateBackground

public void setSelectedDateBackground(Color c)
Set the background color of the selected date.

Parameters:
c - The new selected date background color

setSelectedDateForeground

public void setSelectedDateForeground(Color c)
Set the foreground color of selected date.

Parameters:
c - The new selected date foreground color

setSpecialDateBackground

public void setSpecialDateBackground(Color c)
Set the background color of special dates.

Parameters:
c - The new special date background color

setSpecialDateForeground

public void setSpecialDateForeground(Color c)
Set the foreground color of special dates.

Parameters:
c - The new special date foreground color

setOtherDateBackground

public void setOtherDateBackground(Color c)
Set the background color of other information (not normal dates and special dates.

Parameters:
c - The new other date background color

setOtherDateForeground

public void setOtherDateForeground(Color c)
Set the foreground color of other information (not normal dates and special dates.

Parameters:
c - The new other date foreground color

setLocale

public void setLocale(Locale l)
Set the locale the DayTable should use.

Specified by:
setLocale in interface CalendarComponent
Overrides:
setLocale in class Component
Parameters:
l - The locale object to use.

getLocale

public Locale getLocale()
Get the locale object being used by the DayTable.

Overrides:
getLocale in class Component
Returns:
The current locale object

setFont

public void setFont(Font font)
Override setFont to store the table font.

Overrides:
setFont in class JComponent
Parameters:
font - The new font

setCalendarModel

public void setCalendarModel(com.klg.jclass.util.value.JCValueModel model)
Set the value model the DayTable should use. The model must a calendar value model. Note:The DayTable's current locale is used to calculate locale specific values, like the default day of week names and the first day of week, not the locale of calendar model's calendar value

Specified by:
setCalendarModel in interface CalendarComponent
Parameters:
model - The calendar value model to use.

getCalendarModel

public com.klg.jclass.util.value.JCValueModel getCalendarModel()
Get the value model the DayTable is using.

Returns:
The current calendar value model

setSpecialDates

public void setSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
Set special dates to appear on the DayTable.

Specified by:
setSpecialDates in interface CalendarComponent
Parameters:
sd - The new list of special dates stored within a JCCalendar object

getSpecialDates

public com.klg.jclass.util.calendar.JCCalendar getSpecialDates(com.klg.jclass.util.calendar.JCCalendar sd)
Deprecated. As the parameter is unused, should use getSpecialDates()

Get the special dates being used by the DayTable.

Parameters:
sd - Unused
Returns:
The current list of special dates stored within a JCCalendar object

getSpecialDates

public com.klg.jclass.util.calendar.JCCalendar getSpecialDates()
Get the special dates being used by the DayTable.

Returns:
The current list of special dates stored within a JCCalendar object

addActionListener

public void addActionListener(ActionListener l)
Add listener to receive action event when data is changed by the user.

Specified by:
addActionListener in interface CalendarComponent
Parameters:
l - The action listener to be added

removeActionListener

public void removeActionListener(ActionListener l)
Remove listener to receive action event when data is changed by the user.

Specified by:
removeActionListener in interface CalendarComponent
Parameters:
l - The action listener to be removed

adjustSize

protected void adjustSize()
Adjust the size of the table


addNotify

public void addNotify()
Override addNotify to also set the size of the table.

Overrides:
addNotify in class JComponent
See Also:
JComponent.addNotify()

setCellSize

public void setCellSize(int cellSize)
Sets the size of the cells in the table. If this value is greater than zero, this value is used for all cells (regardless of whether the text fits).

Parameters:
cellSize - The new cellSize (in pixels)

getCellSize

public int getCellSize()
Returns the current cell size used. If the user has specificied a cell size that is greater than zero, this value is returned. Otherwise, return the computed cell size based on the size of the text.

Returns:
The current table cell size used.

calculateCalendar

protected void calculateCalendar()
Find out which cell to begin drawing - first day of week may not start on Sunday.


calculateCellSize

protected void calculateCellSize()
Calculates the cell size.

Calendar cells are square so the cell size is the maximum of 1) the max width of the days of the week, 2) the width of a double digit, and 3) the height of a digit.


fireActionEvent

public void fireActionEvent()
Fire the Action events.


fireActionEvent

protected void fireActionEvent(boolean hidePopup)

dayFromRowColumn

public int dayFromRowColumn(int row,
                            int column)
Returns the day given the row and column on the DayTable.

Parameters:
row - The row index
column - The column index
Returns:
The day based on the row and column

getDayFromPoint

protected int getDayFromPoint(Point point)
Calculate the day on the table which corresponds to the passed in point.

Parameters:
point - A point on the table.
Returns:
An integer representing the day selected. Note that a negative value means that the point selected is in the previous month. A value greater than the number of days in the month means the point selected is in the next month.

getCalendarFromDay

protected Calendar getCalendarFromDay(int dayValue)
Return a copy of the current selected date with the day changed to the passed in value.

Parameters:
dayValue - The day to use.
Returns:
A Calendar object which is a copy of the selected date which the date changed to the passed in value.

getCalendarFromPoint

protected Calendar getCalendarFromPoint(Point point)
Calculate the day on the table which corresponds to the passed in point.

Parameters:
point - A point on the table
Returns:
A Calendar object with the date corresponding to the passed in point.

isDayInCurrentMonth

protected boolean isDayInCurrentMonth(int dayValue)
Is passed in day, within the current month?

Parameters:
dayValue - The day value to check.
Returns:
true, if the day is within the current month.

isValidDate

protected boolean isValidDate(Calendar c)
Is the passed in calendar valid? If the parent is a JCDateChooser, check the date thru its bounds validator. If there is no parent, the all dates are valid.

Parameters:
c - The date (in a Calendar object) to check
Returns:
true, if the date is valid.

mousePressed

public void mousePressed(MouseEvent ev)
React to a mousePressed event.

Specified by:
mousePressed in interface MouseListener
Parameters:
ev - The mouse event generated

mouseClicked

public void mouseClicked(MouseEvent e)
React to a mouseClicked event.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - The mouse event generated

mouseReleased

public void mouseReleased(MouseEvent ev)
React to a mouseReleased event.

Specified by:
mouseReleased in interface MouseListener
Parameters:
ev - The mouse event generated

mouseEntered

public void mouseEntered(MouseEvent e)
mouseEntered.

Specified by:
mouseEntered in interface MouseListener
Parameters:
e - The mouse event generated

mouseExited

public void mouseExited(MouseEvent e)
mouseExited.

Specified by:
mouseExited in interface MouseListener
Parameters:
e - The mouse event generated

mouseDragged

public void mouseDragged(MouseEvent e)
mouseDragged.

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - The mouse event generated

mouseMoved

public void mouseMoved(MouseEvent e)
mouseMoved.

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - The mouse event generated

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of the DayTable.

Overrides:
getPreferredSize in class JComponent
Returns:
The calculated preferred size of this component

isSelectedDate

public boolean isSelectedDate(int row,
                              int column)
Test to see if the day at a certain row and column is selected.

Parameters:
row - The row index
column - The column index
Returns:
Whether the day is selected or not

isSelectedMonth

public boolean isSelectedMonth(int row,
                               int column)
Test to see if the day at a certain row and column is in the month that has been selected to be displayed.

Parameters:
row - The row index
column - The column index
Returns:
Whether the day is in the currently displayed month

setUI

protected void setUI(ComponentUI ui)
Set the UI.

Overrides:
setUI in class JComponent
Parameters:
ui - The new ui

updateUI

public void updateUI()
Update the UI.

Overrides:
updateUI in class JScrollPane

inferLookAndFeel

protected void inferLookAndFeel()
Set Look and Feel specific values (note that these overrided user specified values).


Copyright © 2004 Quest Software Inc..
All rights reserved.