Class PlaceHolder

java.lang.Object
de.xima.fc.gui.common.placeholder.PlaceHolder
All Implemented Interfaces:
IPlaceholder, Serializable
Direct Known Subclasses:
GenericTextFragment

public class PlaceHolder extends Object implements IPlaceholder
See Also:
  • Constructor Details

  • Method Details

    • 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()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getAlias

      public String getAlias()
      Specified by:
      getAlias in interface IPlaceholder
      Returns:
      Only for form field placeholders: The alias of the form field.
    • getDetailedDescription

      public String getDetailedDescription(Locale locale)
      Specified by:
      getDetailedDescription in interface IPlaceholder
      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 interface IPlaceholder
      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 interface IPlaceholder
      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 interface IPlaceholder
      Returns:
      The type or kind of the placeholder. May be used by certain IPlaceholderTypes for a more detailed description etc.
    • getName

      @Deprecated public String getName()
      Deprecated.
      Specified by:
      getName in interface IPlaceholder
      Returns:
      Name of the placeholder, e.g. CLIENT_ID. Usually shown in the list of available placeholders
    • getPlaceholder

      public String getPlaceholder()
      Description copied from interface: IPlaceholder
      Gets the full placeholder name with the brackets, e.g. [%$CLIENT_ID%]. Used when inserting the placeholder in an input field
      Specified by:
      getPlaceholder in interface IPlaceholder
      Returns:
      The full placeholder name including brackets.
    • getShortDescription

      @Deprecated public String getShortDescription(Locale locale)
      Deprecated.
      Specified by:
      getShortDescription in interface IPlaceholder
      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 interface IPlaceholder
      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 interface IPlaceholder
      Returns:
      Content of this placeholder, eg. the HTML string for HTML template placeholders.
    • getType

      public IPlaceholderType getType()
      Specified by:
      getType in interface IPlaceholder
      Returns:
      Type of this placeholder (e.g. system, template, form field, etc.)
    • getInsertHint

      public EPlaceholderInsertHint getInsertHint()
      Description copied from interface: IPlaceholder
      The 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, returns TEXT.

      Specified by:
      getInsertHint in interface IPlaceholder
      Returns:
      The preferred insert mode for this text fragment.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isEmpty

      public boolean isEmpty()
    • toString

      public String toString()
      Overrides:
      toString in class Object