talx x1.0.5

component
Class FatCaret

java.lang.Object
  extended byjava.awt.geom.RectangularShape
      extended byjava.awt.geom.Rectangle2D
          extended byjava.awt.Rectangle
              extended byjavax.swing.text.DefaultCaret
                  extended bycomponent.FatCaret
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

public class FatCaret
extends javax.swing.text.DefaultCaret

A Caret with a configurable appearance.

See Also:
Serialized Form

Nested Class Summary
static class FatCaret.Descriptor
           
 
Nested classes inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
Fields inherited from class javax.swing.text.DefaultCaret
changeEvent, listenerList
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
FatCaret()
           
 
Method Summary
protected  void damage(java.awt.Rectangle r)
           
 void focusGained(java.awt.event.FocusEvent e)
          Called when the component containing the caret gains focus.
 void focusLost(java.awt.event.FocusEvent e)
          Called when the component containing the caret loses focus.
 int getCaretWidth()
           
 java.awt.Color getColor()
           
 void install(javax.swing.text.JTextComponent c)
           
 boolean isImplementing(FatCaret.Descriptor d)
           
 void paint(java.awt.Graphics g)
          Draws the cursor.
 void setAll(FatCaret.Descriptor d)
           
 void setCaretWidth(int width)
          Sets the width of the caret in pixels.
 void setColor(java.awt.Color c)
           
 
Methods inherited from class javax.swing.text.DefaultCaret
addChangeListener, adjustVisibility, deinstall, equals, fireStateChanged, getBlinkRate, getChangeListeners, getComponent, getDot, getListeners, getMagicCaretPosition, getMark, getSelectionPainter, isSelectionVisible, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveCaret, moveDot, positionCaret, removeChangeListener, repaint, setBlinkRate, setDot, setMagicCaretPosition, setSelectionVisible, setVisible, toString
 
Methods inherited from class java.awt.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, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Constructor Detail

FatCaret

public FatCaret()
Method Detail

setAll

public void setAll(FatCaret.Descriptor d)

isImplementing

public boolean isImplementing(FatCaret.Descriptor d)

install

public void install(javax.swing.text.JTextComponent c)

setCaretWidth

public void setCaretWidth(int width)
Sets the width of the caret in pixels.


getCaretWidth

public int getCaretWidth()

setColor

public void setColor(java.awt.Color c)

getColor

public java.awt.Color getColor()

paint

public void paint(java.awt.Graphics g)
Draws the cursor.


damage

protected void damage(java.awt.Rectangle r)

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Called when the component containing the caret gains focus. This is implemented to set the caret to visible if the component is editable.

Parameters:
e - the focus event
See Also:
FocusListener.focusGained(java.awt.event.FocusEvent)

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.

Parameters:
e - the focus event
See Also:
FocusListener.focusLost(java.awt.event.FocusEvent)

talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.