public class MessageFlasher extends Object
Modifier and Type | Field and Description |
---|---|
int |
beepType
The beep typoe to use.
|
int |
flashOptions
Flash options.
|
int |
flashTime
This is the default flash time - initially set to 750.
|
static int |
OPTION_BEEP
This option is enabled by default.
|
Constructor and Description |
---|
MessageFlasher(Control parent)
Create a MessageFlasher for flashing messages on a parent Control.
|
MessageFlasher(Control toDisplay,
Control parent,
boolean beep)
Create a MessageFlasher that immediately displays a Control and
will continue to display it until off() or show() or flash() is called.
|
MessageFlasher(String message,
Control parent,
boolean beep)
Create a MessageFlasher that immediately displays a message and
will continue to display it until off() or show() or flash() is called.
|
Modifier and Type | Method and Description |
---|---|
void |
flash(String message)
Flash a message for the default length of time, switching off any previous messages.
|
void |
flash(String message,
int howLong)
Flash a message for particular length of time, switching off any previous messages.
|
void |
off()
Hide any currently displayed message.
|
void |
show(Control toDisplay)
Start showing a specific custom Control, switching off any other message
that may have been on.
|
void |
show(String message)
Start showing the specified message, switching off any other message
that may have been on.
|
public static final int OPTION_BEEP
public int flashOptions
public int beepType
public int flashTime
public MessageFlasher(Control parent)
parent
- the non-null parent control.public MessageFlasher(String message, Control parent, boolean beep)
message
- the message to display.parent
- the non-null parent control.beep
- true to beep when the message is displayed, false not to.public MessageFlasher(Control toDisplay, Control parent, boolean beep)
toDisplay
- a custom Control to display.parent
- the non-null parent control.beep
- true to beep when the message is displayed, false not to.public void off()
public void show(String message)
message
- the message to show.public void show(Control toDisplay)
toDispaly
- the Control to show.public void flash(String message)
message
- the message to show.public void flash(String message, int howLong)
message
- the message to show.howLong
- the length of time in milliseconds to display the message.