public abstract class TextInputControlSkin<T extends TextInputControl,B extends TextInputControlBehavior<T>> extends BehaviorSkinBase<T,B>
Modifier and Type | Field and Description |
---|---|
protected StackPane |
caretHandle |
protected Path |
caretPath
A path, provided by the textNode, which represents the caret.
|
protected ObservableBooleanValue |
caretVisible |
protected BooleanProperty |
displayCaret |
protected ObservableObjectValue<FontMetrics> |
fontMetrics |
protected ObjectProperty<Paint> |
highlightFill
The fill to use for the text when highlighted.
|
protected ObjectProperty<Paint> |
highlightTextFill |
protected ObjectProperty<Paint> |
promptTextFill |
protected StackPane |
selectionHandle1 |
protected StackPane |
selectionHandle2 |
protected static boolean |
SHOW_HANDLES
Specifies whether we ought to show handles.
|
protected ObjectProperty<Paint> |
textFill
The fill to use for the text under normal conditions
|
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TextInputControlSkin(T textInput,
B behavior) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addHighlight(List<? extends Node> nodes,
int start) |
protected void |
executeAccessibleAction(AccessibleAction action,
Object... parameters) |
BooleanProperty |
forwardBiasProperty() |
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.
|
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that
a Node's CssMetaData can be accessed without the need for reflection. |
int |
getInsertionPoint(double x,
double y)
Returns the insertion point for a given location.
|
Point2D |
getMenuPosition() |
protected abstract PathElement[] |
getRangeShape(int start,
int end) |
protected abstract PathElement[] |
getUnderlineShape(int start,
int end) |
protected void |
handleInputMethodEvent(InputMethodEvent event) |
protected void |
invalidateMetrics() |
boolean |
isForwardBias() |
protected boolean |
isRTL() |
protected String |
maskText(String txt) |
abstract void |
nextCharacterVisually(boolean moveRight) |
void |
populateContextMenu(ContextMenu contextMenu) |
protected abstract void |
removeHighlight(List<? extends Node> nodes) |
void |
scrollCharacterToVisible(int index)
Ensures that the character at a given index is visible.
|
void |
setCaretAnimating(boolean value) |
void |
setForwardBias(boolean isLeading) |
void |
toggleUseVK() |
protected void |
updateHighlightFill() |
protected void |
updateHighlightTextFill() |
protected void |
updateTextFill() |
dispose, getBehavior, handleControlPropertyChanged, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, getChildren, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
protected static final boolean SHOW_HANDLES
protected final ObservableObjectValue<FontMetrics> fontMetrics
protected final ObjectProperty<Paint> textFill
protected final ObjectProperty<Paint> promptTextFill
protected final ObjectProperty<Paint> highlightFill
protected final ObjectProperty<Paint> highlightTextFill
protected final BooleanProperty displayCaret
protected ObservableBooleanValue caretVisible
protected final Path caretPath
protected StackPane caretHandle
protected StackPane selectionHandle1
protected StackPane selectionHandle2
public BooleanProperty forwardBiasProperty()
public void setForwardBias(boolean isLeading)
public boolean isForwardBias()
public Point2D getMenuPosition()
public void toggleUseVK()
public char getCharacter(int index)
index
- public int getInsertionPoint(double x, double y)
x
- y
- public Rectangle2D getCharacterBounds(int index)
index
- public void scrollCharacterToVisible(int index)
index
- protected void invalidateMetrics()
protected void updateTextFill()
protected void updateHighlightFill()
protected void updateHighlightTextFill()
protected void handleInputMethodEvent(InputMethodEvent event)
protected abstract PathElement[] getUnderlineShape(int start, int end)
protected abstract PathElement[] getRangeShape(int start, int end)
public abstract void nextCharacterVisually(boolean moveRight)
protected boolean isRTL()
public void setCaretAnimating(boolean value)
public void populateContextMenu(ContextMenu contextMenu)
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in class SkinBase<T extends TextInputControl>
protected void executeAccessibleAction(AccessibleAction action, Object... parameters)
executeAccessibleAction
in class SkinBase<T extends TextInputControl>
Node.executeAccessibleAction(javafx.scene.AccessibleAction, java.lang.Object...)
Copyright © 2020. All rights reserved.