Class StyleClassedTextArea

    • Constructor Detail

      • StyleClassedTextArea

        public StyleClassedTextArea​(boolean preserveStyle)
      • StyleClassedTextArea

        public StyleClassedTextArea()
        Creates a text area with empty text content.
    • Method Detail

      • append

        public void append​(String text,
                           String styleClass)
        Convenient method to append text together with a single style class.
      • insert

        public void insert​(int position,
                           String text,
                           String styleClass)
        Convenient method to insert text together with a single style class.
      • replace

        public void replace​(int start,
                            int end,
                            String text,
                            String styleClass)
        Convenient method to replace text together with a single style class.
      • setStyleClass

        public void setStyleClass​(int from,
                                  int to,
                                  String styleClass)
        Convenient method to assign a single style class.
      • foldParagraphs

        public void foldParagraphs​(int startPar,
                                   int endPar)
        Folds (hides/collapses) paragraphs from startPar to endPar, "into" (i.e. excluding) the first paragraph of the range.
      • foldSelectedParagraphs

        public void foldSelectedParagraphs()
        Folds (hides/collapses) the currently selected paragraphs, "into" (i.e. excluding) the first paragraph of the range.
      • foldText

        public void foldText​(int start,
                             int end)
        Folds (hides/collapses) paragraphs from character position start to end, "into" (i.e. excluding) the first paragraph of the range.
      • isFolded

        public boolean isFolded​(int paragraph)
      • unfoldParagraphs

        public void unfoldParagraphs​(int startingFromPar)
        Unfolds paragraphs startingFrom onwards for the currently folded block.
      • unfoldText

        public void unfoldText​(int startingFromPos)
        Unfolds text startingFromPos onwards for the currently folded block.
      • getFoldStyleCheck

        protected Predicate<Collection<String>> getFoldStyleCheck()
        Returns:
        a Predicate that given a paragraph style, returns true if it includes folding.
      • getAddFoldStyle

        protected UnaryOperator<Collection<String>> getAddFoldStyle()
        Returns:
        a UnaryOperator that given a paragraph style, returns a style that includes fold styling.
      • getRemoveFoldStyle

        protected UnaryOperator<Collection<String>> getRemoveFoldStyle()
        Returns:
        a UnaryOperator that given a paragraph style, returns a style that excludes fold styling.