public class TextAreaSkin extends TextInputControlSkin<TextArea,TextAreaBehavior>
Modifier and Type | Field and Description |
---|---|
static int |
SCROLL_RATE |
caretHandle, caretPath, caretVisible, displayCaret, fontMetrics, highlightFill, highlightTextFill, promptTextFill, selectionHandle1, selectionHandle2, SHOW_HANDLES, textFill
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TextAreaSkin(TextArea textArea) |
Modifier and Type | Method and Description |
---|---|
protected void |
addHighlight(List<? extends Node> nodes,
int start) |
double |
computeBaselineOffset(double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the baseline offset based on the first managed child.
|
void |
deleteChar(boolean previous)
Use this implementation instead of the one provided on TextInputControl
Simply calls into TextInputControl.deletePrevious/NextChar and responds appropriately
based on the return value.
|
void |
dispose()
Called by a Skinnable when the Skin is replaced on the Skinnable.
|
protected void |
downLines(int nLines,
boolean select,
boolean extendSelection) |
Bounds |
getCaretBounds() |
char |
getCharacter(int index)
Returns the character at a given offset.
|
Rectangle2D |
getCharacterBounds(int index)
Returns the bounds of the character at a given index.
|
HitInfo |
getIndex(double x,
double y) |
int |
getInsertionPoint(double x,
double y)
Returns the insertion point for a given location.
|
Point2D |
getMenuPosition() |
int |
getNextInsertionPoint(double x,
int from,
VerticalDirection scrollDirection) |
protected PathElement[] |
getRangeShape(int start,
int end) |
protected PathElement[] |
getUnderlineShape(int start,
int end) |
protected void |
invalidateMetrics() |
protected void |
layoutChildren(double contentX,
double contentY,
double contentWidth,
double contentHeight)
Called during the layout pass of the scenegraph.
|
void |
lineEnd(boolean select,
boolean extendSelection) |
void |
lineStart(boolean select,
boolean extendSelection) |
void |
nextCharacterVisually(boolean moveRight) |
void |
nextLine(boolean select) |
void |
nextPage(boolean select) |
void |
paragraphEnd(boolean goPastInitialNewline,
boolean goPastTrailingNewline,
boolean select) |
void |
paragraphStart(boolean previousIfAtStart,
boolean select) |
void |
positionCaret(HitInfo hit,
boolean select,
boolean extendSelection) |
void |
previousLine(boolean select) |
void |
previousPage(boolean select) |
protected Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
Object... parameters) |
protected void |
removeHighlight(List<? extends Node> nodes) |
void |
scrollCharacterToVisible(int index)
Ensures that the character at a given index is visible.
|
protected void |
updateHighlightFill() |
executeAccessibleAction, forwardBiasProperty, getClassCssMetaData, getCssMetaData, handleInputMethodEvent, isForwardBias, isRTL, maskText, populateContextMenu, setCaretAnimating, setForwardBias, toggleUseVK, updateHighlightTextFill, updateTextFill
getBehavior, handleControlPropertyChanged, registerChangeListener, unregisterChangeListener
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, getChildren, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
public static final int SCROLL_RATE
public TextAreaSkin(TextArea textArea)
protected void invalidateMetrics()
invalidateMetrics
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)
SkinBase
layoutChildren
in class SkinBase<TextArea>
public void dispose()
BehaviorSkinBase
Skin.getSkinnable()
and Skin.getNode()
should return null following a call to dispose. Calling dispose twice
has no effect.dispose
in interface Skin<TextArea>
dispose
in class BehaviorSkinBase<TextArea,TextAreaBehavior>
public double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
Node.getBaselineOffset()
.computeBaselineOffset
in class SkinBase<TextArea>
topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetpublic char getCharacter(int index)
TextInputControlSkin
getCharacter
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public int getInsertionPoint(double x, double y)
TextInputControlSkin
getInsertionPoint
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public void positionCaret(HitInfo hit, boolean select, boolean extendSelection)
public int getNextInsertionPoint(double x, int from, VerticalDirection scrollDirection)
public Rectangle2D getCharacterBounds(int index)
TextInputControlSkin
getCharacterBounds
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public void scrollCharacterToVisible(int index)
TextInputControlSkin
scrollCharacterToVisible
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected void updateHighlightFill()
updateHighlightFill
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public HitInfo getIndex(double x, double y)
public void nextCharacterVisually(boolean moveRight)
nextCharacterVisually
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected void downLines(int nLines, boolean select, boolean extendSelection)
public void previousLine(boolean select)
public void nextLine(boolean select)
public void previousPage(boolean select)
public void nextPage(boolean select)
public void lineStart(boolean select, boolean extendSelection)
public void lineEnd(boolean select, boolean extendSelection)
public void paragraphStart(boolean previousIfAtStart, boolean select)
public void paragraphEnd(boolean goPastInitialNewline, boolean goPastTrailingNewline, boolean select)
protected PathElement[] getUnderlineShape(int start, int end)
getUnderlineShape
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected PathElement[] getRangeShape(int start, int end)
getRangeShape
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected void addHighlight(List<? extends Node> nodes, int start)
addHighlight
in class TextInputControlSkin<TextArea,TextAreaBehavior>
protected void removeHighlight(List<? extends Node> nodes)
removeHighlight
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public void deleteChar(boolean previous)
public Point2D getMenuPosition()
getMenuPosition
in class TextInputControlSkin<TextArea,TextAreaBehavior>
public Bounds getCaretBounds()
protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
queryAccessibleAttribute
in class SkinBase<TextArea>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)
Copyright © 2020. All rights reserved.