|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.BatteryStatusView
public class BatteryStatusView
This view displays the current battery charge information, as seen in the top right of the title bar. XXX: With the exception of inChooser, this class really lends itself XXX: to a singleton-type architecture...
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
BatteryStatusView()
Construct an instance of BatteryStatusView. |
|
| Method Summary | |
|---|---|
void |
invalidate()
Cause this View to be repainted at the earliest opportunity, provided it is VISIBLE and not entirely obscured. |
void |
paint(Pen pen)
Draw the contents of this View. |
boolean |
receiveEvent(Event event)
Entry point for event processing. |
void |
setHeight(int height)
BatteryStatusViews are fixed size. |
void |
setInChooser(boolean inChooser)
Specifies whether this view is being displayed in the title bar of the Jump screen. |
void |
setSize(int width,
int height)
BatteryStatusViews are fixed size. |
void |
setWidth(int width)
BatteryStatusViews are fixed size. |
protected static void |
update()
|
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BatteryStatusView()
| Method Detail |
|---|
public void setSize(int width,
int height)
setSize in class Viewpublic void setWidth(int width)
setWidth in class Viewpublic void setHeight(int height)
setHeight in class Viewpublic void paint(Pen pen)
ViewThe implementation of this method in this class will merely call
clear() pen, if this View is opaque (not transparent),
and will do nothing otherwise. If you don't need this behavior, then
there is no point in calling super.paint() in an
overriding method.
paint in class Viewpen - non-null; the pen to use for drawing operationspublic boolean receiveEvent(Event event)
ListenerDispatcher when it reads an Event in its queue
that is targetted at this instance. The default behavior is to
do nothing and return false. Subclasses are expected
to override this method to do something more useful.
receiveEvent in class Listenerevent - non-null; the event to process
true) or not (false) this
method actually handled the event to completionprotected static void update()
public void setInChooser(boolean inChooser)
public void invalidate()
View
invalidate in class View
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||