Class FlatCaret
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
javax.swing.text.DefaultCaret
com.formdev.flatlaf.ui.FlatCaret
- All Implemented Interfaces:
FocusListener, MouseListener, MouseMotionListener, Shape, Serializable, Cloneable, EventListener, UIResource, Caret
Caret that can select all text on focus gained.
Also fixes Swing's double-click-and-drag behavior so that dragging after
a double-click extends selection by whole words.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Rectangle2D
Rectangle2D.Double, Rectangle2D.Float -
Field Summary
Fields inherited from class DefaultCaret
ALWAYS_UPDATE, changeEvent, listenerList, NEVER_UPDATE, UPDATE_WHEN_ON_EDTFields inherited from class Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustVisibility(Rectangle nloc) voidvoidvoidvoidvoidvoidvoidvoidmoveDot(int dot) voidprotected voidvoidsetDot(int dot) Methods inherited from class DefaultCaret
addChangeListener, damage, equals, fireStateChanged, getBlinkRate, getChangeListeners, getComponent, getDot, getDotBias, getListeners, getMagicCaretPosition, getMark, getMarkBias, getSelectionPainter, getUpdatePolicy, isActive, isSelectionVisible, isVisible, mouseClicked, mouseEntered, mouseExited, mouseMoved, moveCaret, moveDot, paint, positionCaret, removeChangeListener, repaint, setBlinkRate, setDot, setMagicCaretPosition, setSelectionVisible, setUpdatePolicy, setVisible, toStringMethods inherited from class Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, unionMethods inherited from class Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, unionMethods inherited from class RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalMethods inherited from interface Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
-
Constructor Details
-
FlatCaret
-
-
Method Details
-
install
- Specified by:
installin interfaceCaret- Overrides:
installin classDefaultCaret
-
deinstall
- Specified by:
deinstallin interfaceCaret- Overrides:
deinstallin classDefaultCaret
-
adjustVisibility
- Overrides:
adjustVisibilityin classDefaultCaret
-
setDot
public void setDot(int dot) - Specified by:
setDotin interfaceCaret- Overrides:
setDotin classDefaultCaret
-
moveDot
public void moveDot(int dot) - Specified by:
moveDotin interfaceCaret- Overrides:
moveDotin classDefaultCaret
-
focusGained
- Specified by:
focusGainedin interfaceFocusListener- Overrides:
focusGainedin classDefaultCaret
-
focusLost
- Specified by:
focusLostin interfaceFocusListener- Overrides:
focusLostin classDefaultCaret
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classDefaultCaret
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classDefaultCaret
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classDefaultCaret
-
selectAllOnFocusGained
protected void selectAllOnFocusGained() -
scrollCaretToVisible
public void scrollCaretToVisible()- Since:
- 1.4
-