Package de.xima.fc.gui.model
Class PlaceHolder
- java.lang.Object
-
- de.xima.fc.gui.model.PlaceHolder
-
- All Implemented Interfaces:
Serializable
public class PlaceHolder extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlaceHolder.PlaceHolderBuilder
Utility class for creating aPlaceHolder
.
-
Field Summary
Fields Modifier and Type Field Description static Comparator<PlaceHolder>
COMPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlaceHolder
empty(EPlaceholderType type)
boolean
equals(Object obj)
String
getAlias()
String
getDetailedDescription(Locale locale)
IGuiIcon
getIcon()
String
getIconStyleClass()
String
getIconValue()
String
getKind()
String
getName()
String
getPlaceholder()
String
getShortDescription(Locale locale)
String
getText()
IPlaceholderType
getType()
int
hashCode()
boolean
isEmpty()
String
toString()
-
-
-
Field Detail
-
COMPARATOR
public static final Comparator<PlaceHolder> COMPARATOR
-
-
Method Detail
-
getAlias
public String getAlias()
- Returns:
- Only for form field placeholders: The alias of the form field.
-
getDetailedDescription
public String getDetailedDescription(Locale locale)
- Parameters:
locale
- Current locale.- Returns:
- Detailed description of this placeholder, such as explaning what it does for system placeholders.
-
getIcon
public IGuiIcon getIcon()
- 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
public String getKind()
- Returns:
- The type or kind of the placeholder. May be used by certain
IPlaceholderType
s for a more detailed description etc.
-
getName
public String getName()
- Returns:
- Name of the placeholder, eg.
CLIENT_ID
. Usually shown in the list of available placeholders
-
getPlaceholder
public String getPlaceholder()
- Returns:
- full placeholder name with the brackets, eg.
[%$CLIENT_ID%]
. Used when inserting the placeholder in an input field
-
getShortDescription
public String getShortDescription(Locale locale)
- Parameters:
locale
- Current locale.- Returns:
- A short description that is shown for this placeholder, usually its name.
-
getText
public String getText()
- Returns:
- Content of this placeholder, eg. the HTML string for HTML template placeholders.
-
getType
public IPlaceholderType getType()
- Returns:
- Type of this placeholder (system, form, custom etc).
-
isEmpty
public boolean isEmpty()
-
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.
-
-