Class PlaceHolder
- java.lang.Object
-
- de.xima.fc.gui.common.placeholder.PlaceHolder
-
- All Implemented Interfaces:
IPlaceholder
,Serializable
public class PlaceHolder extends Object implements IPlaceholder
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlaceHolder.PlaceHolderBuilder
Utility class for creating aPlaceHolder
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Comparator<IPlaceholder>
comparator(Locale locale)
static PlaceHolder
empty(EPlaceholderType type)
boolean
equals(Object obj)
static PlaceHolder
formLang()
static PlaceHolder
formXfAction()
static PlaceHolder
formXfQualifier()
String
getAlias()
String
getDetailedDescription(Locale locale)
String
getDisplayName(Locale locale)
IGuiIcon
getIcon()
String
getIconStyleClass()
String
getIconValue()
String
getKind()
Deprecated.String
getName()
Deprecated.String
getPlaceholder()
String
getShortDescription(Locale locale)
Deprecated.Comparable<?>
getSortKey()
String
getText()
IPlaceholderType
getType()
int
hashCode()
boolean
isEmpty()
String
toString()
-
-
-
Method Detail
-
comparator
public static Comparator<IPlaceholder> comparator(Locale locale)
-
empty
public static PlaceHolder empty(EPlaceholderType type)
- Parameters:
type
- Type of placeholder- Returns:
- A new empty placeholder that cannot be inserted into a text field. Usually this is shown in the list of placeholders when no placeholders are available.
-
formLang
public static PlaceHolder formLang()
-
formXfAction
public static PlaceHolder formXfAction()
-
formXfQualifier
public static PlaceHolder formXfQualifier()
-
getAlias
public String getAlias()
- Specified by:
getAlias
in interfaceIPlaceholder
- Returns:
- Only for form field placeholders: The alias of the form field.
-
getDetailedDescription
public String getDetailedDescription(Locale locale)
- Specified by:
getDetailedDescription
in interfaceIPlaceholder
- Parameters:
locale
- The locale to get the description for.- Returns:
- Detailed description of this placeholder, explaining what it does and how it works.
-
getDisplayName
public String getDisplayName(Locale locale)
- Specified by:
getDisplayName
in interfaceIPlaceholder
- Parameters:
locale
- The locale to get the display name for.- Returns:
- Display name of the placeholder, e.g.
Client ID
. Usually shown in the list of available placeholders
-
getIcon
public IGuiIcon getIcon()
- Specified by:
getIcon
in interfaceIPlaceholder
- Returns:
- Icon for this placeholder. Depending on the placeholder type, may overwrite the default icon of that type.
-
getIconStyleClass
public String getIconStyleClass()
- Returns:
- Style class for displaying the icon
-
getIconValue
public String getIconValue()
- Returns:
- Value for displaying the icon (text content of the span element)
-
getKind
@Deprecated public String getKind()
Deprecated.- Specified by:
getKind
in interfaceIPlaceholder
- Returns:
- The type or kind of the placeholder. May be used by certain
IPlaceholderType
s for a more detailed description etc.
-
getName
@Deprecated public String getName()
Deprecated.- Specified by:
getName
in interfaceIPlaceholder
- Returns:
- Name of the placeholder, e.g.
CLIENT_ID
. Usually shown in the list of available placeholders
-
getPlaceholder
public String getPlaceholder()
- Specified by:
getPlaceholder
in interfaceIPlaceholder
- Returns:
- full placeholder name with the brackets, eg.
[%$CLIENT_ID%]
. Used when inserting the placeholder in an input field
-
getShortDescription
@Deprecated public String getShortDescription(Locale locale)
Deprecated.- Specified by:
getShortDescription
in interfaceIPlaceholder
- Parameters:
locale
- The locale to get the description for.- Returns:
- Short description of this placeholder, explaining what it does.
-
getSortKey
public Comparable<?> getSortKey()
- Specified by:
getSortKey
in interfaceIPlaceholder
- Returns:
- The sort key of this placeholder. Used for sorting placeholders in the list of available placeholders.
-
getText
public String getText()
- Specified by:
getText
in interfaceIPlaceholder
- Returns:
- Content of this placeholder, eg. the HTML string for HTML template placeholders.
-
getType
public IPlaceholderType getType()
- Specified by:
getType
in interfaceIPlaceholder
- Returns:
- Type of this placeholder (e.g. system, template, form field, etc.)
-
isEmpty
public boolean isEmpty()
-
-