public SVGGlyph(@NamedArg("svgPathContent") String svgPathContent) { this(-1, "UNNAMED", svgPathContent, Color.BLACK); }
/** * Builds a new code area with the given enum type as layer id provider. * Constants of the enum will identify layers of the code area. * * @param idEnum Enum type */ // the annotation lets the value be passed from FXML public HighlightLayerCodeArea(@NamedArg("idEnum") Class<K> idEnum) { super(); this.layersById = EnumSet.allOf(idEnum) .stream() .collect(Collectors.toConcurrentMap(id -> id, id -> new StyleLayer())); }
/** * Creates an area that can render and edit the same {@link EditableStyledDocument} as another {@link CodeArea}. */ public CodeArea(@NamedArg("document") EditableStyledDocument<Collection<String>, String, Collection<String>> document) { super(document, false); }
/** * Constructs a VirtualizedScrollPane that only displays its horizontal and vertical scroll bars as needed */ public VirtualizedScrollPane(@NamedArg("content") V content) { this(content, AS_NEEDED, AS_NEEDED); }
/** * Create a new ConnectStateEvent. Specify the gluon observable and the event type. * * @param gluonObservable The GluonObservable which is firing the event. The * GluonObservable really should be an EventTarget, otherwise the * EventTarget for the event will be null. * @param eventType The type of event. This should not be null. */ public ConnectStateEvent(@NamedArg("gluonObservable") GluonObservable gluonObservable, @NamedArg("eventType") EventType<? extends ConnectStateEvent> eventType) { super(gluonObservable, gluonObservable, eventType); }
/************************************************************************** * * Constructors * **************************************************************************/ public Action(@NamedArg("text") String text) { this(text, null); }
/** * The same as {@link #GenericStyledArea(Object, BiConsumer, Object, TextOps, Function)} except that * this constructor can be used to create another {@code GenericStyledArea} that renders and edits the same * {@link EditableStyledDocument} or when one wants to use a custom {@link EditableStyledDocument} implementation. */ public GenericStyledArea( @NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("document") EditableStyledDocument<PS, SEG, S> document, @NamedArg("segmentOps") TextOps<SEG, S> segmentOps, @NamedArg("nodeFactory") Function<StyledSegment<SEG, S>, Node> nodeFactory) { this(initialParagraphStyle, applyParagraphStyle, initialTextStyle, document, segmentOps, true, nodeFactory); }
/** * Creates an area that can render and edit another area's {@link EditableStyledDocument} or a developer's * custom implementation of {@link EditableStyledDocument}. */ public InlineCssTextArea(@NamedArg("document") EditableStyledDocument<String, String, String> document) { super( "", TextFlow::setStyle, "", TextExt::setStyle, document, true ); }
public StyledTextArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("applyStyle") BiConsumer<? super TextExt, S> applyStyle) { this(initialParagraphStyle, applyParagraphStyle, initialTextStyle, applyStyle, true); }
public LeanPropertyValueFactory(@NamedArg("property") String property) { this.property = property; }
public SVGGlyph(@NamedArg("svgPathContent") String svgPathContent) { this(-1, "UNNAMED", svgPathContent, Color.BLACK); }
public StyledTextArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("applyStyle") BiConsumer<? super TextExt, S> applyStyle, @NamedArg("document") EditableStyledDocument<PS, String, S> document, @NamedArg("segmentOps") TextOps<String, S> segmentOps, @NamedArg("preserveStyle") boolean preserveStyle) { super(initialParagraphStyle, applyParagraphStyle, initialTextStyle, document, segmentOps, preserveStyle, seg -> createStyledTextNode(seg, applyStyle) ); }
public StyledTextArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("applyStyle") BiConsumer<? super TextExt, S> applyStyle, @NamedArg("document") EditableStyledDocument<PS, String, S> document, @NamedArg("preserveStyle") boolean preserveStyle) { this(initialParagraphStyle, applyParagraphStyle, initialTextStyle, applyStyle, document, SegmentOps.styledTextOps(), preserveStyle); }
public StyledTextArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("applyStyle") BiConsumer<? super TextExt, S> applyStyle, @NamedArg("preserveStyle") boolean preserveStyle) { this( initialParagraphStyle, applyParagraphStyle, initialTextStyle, applyStyle, new SimpleEditableStyledDocument<>(initialParagraphStyle, initialTextStyle), preserveStyle); }
/** * Creates a text area with empty text content. * * @param initialParagraphStyle style to use in places where no other style is * specified (yet). * @param applyParagraphStyle function that, given a {@link TextFlow} node and * a style, applies the style to the paragraph node. This function is * used by the default skin to apply style to paragraph nodes. * @param initialTextStyle style to use in places where no other style is * specified (yet). * @param segmentOps The operations which are defined on the text segment objects. * @param nodeFactory A function which is used to create the JavaFX scene nodes for a * particular segment. */ public GenericStyledArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("segmentOps") TextOps<SEG, S> segmentOps, @NamedArg("nodeFactory") Function<StyledSegment<SEG, S>, Node> nodeFactory) { this(initialParagraphStyle, applyParagraphStyle, initialTextStyle, segmentOps, true, nodeFactory); }
/** * Same as {@link #GenericStyledArea(Object, BiConsumer, Object, TextOps, Function)} but also allows one * to specify whether the undo manager should be a plain or rich undo manager via {@code preserveStyle}. * * @param initialParagraphStyle style to use in places where no other style is specified (yet). * @param applyParagraphStyle function that, given a {@link TextFlow} node and * a style, applies the style to the paragraph node. This function is * used by the default skin to apply style to paragraph nodes. * @param initialTextStyle style to use in places where no other style is specified (yet). * @param segmentOps The operations which are defined on the text segment objects. * @param preserveStyle whether to use an undo manager that can undo/redo {@link RichTextChange}s or * {@link PlainTextChange}s * @param nodeFactory A function which is used to create the JavaFX scene node for a particular segment. */ public GenericStyledArea(@NamedArg("initialParagraphStyle") PS initialParagraphStyle, @NamedArg("applyParagraphStyle") BiConsumer<TextFlow, PS> applyParagraphStyle, @NamedArg("initialTextStyle") S initialTextStyle, @NamedArg("segmentOps") TextOps<SEG, S> segmentOps, @NamedArg("preserveStyle") boolean preserveStyle, @NamedArg("nodeFactory") Function<StyledSegment<SEG, S>, Node> nodeFactory) { this(initialParagraphStyle, applyParagraphStyle, initialTextStyle, new GenericEditableStyledDocument<>(initialParagraphStyle, initialTextStyle, segmentOps), segmentOps, preserveStyle, nodeFactory); }
public StyleClassedTextArea(@NamedArg("preserveStyle") boolean preserveStyle) { this( new SimpleEditableStyledDocument<>( Collections.<String>emptyList(), Collections.<String>emptyList() ), preserveStyle); }
/** * Creates a new AbstractAction instance with the given String set as the * {@link #textProperty() text} value, as well as the {@code Consumer<ActionEvent>} * set to be called when the action event is fired. * * @param text The string to display in the text property of controls such * as {@link Button#textProperty() Button}. * @param eventHandler This will be called when the ActionEvent is fired. */ public Action(@NamedArg("text") String text, Consumer<ActionEvent> eventHandler) { setText(text); setEventHandler(eventHandler); getStyleClass().add( "action" ); // this class will be added to all bound controls }