DCT Lightfoot v3 API specification

javax.microedition.lcdui
Class Alert

java.lang.Object
  |
  +--javax.microedition.lcdui.Displayable
        |
        +--javax.microedition.lcdui.Screen
              |
              +--javax.microedition.lcdui.Alert

public class Alert
extends Screen

An alert class that shows a screen for a period of time


Field Summary
static int FOREVER
          Timeout forever
 
Fields inherited from class javax.microedition.lcdui.Screen
height, offset
 
Fields inherited from class javax.microedition.lcdui.Displayable
display
 
Constructor Summary
Alert(java.lang.String title)
          Create a new alert with a title
Alert(java.lang.String title, java.lang.String text, Image image, AlertType type)
          Create a new alert with a title, test, image and of a type
 
Method Summary
 void addCommand(Command cmd)
          Add a command.
 int getDefaultTimeout()
          Get the default timeout
 Image getImage()
          Get the image
 java.lang.String getString()
          Get the string
 int getTimeout()
          Get the timeout
 AlertType getType()
          Get the type
 void setCommandListener(CommandListener l)
          Set the command listener
 void setImage(Image image)
          Set the image
 void setString(java.lang.String text)
          Set the string
 void setTimeout(int timeout)
          Set the timeout
 void setType(AlertType type)
          Set the alert type
 
Methods inherited from class javax.microedition.lcdui.Screen
getTicker, getTitle, scrollDown, scrollUp, setTicker, setTitle
 
Methods inherited from class javax.microedition.lcdui.Displayable
isShown, removeCommand
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOREVER

public static final int FOREVER
Timeout forever

See Also:
Constant Field Values
Constructor Detail

Alert

public Alert(java.lang.String title)
Create a new alert with a title

Parameters:
title - The title

Alert

public Alert(java.lang.String title,
             java.lang.String text,
             Image image,
             AlertType type)
Create a new alert with a title, test, image and of a type

Parameters:
title - The title
text - The text
image - The image
type - The type
Method Detail

addCommand

public void addCommand(Command cmd)
Add a command. This is not allowed

Overrides:
addCommand in class Displayable
Parameters:
cmd - The command

getDefaultTimeout

public int getDefaultTimeout()
Get the default timeout

Returns:
the default timeout

getImage

public Image getImage()
Get the image

Returns:
the image

getString

public java.lang.String getString()
Get the string

Returns:
the string

getTimeout

public int getTimeout()
Get the timeout

Returns:
the timeout

getType

public AlertType getType()
Get the type

Returns:
the type

setCommandListener

public void setCommandListener(CommandListener l)
Set the command listener

Overrides:
setCommandListener in class Displayable
Parameters:
l - The listener

setImage

public void setImage(Image image)
Set the image

Parameters:
image - The image
Throws:
IllegalArgumentException - if the image is mutable

setString

public void setString(java.lang.String text)
Set the string

Parameters:
text - The text

setTimeout

public void setTimeout(int timeout)
Set the timeout

Parameters:
timeout - The timeout
Throws:
IllegalArgumentException - if the timeout is not positive or FOREVER

setType

public void setType(AlertType type)
Set the alert type

Parameters:
type - The type

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification