|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Item
javax.microedition.lcdui.CustomItem
de.enough.polish.ui.FakeCustomItem
de.enough.polish.ui.FakeStringCustomItem
de.enough.polish.ui.ClockItem
public class ClockItem
Display the current time digitally.
Copyright Enough Software 2006 - 2009
history
02-Jul-2006 - rob creation
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.FakeStringCustomItem |
|---|
animateTextWrap, availableTextWidth, clipText, font, isHorizontalAnimationDirectionRight, isTextInitializationRequired, maxLines, maxLinesAppendix, maxLinesAppendixPosition, text, textColor, textEffect, textHorizontalAdjustment, textLayout, textLines, textVerticalAdjustment, textWidth, textWrapDirection, textWrapSpeed, useSingleLine, xOffset |
| Fields inherited from class javax.microedition.lcdui.CustomItem |
|---|
KEY_PRESS, KEY_RELEASE, KEY_REPEAT, NONE, POINTER_DRAG, POINTER_PRESS, POINTER_RELEASE, TRAVERSE_HORIZONTAL, TRAVERSE_VERTICAL |
| Constructor Summary | |
|---|---|
ClockItem(String label)
Creates a new clock. |
|
ClockItem(String label,
Style style)
Creates a new clock. |
|
| Method Summary | |
|---|---|
boolean |
animate()
Animates this item. |
protected String |
createCssSelector()
Retrieves the CSS selector for this item. |
protected void |
hideNotify()
Called by the system to notify the item that it is now completely invisible, when it previously had been at least partially visible. |
boolean |
includeSeconds()
Determines whether seconds should be appended to this clock view. |
protected void |
initContent(int firstLineWidth,
int availWidth,
int availHeight)
Initialises this item. |
void |
setStyle(Style style)
Sets the style of this item. |
protected void |
showNotify()
Called by the system to notify the item that it is now at least partially visible, when it previously had been completely invisible. |
String |
updateTime(String hours,
String minutes,
String seconds)
Fills in specific formats for time - this can be adjusted using the clock-format CSS attribute. |
| Methods inherited from class de.enough.polish.ui.FakeStringCustomItem |
|---|
addRepaintArea, animate, charWidth, defocus, drawString, getFont, getFontHeight, getLineHeight, getText, paintContent, releaseResources, setContentWidth, setFont, setStyle, setText, setText, setTextColor, setTextEffect, stringWidth, toString, wrap |
| Methods inherited from class javax.microedition.lcdui.CustomItem |
|---|
getGameAction, getInteractionModes, invalidate, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, sizeChanged, traverse, traverseOut |
| Methods inherited from class javax.microedition.lcdui.Item |
|---|
getPreferredHeight, getPreferredWidth, removeCommand, setPreferredSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClockItem(String label)
label - the label for the clock
public ClockItem(String label,
Style style)
label - the label for the clockstyle - the style for the clock string etc| Method Detail |
|---|
public boolean animate()
FakeCustomItem
animate in class FakeCustomItemFakeCustomItem.animate(long, ClippingRegion)public boolean includeSeconds()
protected String createCssSelector()
FakeCustomItem
createCssSelector in class FakeStringCustomItem
protected void initContent(int firstLineWidth,
int availWidth,
int availHeight)
FakeCustomItem
initContent in class FakeStringCustomItemfirstLineWidth - the maximum width of the first lineavailWidth - the available maximum width of this item in pixelsavailHeight - the available maximum height of this item in pixelsFakeCustomItem.contentWidth,
FakeCustomItem.contentHeight,
FakeCustomItem.preferredWidth,
FakeCustomItem.preferredHeight
public String updateTime(String hours,
String minutes,
String seconds)
hours - the hoursminutes - the minutes of the timeseconds - the seconds of the time
public void setStyle(Style style)
FakeCustomItem
setStyle in class FakeStringCustomItemstyle - the new style for this item.protected void hideNotify()
FakeCustomItempaint() calls will be made on this item
until after a showNotify() has been called again.
The default implementation of this method sets the isShown field to false and calls hideNotify on style elements.
hideNotify in class FakeStringCustomItemprotected void showNotify()
FakeCustomItempaint() calls after
showNotify() has been called.
The default implementation of this method sets the isShown field to true and calls showNotify on style elements.
showNotify in class FakeStringCustomItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||