dk.klafbang.tincpn.animation.plugin
Class GetString

java.lang.Object
  extended by dk.klafbang.tincpn.animation.plugin.GetString

public class GetString
extends java.lang.Object

GetString allows you get short text-messages from the user.

This class is also a usefull starting point for writing your own animation objects, as it demonstrates how to use simple pre-built modal dialogs.

Since:
1.0
Author:
Michael Westergaard
See Also:
Hello World example, Simple Protocol example

Constructor Summary
GetString(java.lang.String header, java.lang.String id)
          Constructs a GetString object.
 
Method Summary
 java.lang.String getString(java.lang.String message, java.lang.String def)
          Prompt the user for a string.
 void reset()
          Noop.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetString

public GetString(java.lang.String header,
                 java.lang.String id)
Constructs a GetString object.

Parameters:
header - a header that can be displayed with the request for a string
id -
Method Detail

getString

public java.lang.String getString(java.lang.String message,
                                  java.lang.String def)
Prompt the user for a string.

Parameters:
message - the message to show the user
def - the default value
Returns:
the entered string (or def if the user presses Cancel)

reset

public void reset()
Noop. This object has no state.