|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.log.Log
public class Log
A class for handling the information and feedback
given by the framework. Gives the user/developer
a response system used to present information and
debug-options.
Embeds enumeration-funcionality and exposes methods for
handling the log.
ShowDate is default set to false
Constructor Summary | |
---|---|
Log()
|
Method Summary | |
---|---|
void |
addElement(LogElementType type,
java.lang.String text)
Adds a new entry to the log |
LogElement |
getElementAt(int index)
Gets a log-entry at the specified index. |
LogElement[] |
getElements()
Gets all the log-entries as an array of LogElement |
LogElement[] |
getElements(LogElementType type)
Gets all the log-entries as an array of LogElement based on the LogElementType |
javax.microedition.lcdui.List |
getElementsAsList()
Creates ajavax.microedition.lcdui.List based on the elements in the log. |
javax.microedition.lcdui.List |
getElementsAsList(LogElementType type)
Creates a javax.microedition.lcdui.List based on the the given elementtype and elements in the log. |
javax.microedition.lcdui.List |
getElementsAsList(java.lang.String title)
Creates a javax.microedition.lcdui.List based on the elements in the log. |
javax.microedition.lcdui.List |
getElementsAsList(java.lang.String title,
LogElementType type)
Creates a javax.microedition.lcdui.List based on the the given elementtype and elements in the log. |
LogElement |
getFirstElement()
Gets the first element added to the log. |
static Log |
getInstance()
Gets the current or creates a new instance of the log. |
LogElement |
getLastElement()
Gets the last element added to the log. |
LogElement |
getNextElement()
Gets the next LogElement from the log. |
LogElement |
getPreviousElement()
Gets the previous LogElement from the log. |
boolean |
isShowDate()
Gets true if date is to be shown, else false |
boolean |
isShowTime()
Gets true if time is to be shown, else false |
boolean |
isTurnedOn()
Gets if the log-functionality is turned on or not |
void |
setTurnedOn(boolean turnedOn)
Sets if the log should be active |
void |
showDate(boolean showDate)
Sets if the date should show in the log-entry |
void |
showTime(boolean showTime)
Sets if the time should show in the log-entry |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log()
Method Detail |
---|
public static Log getInstance()
false
public void showDate(boolean showDate)
showDate
- true if should show, else falsepublic void showTime(boolean showTime)
showTime
- true if the time should show, else falsepublic boolean isShowDate()
public boolean isShowTime()
public void addElement(LogElementType type, java.lang.String text)
type
- The type of entry, a LogElementType
text
- A description of the entrypublic LogElement getElementAt(int index)
index
- The index of the log-entry
public LogElement getFirstElement()
LogElement
in the logpublic LogElement getLastElement()
LogElement
in the logpublic LogElement getNextElement()
LogElement
from the log.
The pointer is then shifted on to the next
element. If there are no more elements, null
is returned.
null
public LogElement getPreviousElement()
LogElement
from the log.
The pointer is then shifted on to the
element before the element returned. If there are no more elements, null
is returned.
null
public LogElement[] getElements()
LogElement
public LogElement[] getElements(LogElementType type)
LogElement
based on the LogElementType
type
- the type of log-entry to get
public javax.microedition.lcdui.List getElementsAsList()
public javax.microedition.lcdui.List getElementsAsList(LogElementType type)
type
- The type of log-entries to show
public javax.microedition.lcdui.List getElementsAsList(java.lang.String title)
title
- the title of the List
public javax.microedition.lcdui.List getElementsAsList(java.lang.String title, LogElementType type)
title
- the title of the Listtype
- The type of log-entries to show
public boolean isTurnedOn()
public void setTurnedOn(boolean turnedOn)
turnedOn
- true to activate the log, else false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |