Top Description Fields Constructors Methods
jfx.incubator.scene.control.richtext.skin

public Class RichTextAreaSkin

extends SkinBase<RichTextArea>
Class Inheritance
Known Direct Subclasses
jfx.incubator.scene.control.richtext.skin.CodeAreaSkin
Imports
javafx.event.EventHandler, javafx.geometry.Orientation, .Point2D, javafx.scene.AccessibleAction, .AccessibleAttribute, javafx.scene.control.ScrollBar, .Skin, .SkinBase, javafx.scene.input.DataFormat, .InputMethodEvent, .InputMethodRequests, .ScrollEvent, javafx.scene.shape.PathElement, javafx.scene.text.Font, com.sun.jfx.incubator.scene.control.input.InputMapHelper, com.sun.jfx.incubator.scene.control.richtext.Params, .RichTextAreaBehavior, .RichTextAreaSkinHelper, .TextCell, .VFlow, com.sun.jfx.incubator.scene.control.richtext.util.ListenerHelper, .RichUtils, jfx.incubator.scene.control.richtext.RichTextArea, .StyleHandlerRegistry, .StyleResolver, .TextPos, jfx.incubator.scene.control.richtext.model.StyleAttribute, .StyleAttributeMap, .StyledTextModel

Provides visual representation for RichTextArea.

This skin consists of a top level Pane that manages the following children:

Since
24

Field Summary

Modifier and TypeField and Description
private final RichTextAreaBehavior
private final ScrollBar
private InputMethodRequests
private final EventHandler<InputMethodEvent>
private final ListenerHelper
private final VFlow
private final ScrollBar

Constructor Summary

AccessConstructor and Description
public
RichTextAreaSkin(RichTextArea
the owner
control
)

Constructs the skin.

Method Summary

Modifier and TypeMethod and Description
public void
applyStyles(CellContext
the cell context
context
,
StyleAttributeMap
the attributes
attrs
,
boolean
determines whether the styles are applied to the paragraph (true), or text segment (false)
forParagraph
)

Applies styles based on supplied attribute set to either the whole paragraph or the text segment.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

public void
copyText(DataFormat
data format
format
)

Copies the text in the specified format when selection exists and when the export in this format is supported by the model, and the skin must be installed; otherwise, this method is a no-op.

protected ScrollBar

Returns:

the horizontal scroll bar
createHScrollBar
()

Creates the horizontal scroll bar.

protected ScrollBar

Returns:

the vertical scroll bar
createVScrollBar
()

Creates the vertical scroll bar.

public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

public void
executeAccessibleAction(AccessibleAction action, Object... parameters)

Overrides javafx.scene.control.SkinBase.executeAccessibleAction.

This method is called by the assistive technology to request the action indicated by the argument should be executed.

public StyleResolver

Returns:

style resolver instance
getStyleResolver
()

Returns the skin's StyleResolver.

private VFlow
private void
handleInputMethodEvent(InputMethodEvent
the InputMethodEvent to be handled
ev
)

Handles an input method event.

private void
public void
install()

Overrides default javafx.scene.control.Skin.install.

Called once when Skin is set.

public void
pasteText(DataFormat
data format
format
)

Pastes the clipboard content at the caret, or, if selection exists, replacing the selected text.

protected Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.SkinBase.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

public void
refreshLayout()

Discards any cached layout information and calls requestLayout().

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthconsumeMouseEventsgetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutChildrenlayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

behaviorback to summary
private final RichTextAreaBehavior behavior
hscrollback to summary
private final ScrollBar hscroll
inputMethodRequestsback to summary
private InputMethodRequests inputMethodRequests
inputMethodTextChangedHandlerback to summary
private final EventHandler<InputMethodEvent> inputMethodTextChangedHandler
listenerHelperback to summary
private final ListenerHelper listenerHelper

Hides javafx.scene.control.SkinBase.listenerHelper.

vflowback to summary
private final VFlow vflow
vscrollback to summary
private final ScrollBar vscroll

Constructor Detail

RichTextAreaSkinback to summary
public RichTextAreaSkin(RichTextArea control)

Constructs the skin.

Parameters
control:RichTextArea

the owner

Method Detail

applyStylesback to summary
public void applyStyles(CellContext context, StyleAttributeMap attrs, boolean forParagraph)

Applies styles based on supplied attribute set to either the whole paragraph or the text segment. This method can be overriden by other skin implementations to provide additional styling. The overriding method must call super implementation.

Parameters
context:CellContext

the cell context

attrs:StyleAttributeMap

the attributes

forParagraph:boolean

determines whether the styles are applied to the paragraph (true), or text segment (false)

computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinWidth.

Doc from javafx.scene.control.SkinBase.computeMinWidth.

Computes the minimum allowable width of the Skin, based on the provided height.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Doc from javafx.scene.control.SkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.

Annotations
@Override
copyTextback to summary
public void copyText(DataFormat format)

Copies the text in the specified format when selection exists and when the export in this format is supported by the model, and the skin must be installed; otherwise, this method is a no-op.

Parameters
format:DataFormat

data format

createHScrollBarback to summary
protected ScrollBar createHScrollBar()

Creates the horizontal scroll bar.

The subclasses may override this method to provide custom ScrollBar implementation.

Returns:ScrollBar

the horizontal scroll bar

createVScrollBarback to summary
protected ScrollBar createVScrollBar()

Creates the vertical scroll bar.

The subclasses may override this method to provide custom ScrollBar implementation.

Returns:ScrollBar

the vertical scroll bar

disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
executeAccessibleActionback to summary
public void executeAccessibleAction(AccessibleAction action, Object... parameters)

Overrides javafx.scene.control.SkinBase.executeAccessibleAction.

Doc from javafx.scene.control.SkinBase.executeAccessibleAction.

This method is called by the assistive technology to request the action indicated by the argument should be executed.

This method is commonly overridden by subclasses to implement action that are required for a specific role.
If a particular action is not handled, the superclass implementation must be called.

Annotations
@Override
getStyleResolverback to summary
public StyleResolver getStyleResolver()

Returns the skin's StyleResolver.

Returns:StyleResolver

style resolver instance

getVFlowback to summary
private VFlow getVFlow()
handleInputMethodEventback to summary
private void handleInputMethodEvent(InputMethodEvent ev)

Handles an input method event.

Parameters
ev:InputMethodEvent

the InputMethodEvent to be handled

handleModelChangeback to summary
private void handleModelChange(Object src, StyledTextModel old, StyledTextModel m)
installback to summary
public void install()

Overrides default javafx.scene.control.Skin.install.

Doc from javafx.scene.control.Skin.install.

Called once when Skin is set. This method is called after the previous skin, if any, has been uninstalled via its dispose() method. The skin can now safely make changes to its associated control, like registering listeners, adding child nodes, and modifying properties and event handlers.

Application code must not call this method.

The default implementation of this method does nothing.

Annotations
@Override
pasteTextback to summary
public void pasteText(DataFormat format)

Pastes the clipboard content at the caret, or, if selection exists, replacing the selected text. The format must be supported by the model, and the skin must be installed, otherwise this method has no effect.

Parameters
format:DataFormat

data format

queryAccessibleAttributeback to summary
protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.SkinBase.queryAccessibleAttribute.

Doc from javafx.scene.control.SkinBase.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

This method is commonly overridden by subclasses to implement attributes that are required for a specific role.
If a particular attribute is not handled, the superclass implementation must be called.

Annotations
@Override
refreshLayoutback to summary
public void refreshLayout()

Discards any cached layout information and calls requestLayout().