APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.event

public abstract Class CaretEvent

extends EventObject
Class Inheritance
Known Direct Subclasses
javax.swing.text.JTextComponent.MutableCaretEvent
Annotations
@SuppressWarnings:serial
Imports
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 JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Timothy Prinzing

Field Summary

Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
CaretEvent(Object
the object responsible for the event
source
)

Creates a new CaretEvent object.

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

the dot >= 0
getDot
()

Fetches the location of the caret.

public abstract int

Returns:

the mark >= 0
getMark
()

Fetches the location of other end of a logical selection.

Inherited from java.util.EventObject:
getSourcetoString

Constructor Detail

CaretEventback to summary
public CaretEvent(Object source)

Creates a new CaretEvent object.

Parameters
source:Object

the object responsible for the event

Method Detail

getDotback to summary
public abstract int getDot()

Fetches the location of the caret.

Returns:int

the dot >= 0

getMarkback to summary
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:int

the mark >= 0