|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.util.swing.messaging.MessageResult
public class MessageResult
MessageResult can be used by MessageListeners to add result information to this message.
For example, user input, which of multiple buttons are hitten or whatever.
For this purpose, MessageResult has an result Map, in which results of any
kind can be placed, identified by an given key.
Field Summary | |
---|---|
static String |
BOOLEAN_DECISION
This key can be used by MessageListener s when feeding a
MessageResult as a key for a boolean value that represents a simple
YES/NO decision by the user. |
static String |
CANCEL_AFFIRMED
This value constant can be used by MessageListener s when feeding a
MessageResult as user decision result for a YES/NO/CANCEL question. |
static String |
NO_AFFIRMED
This value constant can be used by MessageListener s when feeding a
MessageResult as user decision result for a YES/NO/CANCEL question. |
static String |
STANDARD_INPUT_STRING
This key can be used to identify single input Strings returned by the user in messages of type Message.INPUT (e.g. |
static String |
YES_AFFIRMED
This value constant can be used by MessageListener s when feeding a
MessageResult as user decision result for a YES/NO/CANCEL question. |
static String |
YES_NO_CANCEL_DECISION
This key can be used by MessageListener s when feeding a
MessageResult as a key for a value that represents a simple
YES/NO/CANCEL decision by the user. |
Constructor Summary | |
---|---|
MessageResult(MessageEvent associatedMessageEvent)
Constructor for MessageResult. |
Method Summary | |
---|---|
void |
addResult(Object resultIdentifier,
Object result)
Adds an result by name to already holded results. |
boolean |
containsKey(Object resultIdentifier)
Returns true if result map contains a mapping for the specified resultIdentifier. |
protected void |
finalize()
|
Object |
get(Object resultIdentifier)
Returns the value to which the specified result identifier is mapped in this identity hash map, or null if the map contains no mapping for this identifier. |
boolean |
getBoolean(Object resultIdentifier)
Returns the boolean valu for the given identifier. |
MessageEvent |
getMessageEvent()
Returns the associate MessageEvent. |
Iterator |
getResultKeys()
Returns an iterator over the key in the result map. |
boolean |
isEmpty()
Returns true if result map is empty otherwise false |
Object |
removeResult(Object resultIdentifier)
Removes result Object for given resultIdentifier from result map. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BOOLEAN_DECISION
MessageListener
s when feeding a
MessageResult
as a key for a boolean value that represents a simple
YES/NO decision by the user.
public static final String YES_NO_CANCEL_DECISION
MessageListener
s when feeding a
MessageResult
as a key for a value that represents a simple
YES/NO/CANCEL decision by the user. See as possible result values also
public static final String YES_AFFIRMED
MessageListener
s when feeding a
MessageResult
as user decision result for a YES/NO/CANCEL question.
The key for this value is YES_NO_CANCEL_DECISION
public static final String NO_AFFIRMED
MessageListener
s when feeding a
MessageResult
as user decision result for a YES/NO/CANCEL question.
The key for this value is YES_NO_CANCEL_DECISION
public static final String CANCEL_AFFIRMED
MessageListener
s when feeding a
MessageResult
as user decision result for a YES/NO/CANCEL question.
The key for this value is YES_NO_CANCEL_DECISION
public static final String STANDARD_INPUT_STRING
Constructor Detail |
---|
public MessageResult(MessageEvent associatedMessageEvent)
Method Detail |
---|
public void addResult(Object resultIdentifier, Object result)
resultIdentifier
- identifies the result Object for later useresult
- the result Objectpublic Object get(Object resultIdentifier)
resultIdentifier
- the key whose associated result is to be returned.
Map.get(Object)
public boolean getBoolean(Object resultIdentifier)
resultIdentifier
- the key whose associated result is to be returned.
Map.get(Object)
public boolean containsKey(Object resultIdentifier)
resultIdentifier
- key whose presence in result map is to be tested.
Map.containsKey(java.lang.Object)
public boolean isEmpty()
Map.isEmpty()
public Iterator getResultKeys()
public Object removeResult(Object resultIdentifier)
Returns the result Object to which the result map previously associated the resultIdentifier, or null if the result map contained no mapping for this identifier.
resultIdentifier
- key whose mapping is to be removed from the map.
Map.remove(java.lang.Object)
protected void finalize() throws Throwable
finalize
in class Object
Throwable
Object.finalize()
public MessageEvent getMessageEvent()
public String toString()
toString
in class Object
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |