public interface TokenSubstitution extends BaseTokenSubstitution
String
.
To use this interface, you must create four strings for each token that will be replaced by text:
String
that is displayed in the insert drop down list, such as "Date". Store all of these in an array. The UI will ask for the array.String
, such as "&Date", that appears in the JTextField
when a user has selected a ListItem.String
that is actually stored in the unparsed String
; this String
must not be localized, because it needs to be same String
in all languages.String
that is displayed in the view itself, such as "24 March 2001".In addition, you must provide conversion between these strings, which are used as follows:
JTextField
.JTextField
.String
from the JTextField
, including the token, and asks you for a String
that has the key instead of the token.String
with the key, to ask you for the parsed String
to display in the graph.When a graph is persisted, the String
with key is stored in the XML, and this String
is given to your implementation of this interface to restore the parsed String
in the graph.
getKey, getKeyString, getListItems, getParsedString, getToken, getTokenString, setLocale