Package org.fxmisc.richtext
Class LineNumberFactory<PS>
- java.lang.Object
-
- org.fxmisc.richtext.LineNumberFactory<PS>
-
- All Implemented Interfaces:
IntFunction<Node>
public class LineNumberFactory<PS> extends Object implements IntFunction<Node>
Graphic factory that produces labels containing line numbers and a "+" to indicate folded paragraphs. To customize appearance, use.linenoand.fold-indicatorstyle classes in CSS stylesheets.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodeapply(int idx)static IntFunction<Node>get(GenericStyledArea<?,?,?> area)static <PS> IntFunction<Node>get(GenericStyledArea<PS,?,?> area, IntFunction<String> format)static <PS> IntFunction<Node>get(GenericStyledArea<PS,?,?> area, IntFunction<String> format, Predicate<PS> isFolded, UnaryOperator<PS> removeFoldStyle)Use this if you extended GenericStyledArea for your own text area and you're using paragraph folding.
-
-
-
Method Detail
-
get
public static IntFunction<Node> get(GenericStyledArea<?,?,?> area)
-
get
public static <PS> IntFunction<Node> get(GenericStyledArea<PS,?,?> area, IntFunction<String> format)
-
get
public static <PS> IntFunction<Node> get(GenericStyledArea<PS,?,?> area, IntFunction<String> format, Predicate<PS> isFolded, UnaryOperator<PS> removeFoldStyle)
Use this if you extended GenericStyledArea for your own text area and you're using paragraph folding.- Type Parameters:
PS- The paragraph style type being used by the text area- Parameters:
format- Given an int convert to a String for the line number.isFolded- Given a paragraph style PS check if it's folded.removeFoldStyle- Given a paragraph style PS, return a new PS that excludes fold styling.
-
apply
public Node apply(int idx)
- Specified by:
applyin interfaceIntFunction<PS>
-
-