public abstract class TextInputControlSkin<T extends TextInputControl>
extends <any>
TextFieldSkin
,
TextAreaSkin
Type | Property and Description |
---|---|
(package private) ObservableBooleanValue |
caretVisible |
protected BooleanProperty |
forwardBias
Caret bias in the content.
|
protected <any> |
highlightFill
The fill to use for the text when highlighted.
|
protected <any> |
highlightTextFill |
protected <any> |
promptTextFill |
protected <any> |
textFill
The fill to use for the text under normal conditions
|
Modifier and Type | Class and Description |
---|---|
private static class |
TextInputControlSkin.CaretBlinking
Support classes
|
static class |
TextInputControlSkin.Direction
Direction names for caret movement.
|
private static class |
TextInputControlSkin.StyleableProperties |
static class |
TextInputControlSkin.TextUnit
Unit names for caret movement.
|
Modifier and Type | Field and Description |
---|---|
private BooleanProperty |
blink
Properties
|
private TextInputControlSkin.CaretBlinking |
caretBlinking |
(package private) StackPane |
caretHandle |
(package private) Path |
caretPath
A path, provided by the textNode, which represents the caret.
|
private ObservableBooleanValue |
caretVisible |
private BooleanProperty |
displayCaret |
(package private) <any> |
fontMetrics
Private fields
|
private BooleanProperty |
forwardBias
Caret bias in the content.
|
private <any> |
highlightFill
The fill to use for the text when highlighted.
|
private <any> |
highlightTextFill |
private java.util.List<Shape> |
imattrs |
private int |
imlength |
private int |
imstart |
private static boolean |
IS_FXVK_SUPPORTED |
(package private) static boolean |
preload |
private <any> |
promptTextFill |
(package private) StackPane |
selectionHandle1 |
(package private) StackPane |
selectionHandle2 |
(package private) static boolean |
SHOW_HANDLES
Specifies whether we ought to show handles.
|
private <any> |
textFill
The fill to use for the text under normal conditions
|
Constructor and Description |
---|
TextInputControlSkin(T control)
Creates a new instance of TextInputControlSkin, although note that this
instance does not handle any behavior / input mappings - this needs to be
handled appropriately by subclasses.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addHighlight(java.util.List<? extends Node> nodes,
int start)
Adds highlight for composed text from Input Method.
|
private BooleanProperty |
blinkProperty() |
(package private) ObservableBooleanValue |
caretVisibleProperty() |
private void |
createInputMethodAttributes(InputMethodHighlight highlight,
int start,
int end) |
private BooleanProperty |
displayCaretProperty() |
protected void |
executeAccessibleAction(AccessibleAction action,
java.lang.Object... parameters) |
protected BooleanProperty |
forwardBiasProperty()
Caret bias in the content.
|
(package private) TextInputControlBehavior |
getBehavior()
Private implementation
|
Rectangle2D |
getCharacterBounds(int index)
Returns the bounds of the character at a given index.
|
static java.util.List<<any>> |
getClassCssMetaData()
Returns the CssMetaData associated with this class, which may include the
CssMetaData of its superclasses.
|
java.util.List<<any>> |
getCssMetaData() |
protected Paint |
getHighlightFill()
Gets the value of the property highlightFill.
|
protected Paint |
getHighlightTextFill()
Gets the value of the property highlightTextFill.
|
protected int |
getInsertionPoint(double x,
double y)
Returns the insertion point for a given location.
|
Point2D |
getMenuPosition()
Returns the position to be used for a context menu, based on the location
of the caret handle or selection handles.
|
protected Paint |
getPromptTextFill()
Gets the value of the property promptTextFill.
|
protected abstract PathElement[] |
getRangeShape(int start,
int end) |
protected Paint |
getTextFill()
Gets the value of the property textFill.
|
protected abstract PathElement[] |
getUnderlineShape(int start,
int end) |
protected void |
handleInputMethodEvent(InputMethodEvent event) |
protected <any> |
highlightFillProperty()
The fill to use for the text when highlighted.
|
protected <any> |
highlightTextFillProperty() |
protected void |
invalidateMetrics()
Invalidates cached min and pref sizes for the TextInputControl.
|
private boolean |
isBlink() |
private boolean |
isDisplayCaret() |
protected boolean |
isForwardBias()
Gets the value of the property forwardBias.
|
(package private) boolean |
isRTL() |
protected java.lang.String |
maskText(java.lang.String txt)
This method may be overridden by subclasses to replace the displayed
characters without affecting the actual text content.
|
abstract void |
moveCaret(TextInputControlSkin.TextUnit unit,
TextInputControlSkin.Direction dir,
boolean select)
Moves the caret by one of the given text unit, in the given
direction.
|
protected <any> |
promptTextFillProperty() |
protected abstract void |
removeHighlight(java.util.List<? extends Node> nodes)
Removes highlight for composed text from Input Method.
|
protected void |
scrollCharacterToVisible(int index)
Ensures that the character at a given index is visible.
|
private void |
setBlink(boolean value) |
void |
setCaretAnimating(boolean value)
Starts or stops caret blinking.
|
private void |
setDisplayCaret(boolean value) |
void |
setForwardBias(boolean isLeading)
Sets the value of the property forwardBias.
|
protected void |
setHighlightFill(Paint value)
The fill
Paint used for the background of selected text. |
protected void |
setHighlightTextFill(Paint value)
The fill
Paint used for the foreground of selected text. |
protected void |
setPromptTextFill(Paint value)
The fill
Paint used for the foreground prompt text color. |
protected void |
setTextFill(Paint value)
The fill
Paint used for the foreground text color. |
protected <any> |
textFillProperty()
The fill to use for the text under normal conditions
|
protected void |
updateHighlightFill()
Called when highlightFill property changes.
|
protected void |
updateHighlightTextFill()
Called when highlightTextFill property changes.
|
protected void |
updateTextFill()
Called when textFill property changes.
|
protected final <any> textFillProperty
getTextFill()
,
setTextFill(Paint)
protected final <any> promptTextFillProperty
getPromptTextFill()
,
setPromptTextFill(Paint)
protected final <any> highlightFillProperty
getHighlightFill()
,
setHighlightFill(Paint)
protected final <any> highlightTextFillProperty
protected final BooleanProperty forwardBiasProperty
isForwardBias()
,
setForwardBias(boolean)
ObservableBooleanValue caretVisibleProperty
static boolean preload
static final boolean SHOW_HANDLES
private static final boolean IS_FXVK_SUPPORTED
final <any> fontMetrics
private ObservableBooleanValue caretVisible
private TextInputControlSkin.CaretBlinking caretBlinking
final Path caretPath
StackPane caretHandle
StackPane selectionHandle1
StackPane selectionHandle2
private int imstart
private int imlength
private java.util.List<Shape> imattrs
private BooleanProperty blink
private final <any> textFill
private final <any> promptTextFill
private final <any> highlightFill
private final <any> highlightTextFill
private final BooleanProperty displayCaret
private BooleanProperty forwardBias
public TextInputControlSkin(T control)
control
- The control that this skin should be installed onto.private final void setBlink(boolean value)
private final boolean isBlink()
private final BooleanProperty blinkProperty()
protected final void setTextFill(Paint value)
Paint
used for the foreground text color.value
- the text fillprotected final Paint getTextFill()
protected final <any> textFillProperty()
getTextFill()
,
setTextFill(Paint)
protected final void setPromptTextFill(Paint value)
Paint
used for the foreground prompt text color.value
- the prompt text fillprotected final Paint getPromptTextFill()
protected final <any> promptTextFillProperty()
getPromptTextFill()
,
setPromptTextFill(Paint)
protected final void setHighlightFill(Paint value)
Paint
used for the background of selected text.value
- the highlight fillprotected final Paint getHighlightFill()
protected final <any> highlightFillProperty()
getHighlightFill()
,
setHighlightFill(Paint)
protected final void setHighlightTextFill(Paint value)
Paint
used for the foreground of selected text.value
- the highlight text fillprotected final Paint getHighlightTextFill()
protected final <any> highlightTextFillProperty()
private final void setDisplayCaret(boolean value)
private final boolean isDisplayCaret()
private final BooleanProperty displayCaretProperty()
protected final BooleanProperty forwardBiasProperty()
isForwardBias()
,
setForwardBias(boolean)
public final void setForwardBias(boolean isLeading)
protected final boolean isForwardBias()
protected abstract PathElement[] getUnderlineShape(int start, int end)
start
- the startend
- the endprotected abstract PathElement[] getRangeShape(int start, int end)
start
- the startend
- the endprotected abstract void addHighlight(java.util.List<? extends Node> nodes, int start)
nodes
- the list of nodesstart
- the startprotected abstract void removeHighlight(java.util.List<? extends Node> nodes)
nodes
- the list of nodespublic abstract void moveCaret(TextInputControlSkin.TextUnit unit, TextInputControlSkin.Direction dir, boolean select)
unit
- the unit of text to move by.dir
- the direction of movement.select
- whether to extends the selection to the new posititon.public Point2D getMenuPosition()
protected java.lang.String maskText(java.lang.String txt)
txt
- the content that may need to be masked.protected int getInsertionPoint(double x, double y)
x
- the x locationy
- the y locationpublic Rectangle2D getCharacterBounds(int index)
index
- the indexprotected void scrollCharacterToVisible(int index)
index
- the indexprotected void invalidateMetrics()
protected void updateTextFill()
protected void updateHighlightFill()
protected void updateHighlightTextFill()
protected void handleInputMethodEvent(InputMethodEvent event)
public void setCaretAnimating(boolean value)
value
- whether caret should be blinking.TextInputControlBehavior getBehavior()
ObservableBooleanValue caretVisibleProperty()
boolean isRTL()
private void createInputMethodAttributes(InputMethodHighlight highlight, int start, int end)
public static java.util.List<<any>> getClassCssMetaData()
public java.util.List<<any>> getCssMetaData()
protected void executeAccessibleAction(AccessibleAction action, java.lang.Object... parameters)