Package de.xima.fc.gui.statics
Class ContextPlaceholderType
- java.lang.Object
-
- de.xima.fc.gui.statics.ContextPlaceholderType
-
- All Implemented Interfaces:
IPlaceholderType
public class ContextPlaceholderType extends Object implements IPlaceholderType
An implementation ofIPlaceholderType
for context placeholders of the form[%key.value%]
.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.gui.statics.IPlaceholderType
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description ContextPlaceholderType(String displayName, String detailedDescription, IGuiIcon defaultIcon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDetailedDescription(PlaceHolder placeholder, Locale locale)
String
getDisplayName(Locale l)
IGuiIcon
getIcon(PlaceHolder placeholder)
String
getId()
String
getShortDescription(PlaceHolder placeholder, Locale locale)
int
getSortKeyFirst()
String
getSortKeySecond()
boolean
isExpandInitially()
String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
getDetailedDescription
public String getDetailedDescription(PlaceHolder placeholder, Locale locale)
- Specified by:
getDetailedDescription
in interfaceIPlaceholderType
- 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 interfaceIPlaceholderType
- 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 interfaceIPlaceholderType
- 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 interfaceIPlaceholderType
- 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 interfaceIPlaceholderType
- 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 interfaceIPlaceholderType
- Returns:
- Key by which placeholders types are sorted first.
-
getSortKeySecond
public String getSortKeySecond()
- Specified by:
getSortKeySecond
in interfaceIPlaceholderType
- Returns:
- Key by which placeholders types are sorted second (when the
IPlaceholderType.getSortKeyFirst()
are the same).
-
isExpandInitially
public boolean isExpandInitially()
- Specified by:
isExpandInitially
in interfaceIPlaceholderType
- Returns:
true
True if this category should be expanded initially,false
otherwise.
-
-