Package jmri
Enum NamedBean.DisplayOptions
- java.lang.Object
-
- java.lang.Enum<NamedBean.DisplayOptions>
-
- jmri.NamedBean.DisplayOptions
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NamedBean.DisplayOptions>
- Enclosing interface:
- NamedBean
public static enum NamedBean.DisplayOptions extends java.lang.Enum<NamedBean.DisplayOptions>
Display options forNamedBean.getDisplayName(DisplayOptions)
. The quoted forms are intended to be used in sentences and messages, while the unquoted forms are intended for use in user interface elements like lists and combo boxes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISPLAYNAME
Display the user name; if the user name is null or empty, display the system name.QUOTED_DISPLAYNAME
Display the user name in quotes; if the user name is null or empty, display the system name in quotes.QUOTED_SYSTEMNAME
Display the system name in quotes.QUOTED_USERNAME
Display the user name in quotes; if the user name is null or empty, display the system name in quotes.QUOTED_USERNAME_SYSTEMNAME
Display the user name in quotes followed by the system name in parenthesis.SYSTEMNAME
Display the system name.USERNAME
Display the user name; if the user name is null or empty, display the system name.USERNAME_SYSTEMNAME
Display the user name followed by the system name in parenthesis.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NamedBean.DisplayOptions
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NamedBean.DisplayOptions[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISPLAYNAME
public static final NamedBean.DisplayOptions DISPLAYNAME
Display the user name; if the user name is null or empty, display the system name.
-
QUOTED_DISPLAYNAME
public static final NamedBean.DisplayOptions QUOTED_DISPLAYNAME
Display the user name in quotes; if the user name is null or empty, display the system name in quotes.
-
USERNAME
public static final NamedBean.DisplayOptions USERNAME
Display the user name; if the user name is null or empty, display the system name.
-
QUOTED_USERNAME
public static final NamedBean.DisplayOptions QUOTED_USERNAME
Display the user name in quotes; if the user name is null or empty, display the system name in quotes.
-
SYSTEMNAME
public static final NamedBean.DisplayOptions SYSTEMNAME
Display the system name. This should be used only when the context would cause displaying the user name to be more confusing than not or in text input fields for editing the system name.
-
QUOTED_SYSTEMNAME
public static final NamedBean.DisplayOptions QUOTED_SYSTEMNAME
Display the system name in quotes. This should be used only when the context would cause displaying the user name to be more confusing than not or in text input fields for editing the system name.
-
USERNAME_SYSTEMNAME
public static final NamedBean.DisplayOptions USERNAME_SYSTEMNAME
Display the user name followed by the system name in parenthesis. If the user name is null or empty, display the system name without parenthesis.
-
QUOTED_USERNAME_SYSTEMNAME
public static final NamedBean.DisplayOptions QUOTED_USERNAME_SYSTEMNAME
Display the user name in quotes followed by the system name in parenthesis. If the user name is null or empty, display the system name in quotes.
-
-
Method Detail
-
values
public static NamedBean.DisplayOptions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NamedBean.DisplayOptions c : NamedBean.DisplayOptions.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NamedBean.DisplayOptions valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-