managers
Class GeneralManager

java.lang.Object
  extended by managers.GeneralManager

public class GeneralManager
extends Object

Delivers general MIDlet functionality.


Method Summary
 Screen getCurrent()
          Returns the MIDlet's current Screen object.
 Integer getHeight()
          Gets height of the displayable area in pixels.
 String getPlatformName()
          Returns System.getProperty("microedition.platform").
 Integer getRandomNumber()
          Generates the pseudorandom number.
 Long getTimestamp()
          Returns the current time in milliseconds.
 Integer getWidth()
          Gets width of the displayable area in pixels.
 Boolean isColor()
          Gets information about color support of the device.
 Boolean isMemoryAvailable(Number sizeRequired)
          Checks wheather the specified amount of memory is available.
 Boolean isStorageSpaceAvailable(Number sizeRequired)
          Checks wheather the specified amount of storage space is available.
 Integer numColors()
          Gets the number of colors (if isColor() is true) or graylevels (if isColor() is false) that can be represented on the device.
 void quit()
          Quits the MIDlet.
 void restart()
          Restarts the MIDlet.
 void setCurrent(Alert alert, Screen screen)
          Requests that this Alert be made current, and that Screen be made current after the Alert is dismissed.
 void setCurrent(Screen screen)
          Requests that a different Screen object be made visible on the display.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrent

public Screen getCurrent()
Returns the MIDlet's current Screen object.

Returns:
the MIDlet's current Screen object.
See Also:
MIDP1 Display
Usage examples:
   <blue:call manager="GeneralManager" method="getCurrent"
              toVariable="form"
              castTo="com/emarson/lemonade/bluelemon/midp1/Form"/>
 

getHeight

public Integer getHeight()
Gets height of the displayable area in pixels.

Returns:
width of the displayable area
Usage examples:
   <blue:call manager="GeneralManager" 
              method="getHeight" toVariable="height"/>
 

getPlatformName

public String getPlatformName()
Returns System.getProperty("microedition.platform").

Returns:
System.getProperty("microedition.platform")
Usage examples:
   <blue:call manager="GeneralManager" method="getPlatformName"
              toVariable="platformName">
 

getRandomNumber

public Integer getRandomNumber()
Generates the pseudorandom number.

Returns:
See Also:
Random
Usage examples:
   <blue:call manager="GeneralManager" method="getRandomNumber"
              toVariable="number"/>
 

getTimestamp

public Long getTimestamp()
Returns the current time in milliseconds.

Returns:
the current time in milliseconds
Usage examples:
   <blue:call manager="GeneralManager" 
              method="getTimestamp" toVariable="timestamp"/>
 

getWidth

public Integer getWidth()
Gets width of the displayable area in pixels.

Returns:
width of the displayable area
Usage examples:
   <blue:call manager="GeneralManager" 
              method="getWidth" toVariable="width"/>
 

isColor

public Boolean isColor()
Gets information about color support of the device.

Returns:
true if the display supports color, false otherwise.
Usage examples:
   <blue:call manager="GeneralManager" 
              method="isColor" toVariable="isColor"/>
 

isMemoryAvailable

public Boolean isMemoryAvailable(Number sizeRequired)
Checks wheather the specified amount of memory is available.

Parameters:
sizeRequired - the memory size (in bytes) that needs to be allocated
Returns:
true if that amount of memory is available, false otherwise.
Usage examples:
   <blue:call manager="GeneralManager" 
              method="isMemoryAvailable"
              toVariable="are2kBsAvailable">
     <blue:argument type="int" name="2048"/>
   </blue:call>
 

isStorageSpaceAvailable

public Boolean isStorageSpaceAvailable(Number sizeRequired)
Checks wheather the specified amount of storage space is available.

Parameters:
sizeRequired - the storage space size (in bytes) that needs to be allocated
Returns:
true if that amount of storage space is available, false otherwise.
Usage examples:
   <blue:call manager="GeneralManager" 
              method="isStorageSpaceAvailable"
              toVariable="are2kBsAvailable">
     <blue:argument type="int" name="2048"/>
   </blue:call>
 

numColors

public Integer numColors()
Gets the number of colors (if isColor() is true) or graylevels (if isColor() is false) that can be represented on the device.

Returns:
number of colors.
Usage examples:
   <blue:call manager="GeneralManager" 
              method="numColors" toVariable="numColors"/>
 

quit

public void quit()
Quits the MIDlet.

Parameters:
alert - the alert to be shown
screen - the Screen requested to be made current
See Also:
MIDP1 Display
Usage examples:
   <blue:call manager="GeneralManager" method="quit"/>
 

restart

public void restart()
Restarts the MIDlet.

Usage examples:
   <blue:call manager="GeneralManager" method="restart"/>
 

setCurrent

public void setCurrent(Alert alert,
                       Screen screen)
Requests that this Alert be made current, and that Screen be made current after the Alert is dismissed.

Parameters:
alert - the alert to be shown
screen - the Screen requested to be made current
See Also:
MIDP1 Display
Usage examples:
   <blue:call manager="GeneralManager" method="setCurrent">
     <blue:argument type="variable" name="alert"/>
     <blue:argument type="variable" name="form"/>
   </blue:call>
 

setCurrent

public void setCurrent(Screen screen)
Requests that a different Screen object be made visible on the display.

Parameters:
screen - the Screen requested to be made current
See Also:
MIDP1 Display
Usage examples:
   <blue:call manager="GeneralManager" method="setCurrent">
     <blue:argument type="variable" name="form"/>
   </blue:call>
 


Copyright © 2007 E-MARSON. All Rights Reserved.