de.grogra.util
public interface Described
Described provides descriptions
for an object. The descriptions are obtained by the method
getDescription(String). Which particular description is
returned depends on the argument type: It
is one of the string constants defined in this interface.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACCELERATOR_KEY
Constant for
getDescription(String) specifying an
accelerator key to be used as the accelerator for the object. |
static java.lang.String |
ICON
Constant for
getDescription(String) specifying an icon. |
static java.lang.String |
MNEMONIC_KEY
Constant for
getDescription(String) specifying a
key code to be used as the mnemonic for the object. |
static java.lang.String |
NAME
Constant for
getDescription(String) specifying the
name. |
static java.lang.String |
SHORT_DESCRIPTION
Constant for
getDescription(String) specifying a
short description. |
static java.lang.String |
TITLE
Constant for
getDescription(String) specifying a
title. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getDescription(java.lang.String type)
Returns the description associated with the given
type. |
static final java.lang.String ACCELERATOR_KEY
getDescription(String) specifying an
accelerator key to be used as the accelerator for the object.
The returned value has to be an instance of
KeyStroke or a String which can be converted
to a KeyStroke by
KeyStroke.getKeyStroke(String).static final java.lang.String ICON
getDescription(String) specifying an icon.
The returned value has to be an instance of
IconSource.static final java.lang.String MNEMONIC_KEY
getDescription(String) specifying a
key code to be used as the mnemonic for the object.
The returned value has to be an instance of
Number or Character.static final java.lang.String NAME
getDescription(String) specifying the
name. The returned value has to be a String, it is
used, among others, for menus and buttons.static final java.lang.String SHORT_DESCRIPTION
getDescription(String) specifying a
short description.
The returned value has to be a String, it is
used, among others, for tooltip text.static final java.lang.String TITLE
getDescription(String) specifying a
title.
The returned value has to be a String, it is
used for titles.java.lang.Object getDescription(java.lang.String type)
type.
type has to be one of the predefined constants
of this interface, the returned value has to conform to the
specification of the used constant.type - the type of descriptionnull if no description is available