Package org.fxmisc.richtext
Class LineNumberFactory<PS>
- java.lang.Object
-
- org.fxmisc.richtext.LineNumberFactory<PS>
-
- All Implemented Interfaces:
java.util.function.IntFunction<javafx.scene.Node>
public class LineNumberFactory<PS> extends java.lang.Object implements java.util.function.IntFunction<javafx.scene.Node>
Graphic factory that produces labels containing line numbers and a "+" to indicate folded paragraphs. To customize appearance, use.lineno
and.fold-indicator
style classes in CSS stylesheets.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.Node
apply(int idx)
static java.util.function.IntFunction<javafx.scene.Node>
get(GenericStyledArea<?,?,?> area)
static <PS> java.util.function.IntFunction<javafx.scene.Node>
get(GenericStyledArea<PS,?,?> area, java.util.function.IntFunction<java.lang.String> format)
static <PS> java.util.function.IntFunction<javafx.scene.Node>
get(GenericStyledArea<PS,?,?> area, java.util.function.IntFunction<java.lang.String> format, java.util.function.Predicate<PS> isFolded, java.util.function.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 java.util.function.IntFunction<javafx.scene.Node> get(GenericStyledArea<?,?,?> area)
-
get
public static <PS> java.util.function.IntFunction<javafx.scene.Node> get(GenericStyledArea<PS,?,?> area, java.util.function.IntFunction<java.lang.String> format)
-
get
public static <PS> java.util.function.IntFunction<javafx.scene.Node> get(GenericStyledArea<PS,?,?> area, java.util.function.IntFunction<java.lang.String> format, java.util.function.Predicate<PS> isFolded, java.util.function.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 javafx.scene.Node apply(int idx)
- Specified by:
apply
in interfacejava.util.function.IntFunction<PS>
-
-