Class symantec.itools.awt.util.Calendar
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.util.Calendar
Object
|
+----Component
|
+----Container
|
+----Panel
|
+----symantec.itools.awt.util.Calendar
- public class Calendar
- extends Panel
Calendar component. Creates a graphic calendar displaying a month of dates.
A combo box controls the month displayed, a numeric spin control changes the
year displayed.
- Version:
- 1.1, July 18, 1997
- Author:
- Symantec
-
bNeedsPlatformHelp
- True if the ComboBox needs help changing state.
-
cal
- Not used.
-
centerNumber
- Internal drawing calibration value.
-
combo
- The ComboBox that displays/controls the month.
-
dCurrent
- The date that the calendar is set to.
-
dLast
- The current date when the Calendar was last painted.
-
dateSelectedx
- The column index of the currently selected day.
-
dateSelectedy
- The row index of the currently selected day.
-
edgePad
- The number of pixels to offset the internal components from the edges.
-
firstDay
- The day of the week the month starts on.
-
heightAdjust
- Internal drawing calibration value.
-
lastSelectedDate
- The day selected when the Caledar was last painted.
-
maxMonthx
- The column index of the last day in the month.
-
maxMonthy
- The row index of the last day in the month.
-
numberAdjust
- Internal drawing calibration value.
-
sc
- The spinner that displays/controls the year.
-
selectHeight
- Internal drawing calibration value.
-
selectedColor
- The color used to highlight the selected date on the calendar.
-
topRow
- Internal drawing calibration value.
-
symantec.itools.awt.util.Calendar()
- Creates a default calendar with today's
date initialized.
-
symantec.itools.awt.util.Calendar(Date)
- Creates a calendar with the specified date initialized.
-
addActionListener(ActionListener)
- Adds the specified action listener to receive action events
from this button.
-
addNotify()
- Tells this component that it has been added to a container.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all property change events.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener for all vetoable property change events.
-
getActionCommand()
-
-
getDate()
- Returns the date that the calendar is set to.
-
getSelectedColor()
- Returns the color that highlights the selected date on the calendar.
-
minimumSize()
- Returns the minimum dimensions to properly display this component.
-
paint(Graphics)
- Paints this component using the given graphics context.
-
preferredSize()
- Returns the recommended dimensions to properly display this component.
-
removeActionListener(ActionListener)
- Removes the specified action listener so it no longer receives
action events from this button.
-
removeNotify()
- Tells this component that it is being removed from a container.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all property change events.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a listener for all vetoable property change events.
-
setActionCommand(String)
- Sets the command name of the action event fired by this button.
-
setDate(String)
- Sets the date selected on the calendar.
-
setLayout(LayoutManager)
- Takes no action.
-
setSelectedColor(Color)
- Sets the color used to highlight the selected date on the calendar.
-
sourceActionEvent()
- Fire an action event to the listeners
-
update(Graphics)
- Handles redrawing of this component on the screen.
bNeedsPlatformHelp
protected boolean bNeedsPlatformHelp
- True if the ComboBox needs help changing state.
- See Also:
- combo, needsPlatformHelp
cal
protected java.lang.String[][] cal
- Not used.
centerNumber
protected int centerNumber
- Internal drawing calibration value.
combo
protected symantec.itools.awt.ComboBox combo
- The ComboBox that displays/controls the month.
dCurrent
protected java.util.Date dCurrent
- The date that the calendar is set to.
- See Also:
- setDate, getDate
dLast
protected java.util.Date dLast
- The current date when the Calendar was last painted.
dateSelectedx
protected int dateSelectedx
- The column index of the currently selected day.
dateSelectedy
protected int dateSelectedy
- The row index of the currently selected day.
edgePad
protected int edgePad
- The number of pixels to offset the internal components from the edges.
firstDay
protected int firstDay
- The day of the week the month starts on.
heightAdjust
protected int heightAdjust
- Internal drawing calibration value.
lastSelectedDate
protected int lastSelectedDate
- The day selected when the Caledar was last painted.
maxMonthx
protected int maxMonthx
- The column index of the last day in the month.
maxMonthy
protected int maxMonthy
- The row index of the last day in the month.
numberAdjust
protected int numberAdjust
- Internal drawing calibration value.
sc
protected symantec.itools.awt.util.spinner.NumericSpinner sc
- The spinner that displays/controls the year.
selectHeight
protected int selectHeight
- Internal drawing calibration value. The height of a selected area in the Calendar, in pixels.
selectedColor
protected java.awt.Color selectedColor
- The color used to highlight the selected date on the calendar.
- See Also:
- setSelectedColor, getSelectedColor
topRow
protected int topRow
- Internal drawing calibration value. The height of the topmost row of the Calendar, in pixels.
Calendar
public Calendar()
- Creates a default calendar with today's
date initialized.
Calendar
public Calendar(Date defaultdate)
- Creates a calendar with the specified date initialized.
- Parameters:
- defaultdate - the date to be shown initially
addActionListener
public synchronized void addActionListener(ActionListener l)
- Adds the specified action listener to receive action events
from this button.
- Parameters:
- l - the action listener
addNotify
public synchronized void addNotify()
- Tells this component that it has been added to a container.
This is a standard Java AWT method which gets called by the AWT when
this component is added to a container. Typically, it is used to
create this component's peer.
It has been overridden here to hook-up event listeners.
- Overrides:
- addNotify in class Panel
- See Also:
- removeNotify
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all property change events.
- Parameters:
- listener - the listener to add
- See Also:
- removePropertyChangeListener
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a listener for all vetoable property change events.
- Parameters:
- listener - the listener to add
- See Also:
- removeVetoableChangeListener
getActionCommand
public java.lang.String getActionCommand()
-
- Returns:
- the command name of the action event fired by this button.
getDate
public java.lang.String getDate()
- Returns the date that the calendar is set to.
- Returns:
- the current value of the calendar.
getSelectedColor
public java.awt.Color getSelectedColor()
- Returns the color that highlights the selected date on the calendar.
- Returns:
- the current selected color.
minimumSize
public java.awt.Dimension minimumSize()
- Returns the minimum dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the minimum size of this component.
- Returns:
- the minimum dimensions needed for the calender (250 x 200 pixels).
- Overrides:
- minimumSize in class Container
- See Also:
- preferredSize
paint
public void paint(Graphics g)
- Paints this component using the given graphics context.
This is a standard Java AWT method which typically gets called
by the AWT to handle painting this component. It paints this component
using the given graphics context. The graphics context clipping region
is set to the bounding rectangle of this component and its <0,0>
coordinate is this component's top-left corner.
- Parameters:
- g - the graphics context used for painting
- Overrides:
- paint in class Container
- See Also:
- repaint, update
preferredSize
public java.awt.Dimension preferredSize()
- Returns the recommended dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the recommended size of this component.
- Returns:
- the preferred dimensions for the calender (250 x 200 pixels).
- Overrides:
- preferredSize in class Container
- See Also:
- minimumSize
removeActionListener
public synchronized void removeActionListener(ActionListener l)
- Removes the specified action listener so it no longer receives
action events from this button.
- Parameters:
- l - the action listener
removeNotify
public synchronized void removeNotify()
- Tells this component that it is being removed from a container.
This is a standard Java AWT method which gets called by the AWT when
this component is removed from a container. Typically, it is used to
destroy the peers of this component and all its subcomponents.
It has been overridden here to unhook event listeners.
- Overrides:
- removeNotify in class Container
- See Also:
- addNotify
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all property change events.
- Parameters:
- listener - the listener to remove
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a listener for all vetoable property change events.
- Parameters:
- listener - the listener to remove
- See Also:
- addVetoableChangeListener
setActionCommand
public void setActionCommand(String command) throws PropertyVetoException
- Sets the command name of the action event fired by this button.
- Parameters:
- command - The name of the action event command fired by this button
- Throws: PropertyVetoException
- if the specified property value is unacceptable
setDate
public void setDate(String date) throws PropertyVetoException
- Sets the date selected on the calendar.
- Parameters:
- date - the date that the calendar is to be set to
- Throws: PropertyVetoException
- if the specified property value is unacceptable
setLayout
public void setLayout(LayoutManager lm)
- Takes no action.
This is a standard Java AWT method which gets called to specify
which layout manager should be used to layout the components in
standard containers.
Since layout managers CANNOT BE USED with this container the standard
setLayout has been OVERRIDDEN for this container and does nothing.
- Parameters:
- lm - the layout manager to use to layout this container's components
(IGNORED)
- Overrides:
- setLayout in class Container
- See Also:
- getLayout
setSelectedColor
public void setSelectedColor(Color c) throws PropertyVetoException
- Sets the color used to highlight the selected date on the calendar.
- Parameters:
- c - the color that the selected color is to be set to
- Throws: PropertyVetoException
- if the specified property value is unacceptable
sourceActionEvent
public void sourceActionEvent()
- Fire an action event to the listeners
update
public void update(Graphics g)
- Handles redrawing of this component on the screen.
This is a standard Java AWT method which gets called by the Java
AWT (repaint()) to handle repainting this component on the screen.
The graphics context clipping region is set to the bounding rectangle
of this component and its <0,0> coordinate is this component's
top-left corner.
Typically this method paints the background color to clear the
component's drawing space, sets graphics context to be the foreground
color, and then calls paint() to draw the component.
It is overridden here to reduce flicker by eliminating the uneeded
clearing of the background.
- Parameters:
- g - the graphics context
- Overrides:
- update in class Container
- See Also:
- repaint, paint
All Packages Class Hierarchy This Package Previous Next Index