|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.Component
com.sun.dtv.lwuit.Container
com.sun.dtv.lwuit.Calendar
public class Calendar
Date widget for selecting a date/time value.
To localize strings for month names use the values "Calendar.Month" in the resource localization e.g. "Calendar.Jan", "Calendar.Feb" etc...
Field Summary |
---|
Fields inherited from class com.sun.dtv.lwuit.Component |
---|
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Fields inherited from interface com.sun.dtv.ui.Animated |
---|
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
---|---|
Calendar()
Constructs a calendar with the current date and time. |
|
Calendar(long time)
Creates a new instance of Calendar set to the given date based on time since epoch (the java.util.Date convention). |
Method Summary | |
---|---|
void |
addActionListener(ActionListener l)
Fires when a change is made to the month view of this component. |
Date |
getDate()
Return the date object matching the current selection. |
Style |
getMonthViewStyle()
Sets the style of the month view component within the calendar. |
long |
getSelectedDay()
Returns the time for the current calendar. |
void |
paint(Graphics g)
This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering. |
void |
refreshTheme()
Makes sure the component is up to date with the current style object. |
void |
removeActionListener(ActionListener l)
Fires when a change is made to the month view of this component. |
void |
setMonthViewStyle(Style s)
Sets the style of the month view component within the calendar. |
void |
setStyle(Style s)
Changes the Component Style by replacing the Component Style with the given Style. |
Methods inherited from class com.sun.dtv.lwuit.Container |
---|
addComponent, addComponent, addComponent, contains, doLayout, getComponentAt, getComponentAt, getComponentCount, getComponentIndex, getLayout, getLayoutHeight, getLayoutWidth, getMatte, invalidate, isScrollableX, isScrollableY, layoutContainer, pointerPressed, removeAll, removeComponent, replace, revalidate, scrollComponentToVisible, setCellRenderer, setLayout, setMatte, setScrollable, setScrollableX, setScrollableY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Calendar(long time)
time
- time since epochpublic Calendar()
Method Detail |
---|
public long getSelectedDay()
public Date getDate()
public void paint(Graphics g)
Component
paint
in interface Animation
paint
in class Container
g
- the component graphicspublic void refreshTheme()
Component
refreshTheme
in class Container
public void setStyle(Style s)
Component
setStyle
in class Component
s
- the component Style objectComponent.getStyle()
public void setMonthViewStyle(Style s)
s
- a Style object specifying the month view style valuegetMonthViewStyle()
public Style getMonthViewStyle()
setMonthViewStyle(com.sun.dtv.lwuit.plaf.Style)
public void addActionListener(ActionListener l)
l
- an ActionListener objectremoveActionListener(com.sun.dtv.lwuit.events.ActionListener)
public void removeActionListener(ActionListener l)
l
- an ActionListener objectaddActionListener(com.sun.dtv.lwuit.events.ActionListener)
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |