Class PlaceHolder
java.lang.Object
de.xima.fc.gui.common.placeholder.PlaceHolder
- All Implemented Interfaces:
IPlaceholder, Serializable
- Direct Known Subclasses:
GenericTextFragment
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface IPlaceholder
LINK_RECOGNITION_PATTERN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPlaceHolder(String name, IPlaceholderType type, String kind, String alias, String placeholder, String text, IGuiIcon icon, boolean empty, ISerializableFunction<Locale, String> detailedDescription, ISerializableFunction<Locale, String> displayName) -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<IPlaceholder> comparator(Locale locale) static PlaceHolderempty(EPlaceholderType type) booleanstatic PlaceHolderformLang()static PlaceHolderstatic PlaceHoldergetAlias()getDetailedDescription(Locale locale) getDisplayName(Locale locale) getIcon()The preferred way for this text fragment to be inserted into input elements, although this might not be supported by all target components.getKind()Deprecated.getName()Deprecated.Gets the full placeholder name with the brackets, e.g.getShortDescription(Locale locale) Deprecated.Comparable<?> getText()getType()inthashCode()booleanisEmpty()toString()
-
Constructor Details
-
PlaceHolder
protected PlaceHolder(String name, IPlaceholderType type, String kind, String alias, String placeholder, String text, IGuiIcon icon, boolean empty, ISerializableFunction<Locale, String> detailedDescription, ISerializableFunction<Locale, String> displayName)
-
-
Method Details
-
comparator
-
empty
- 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
-
formXfAction
-
formXfQualifier
-
equals
-
getAlias
- Specified by:
getAliasin interfaceIPlaceholder- Returns:
- Only for form field placeholders: The alias of the form field.
-
getDetailedDescription
- Specified by:
getDetailedDescriptionin 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
- Specified by:
getDisplayNamein 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
- Specified by:
getIconin interfaceIPlaceholder- Returns:
- Icon for this placeholder. Depending on the placeholder type, may overwrite the default icon of that type.
-
getIconStyleClass
- Returns:
- Style class for displaying the icon
-
getIconValue
- Returns:
- Value for displaying the icon (text content of the span element)
-
getKind
Deprecated.- Specified by:
getKindin interfaceIPlaceholder- Returns:
- The type or kind of the placeholder. May be used by certain
IPlaceholderTypes for a more detailed description etc.
-
getName
Deprecated.- Specified by:
getNamein interfaceIPlaceholder- Returns:
- Name of the placeholder, e.g.
CLIENT_ID. Usually shown in the list of available placeholders
-
getPlaceholder
Description copied from interface:IPlaceholderGets the full placeholder name with the brackets, e.g.[%$CLIENT_ID%]. Used when inserting the placeholder in an input field- Specified by:
getPlaceholderin interfaceIPlaceholder- Returns:
- The full placeholder name including brackets.
-
getShortDescription
Deprecated.- Specified by:
getShortDescriptionin interfaceIPlaceholder- Parameters:
locale- The locale to get the description for.- Returns:
- Short description of this placeholder, explaining what it does.
-
getSortKey
- Specified by:
getSortKeyin interfaceIPlaceholder- Returns:
- The sort key of this placeholder. Used for sorting placeholders in the list of available placeholders.
-
getText
- Specified by:
getTextin interfaceIPlaceholder- Returns:
- Content of this placeholder, eg. the HTML string for HTML template placeholders.
-
getType
- Specified by:
getTypein interfaceIPlaceholder- Returns:
- Type of this placeholder (e.g. system, template, form field, etc.)
-
getInsertHint
Description copied from interface:IPlaceholderThe preferred way for this text fragment to be inserted into input elements, although this might not be supported by all target components.The default implementation behaves as follows: If the placeholder starts with "LINK_", ends with "_LINK", or contains "_LINK_" or "_LINK." returns
LINK. Otherwise, returnsTEXT.- Specified by:
getInsertHintin interfaceIPlaceholder- Returns:
- The preferred insert mode for this text fragment.
-
hashCode
-
isEmpty
public boolean isEmpty() -
toString
-