waba.ui
Class Calendar

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--waba.ui.Window
                    |
                    +--waba.ui.Calendar

public class Calendar
extends Window

The Calendar class is a mimic of the palms Calendar. It looks and functions the basically the same. It uses the Date class for all operations.
Guich made some modifications to it act like an Window. Instead of create a new instance (which consumes memory), you may use the Edit's static field calendar Added by Allan C. Solomon


Fields inherited from class waba.ui.Window
_controlEvent, _g, _keyEvent, _penEvent, beepIfOut, flicker, gbuf, HIDE_STATE, imgBuf, needsPaint, NO_BORDER, RECT_BORDER, ROUND_BORDER, style, TAB_BORDER, TAB_ONLY_BORDER, title, titleFont
 
Fields inherited from class waba.ui.Container
children, tail
 
Fields inherited from class waba.ui.Control
BOTTOM, CENTER, controlCount, enabled, FILL, fm, font, height, LEFT, name, next, parent, PREFERRED, prev, RIGHT, TOP, width, x, y
 
Constructor Summary
Calendar()
          Constructs Calendar set to the current day.
 
Method Summary
 Date getSelectedDate()
          Returns selected Date.
 void onEvent(Event event)
          Called to process key, pen, control and other posted events.
 void onPaint(Graphics g)
          Called to draw the control.
protected  void onPopup()
          called imediatly before the popup began. the default implementation does nothing.
 void setSelectedDate(Date d)
          sets the current day to the Date specified. if its null, sets the date to today.
 
Methods inherited from class waba.ui.Window
_doPaint, _doPaint, _postEvent, damageRect, getClientRect, getFocus, getTopMost, isTopMost, isVisible, onClickedOutside, onUnpop, paintTitle, popupModal, postPopup, postUnpop, setBorderStyle, setDoubleBuffer, setFocus, setStatePosition, setTitle, setTitleFont, setVisible, toString, unpop
 
Methods inherited from class waba.ui.Container
add, findChild, paintChildren, remove
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getAbsoluteRect, getFontMetrics, getNext, getParent, getPreferredHeight, getPreferredWidth, getRect, isEnabled, onBoundsChanged, onWindowPaintFinished, postEvent, removeTimer, repaint, repaintNow, setEnabled, setFont, setRect, setRect
 
Methods inherited from class java.lang.Object
hashCode
 

Constructor Detail

Calendar

public Calendar()
Constructs Calendar set to the current day.
Method Detail

getSelectedDate

public Date getSelectedDate()
Returns selected Date.

setSelectedDate

public void setSelectedDate(Date d)
sets the current day to the Date specified. if its null, sets the date to today.

onEvent

public void onEvent(Event event)
Description copied from class: Control
Called to process key, pen, control and other posted events.
Overrides:
onEvent in class Control
Tags copied from class: Control
Parameters:
event - the event to process
See Also:
Event, KeyEvent, PenEvent

onPaint

public void onPaint(Graphics g)
Description copied from class: Control
Called to draw the control. When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted. The background is painted by the top-level window control.
Overrides:
onPaint in class Control
Tags copied from class: Control
Parameters:
g - the graphics object for drawing
See Also:
Graphics

onPopup

protected void onPopup()
Description copied from class: Window
called imediatly before the popup began. the default implementation does nothing.
Overrides:
onPopup in class Window