Class SpecificCaretPositionListeners
java.lang.Object
org.gvsig.gui.awt.event.specificCaretPosition.SpecificCaretPositionListeners
This class has a method which adds the necessary listeners for convert a JTextComponent to another which can be configurated
its 'text visible positions when isn't edited' behaviour: left positions, right positions or like JTextComponent (doesn't change text visible positions)
- Author:
- Pablo Piqueras Bartolomé (p_queras@hotmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetListeners(JTextComponent component) Adds three listeners to a JTextComponent component: - A FocusListener -> if this component loses its focus -> set caret position to 0 - A DocumentListener -> if this component doesn't have the focus and its caret position has changed -> set caret position to 0 - A CaretListener -> sometimes DocumentListener doesn't take effect, but this listener does
-
Constructor Details
-
SpecificCaretPositionListeners
public SpecificCaretPositionListeners()
-
-
Method Details
-
setListeners
Adds three listeners to a JTextComponent component: - A FocusListener -> if this component loses its focus -> set caret position to 0 - A DocumentListener -> if this component doesn't have the focus and its caret position has changed -> set caret position to 0 - A CaretListener -> sometimes DocumentListener doesn't take effect, but this listener does- Parameters:
component-
-