|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Methods needed to customize look and feel of a TimeItem
Method Summary | |
int |
getDefaultFocus()
Get the default focus area, one of Calendar.HOUR, Calendar.HOUR_OF_DAY, Calendar.MINUTE or Calendar.AM_PM |
java.util.Date |
getEditedDate(javax.microedition.lcdui.Displayable editScreen)
Get the time value from the edit screen |
javax.microedition.lcdui.Displayable |
getEditScreen(java.util.Calendar c)
Get the screen to be used for editing the time. |
int |
getFocus(int currentFocus,
int dir)
Get the new focused area, if the RIGHT or LEFT keys were pressed |
int |
getFocus(int currentFocus,
int x,
int y)
Get the new focused area, when the pointer was released |
int |
getMinimumHeight()
Get the minimum height of this component |
int |
getMinimumWidth()
Get the minimum width of this component |
int |
getPreferredHeight(int width)
Get the preferred height of this component |
int |
getPreferredWidth(int height)
Get the preferred width of this component |
void |
paint(javax.microedition.lcdui.Graphics g,
java.util.Calendar c,
int width,
int height,
int focus)
Method to be used for drawing a TimeItem. |
Method Detail |
public int getDefaultFocus()
public java.util.Date getEditedDate(javax.microedition.lcdui.Displayable editScreen)
editScreen
- the edit screen to retrieve time informationpublic javax.microedition.lcdui.Displayable getEditScreen(java.util.Calendar c)
c
- Calendar containing date information for this TimeItempublic int getFocus(int currentFocus, int dir)
currentFocus
- the area which currently has focus,
one of Calendar.HOUR, Calendar.HOUR_OF_DAY,
Calendar.MINUTE or Calendar.AM_PMdir
- direction to move the focus, one of Canvas.RIGHT
or Canvas.LEFTpublic int getFocus(int currentFocus, int x, int y)
currentFocus
- the area which currently has focus,
one of Calendar.HOUR, Calendar.HOUR_OF_DAY,
Calendar.MINUTE or Calendar.AM_PMx
- x location where pointer was releasedy
- y location where pointer was releasedpublic int getMinimumHeight()
public int getMinimumWidth()
public int getPreferredHeight(int width)
width
- the tentative content width in pixels,
or -1 if a tentative width has not been computedpublic int getPreferredWidth(int height)
height
- the tentative content height in pixels,
or -1 if a tentative height has not been computedpublic void paint(javax.microedition.lcdui.Graphics g, java.util.Calendar c, int width, int height, int focus)
g
- Graphics object to use for drawingc
- Calendar containing date information for this TimeItemwidth
- the assigned width of this check boxheight
- the assigned height of this check boxfocus
- Integer indicating which portion of the date item has
cursor focus. One of Calendar.HOUR, Calendar.MINUTE,
or Calendar.AM_PM, or 0 to indicate none have focus
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |