leftLine.setStroke(control.getCheckedColor()); leftLine.setStrokeWidth(lineThick); rightLine.setVisible(false); leftLine.setVisible(false);
void hideCaret() { this.caret.setVisible(false); }
private void showCaret() { this.caret.setVisible(true); }
/** * Set the caret to show at the given index * * @param index * the index or <code>-1</code> if caret is to be hidden */ public void setCaretIndex(int index) { if (index >= 0) { this.caretIndex = index; if( this.ownerFocusedProperty.get() ) { this.caret.setVisible(true); } else { this.caret.setVisible(false); } this.flashTimeline.play(); requestLayout(); } else { this.caretIndex = -1; this.flashTimeline.stop(); this.caret.setVisible(false); requestLayout(); } }
public CaretLayer() { this.caret.setVisible(false); this.caret.setStrokeWidth(2); this.caret.getStyleClass().add("text-caret"); //$NON-NLS-1$ this.caret.setVisible(false); this.getChildren().add(this.caret); this.caretAnimation = createCaretAnimation(this.caret); this.sceneProperty().addListener((x, o, n)->{ if (n == null) { if (this.caretAnimation != null) { this.caretAnimation.stop(); } this.caretAnimation = null; } else { this.caretAnimation = createCaretAnimation(this.caret); } }); }
this.selectionMarker.setManaged(false); this.selectionMarker.getStyleClass().add("selection-marker"); //$NON-NLS-1$ this.caret.setVisible(false); this.caret.setStrokeWidth(2); this.caret.setManaged(false); StyledTextLayoutContainer.this.caret.setVisible(false); } else { StyledTextLayoutContainer.this.caret.setVisible(StyledTextLayoutContainer.this.caretIndex != -1); StyledTextLayoutContainer.this.caret.setVisible(false); }; ownerFocusedProperty.addListener( o -> { if( ! ownerFocusedProperty.get() ) { this.caret.setVisible(false);
leftLine.setStroke(control.getCheckedColor()); leftLine.setStrokeWidth(lineThick); rightLine.setVisible(false); leftLine.setVisible(false);