java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
javax.swing.text.DefaultCaret
org.gtk.java.swing.plaf.gtk.GtkTextUI.GtkCaret
- All Implemented Interfaces:
- javax.swing.text.Caret, java.lang.Cloneable, java.util.EventListener, java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.awt.Shape, javax.swing.plaf.UIResource
- Enclosing class:
- GtkTextUI
- public static class GtkTextUI.GtkCaret
- extends javax.swing.text.DefaultCaret
- implements javax.swing.plaf.UIResource
The gtk caret is rendered as an I beam.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is appropriate
for short term storage or RMI between applications running the same
version of Swing. A future release of Swing will provide support for
long term persistence.
| Nested classes inherited from class javax.swing.text.DefaultCaret |
|
| Nested classes inherited from class java.awt.geom.Rectangle2D |
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float |
| Methods inherited from class javax.swing.text.DefaultCaret |
addChangeListener, adjustVisibility, deinstall, fireStateChanged, getBlinkRate, getChangeListeners, getComponent, getDot, getListeners, getMagicCaretPosition, getMark, getSelectionPainter, getUpdatePolicy, install, isSelectionVisible, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveCaret, moveDot, positionCaret, removeChangeListener, repaint, setBlinkRate, setDot, setMagicCaretPosition, setSelectionVisible, setUpdatePolicy, setVisible |
| Methods inherited from class java.awt.Rectangle |
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union |
| Methods inherited from class java.awt.geom.Rectangle2D |
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
| Methods inherited from class java.awt.geom.RectangularShape |
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
IBeamOverhang
static final int IBeamOverhang
- See Also:
- Constant Field Values
GtkTextUI.GtkCaret
public GtkTextUI.GtkCaret()
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Called when the component containing the caret gains
focus. This is implemented to repaint the component
so the focus rectangle will be re-rendered, as well
as providing the superclass behavior.
- Specified by:
focusGained in interface java.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Called when the component containing the caret loses
focus. This is implemented to set the caret to visibility
to false.
- Specified by:
focusLost in interface java.awt.event.FocusListener
damage
protected void damage(java.awt.Rectangle r)
- Damages the area surrounding the caret to cause
it to be repainted. If paint() is reimplemented,
this method should also be reimplemented.
paint
public void paint(java.awt.Graphics g)
- Renders the caret as a vertical line. If this is reimplemented
the damage method should also be reimplemented as it assumes the
shape of the caret is a vertical line. Does nothing if isVisible()
is false. The caret color is derived from getCaretColor() if
the component has focus, else from getDisabledTextColor().
- Specified by:
paint in interface javax.swing.text.Caret