Class ContextPlaceholderType

java.lang.Object
de.xima.fc.gui.statics.ContextPlaceholderType
All Implemented Interfaces:
IPlaceholderType

public class ContextPlaceholderType extends Object implements IPlaceholderType
An implementation of IPlaceholderType for context placeholders of the form [%key.value%].
Author:
XIMA MEDIA GmbH
  • Constructor Details

    • ContextPlaceholderType

      public ContextPlaceholderType(String displayName, String detailedDescription, IGuiIcon defaultIcon)
      Parameters:
      displayName - The name of the group of this placeholder type.
      detailedDescription - Detailed description for each placeholder of this type.
      defaultIcon - Default icon that is used when the placeholder does not specify an icon of its own.
  • Method Details

    • getDetailedDescription

      public String getDetailedDescription(PlaceHolder placeholder, Locale locale)
      Specified by:
      getDetailedDescription in interface IPlaceholderType
      Parameters:
      placeholder - A placeholder of this type for which to get the description.
      locale - The current language settings
      Returns:
      A detailed description for the given placeholder.
    • getDisplayName

      public String getDisplayName(Locale l)
      Specified by:
      getDisplayName in interface IPlaceholderType
      Parameters:
      l - The current language settings.
      Returns:
      The name of this placeholder type, shown as the header of the group.
    • getIcon

      public IGuiIcon getIcon(PlaceHolder placeholder)
      Specified by:
      getIcon in interface IPlaceholderType
      Parameters:
      placeholder - A placeholder of this type for which to get the icon.
      Returns:
      Icon to be shown for the given placeholder. May be either a default icon for this group or a specific icon for the given placeholder.
    • getId

      public String getId()
      Specified by:
      getId in interface IPlaceholderType
      Returns:
      The ID of this placeholder type, used for grouping individual placeholders according to their type.
    • getShortDescription

      public String getShortDescription(PlaceHolder placeholder, Locale locale)
      Specified by:
      getShortDescription in interface IPlaceholderType
      Parameters:
      placeholder - A placeholder of this type for which to get the description.
      locale - The current language settings
      Returns:
      A short description for the given placeholder
    • getSortKeyFirst

      public int getSortKeyFirst()
      Specified by:
      getSortKeyFirst in interface IPlaceholderType
      Returns:
      Key by which placeholders types are sorted first.
    • getSortKeySecond

      public String getSortKeySecond()
      Specified by:
      getSortKeySecond in interface IPlaceholderType
      Returns:
      Key by which placeholders types are sorted second (when the IPlaceholderType.getSortKeyFirst() are the same).
    • isExpandInitially

      public boolean isExpandInitially()
      Specified by:
      isExpandInitially in interface IPlaceholderType
      Returns:
      true True if this category should be expanded initially, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object