|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.ui.framework.TaskMessage
public class TaskMessage extends Object
Provides a way for applications to communicate information to the user.
A TaskMessage
has an associated type
which affects how the information is presented. The possible
types are defined as integer constants.
Modifier and Type | Field and Description |
---|---|
static int |
ERROR
Used to specify an error message. |
static int |
INFORMATION
Used to specify an informational message. |
static int |
PLAIN
Used to specify a plain message. |
static int |
QUESTION
Used to specify a question message. |
static int |
WARNING
Used to specify a warning message. |
Constructor and Description |
---|
TaskMessage(WindowManager parent,
String message,
int type)
Constructs a TaskMessage object which presents information to the user. |
TaskMessage(WindowManager parent,
String message,
int type,
Object[] options,
Object initial)
Constructs a TaskMessage that presents information to the user. |
TaskMessage(WindowManager parent,
String message,
String title,
int type,
Object[] options,
Object initial)
Constructs a TaskMessage that presents information to the user. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Deactivates the task message and releases all associated resources. |
String |
getTitle()
Gets the title of the dialog |
Object |
invoke()
Renders the task message. |
boolean |
isRendered()
Determines whether the task message is currently rendered. |
void |
setTitle(String title)
Sets the title of the Dialog |
Vector |
splitString(String str,
int lineLength)
Splits a string of text into a vector of strings. |
Vector |
splitString(String str,
int lineLength,
FontMetrics fm)
Splits a string of text into a vector of strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERROR
public static final int INFORMATION
public static final int WARNING
public static final int QUESTION
public static final int PLAIN
Constructor Detail |
---|
public TaskMessage(WindowManager parent, String message, int type)
TaskMessage
object which presents information to the user.
parent
- The WindowManager that is the parent of this TaskMessagemessage
- The localized message text.type
- A TaskMessage
constant indicating the message type.public TaskMessage(WindowManager parent, String message, int type, Object[] options, Object initial)
TaskMessage
that presents information to the user.
parent
- The WindowManager that is the parent of this TaskMessagemessage
- The localized message text.type
- A TaskMessage
constant indicating the message type.options
- An array of options. For example, {"Yes", "No", "Details"}
.initial
- The initially selected option in the array supplied. Defaults to the first option.public TaskMessage(WindowManager parent, String message, String title, int type, Object[] options, Object initial)
TaskMessage
that presents information to the user.
parent
- The WindowManager that is the parent of this TaskMessagemessage
- The localized message text.title
- The title for the dialog.type
- A TaskMessage
constant indicating the message type.options
- An array of options. For example, {"Yes", "No", "Details"}
.initial
- The initially selected option in the array supplied. Defaults to the first option.Method Detail |
---|
public Object invoke()
isRendered()
,
dispose()
public boolean isRendered()
isRendered
returns false
if invoke
has never been called, if the user has dismissed
the message, or if dispose
has been called.
true
if the task message is rendered; false
otherwise.invoke()
,
dispose()
public void dispose()
invoke()
public String getTitle()
setTitle(java.lang.String)
public void setTitle(String title)
title
- - the new title being given to the message dialoggetTitle()
public Vector splitString(String str, int lineLength)
str
- the string to be splitlineLength
- optimal number of characters on a linepublic Vector splitString(String str, int lineLength, FontMetrics fm)
str
- the string to be splitlineLength
- optimal number of characters on a linefm
- font metrics of the font used to calculate the splits
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |