Class GenericTextFragment

    • Method Detail

      • 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
        Overrides:
        getPlaceholder in class PlaceHolder
        Returns:
        The full placeholder name including brackets.
      • 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
        Overrides:
        getInsertHint in class PlaceHolder
        Returns:
        The preferred insert mode for this text fragment.
      • fromTemplate

        public static PlaceHolder fromTemplate​(Textbaustein template,
                                               String groupName,
                                               boolean untagged,
                                               IGuiIcon icon,
                                               EPlaceholderInsertHint insertHint)
        Creates a PlaceHolder instance based on the properties of a template.
        Parameters:
        template - the template to create the text fragment from
        groupName - a string for text fragment grouping (e.g. in datatables)
        untagged - true, if the provided template doesn't have any keywords/tags
        icon - an icon to be used for this text fragment in the GUI
        insertHint - describes the way this text fragment prefers to be inserted. Might not be supported by all target components.
        Returns:
        The new PlaceHolder instance