javax.swing.event
Class CaretEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by javax.swing.event.CaretEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public abstract class CaretEvent
extends EventObject sample code for java.util.EventObject definition code for java.util.EventObject

CaretEvent is used to notify interested parties that the text caret has changed in the event source.

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. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
CaretEvent sample code for javax.swing.event.CaretEvent.CaretEvent(java.lang.Object) definition code for javax.swing.event.CaretEvent.CaretEvent(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  source)
          Creates a new CaretEvent object.
 
Method Summary
abstract  int getDot sample code for javax.swing.event.CaretEvent.getDot() definition code for javax.swing.event.CaretEvent.getDot() ()
          Fetches the location of the caret.
abstract  int getMark sample code for javax.swing.event.CaretEvent.getMark() definition code for javax.swing.event.CaretEvent.getMark() ()
          Fetches the location of other end of a logical selection.
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource() , toString sample code for java.util.EventObject.toString() definition code for java.util.EventObject.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

CaretEvent sample code for javax.swing.event.CaretEvent(java.lang.Object) definition code for javax.swing.event.CaretEvent(java.lang.Object)

public CaretEvent(Object sample code for java.lang.Object definition code for java.lang.Object  source)
Creates a new CaretEvent object.

Parameters:
source - the object responsible for the event
Method Detail

getDot sample code for javax.swing.event.CaretEvent.getDot() definition code for javax.swing.event.CaretEvent.getDot()

public abstract int getDot()
Fetches the location of the caret.

Returns:
the dot >= 0

getMark sample code for javax.swing.event.CaretEvent.getMark() definition code for javax.swing.event.CaretEvent.getMark()

public abstract int getMark()
Fetches the location of other end of a logical selection. If there is no selection, this will be the same as dot.

Returns:
the mark >= 0