|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.CaretPositionListener
public class CaretPositionListener extends Object
This class will retain the caret positioning at the character where the mouse was clicked.
| Field Summary | |
|---|---|
private boolean |
dynamicFormatting
|
| Constructor Summary | |
CaretPositionListener()
Default constructor. |
|
CaretPositionListener(JFormattedTextField... components)
Convenience constructor. |
|
| Method Summary | |
|---|---|
void
|
deregisterComponent(JFormattedTextField... components)
Remove listeners from the specified component |
private void
|
determineCaretPosition(JFormattedTextField ftf)
|
boolean
|
isDynamicFormatting()
|
void
|
mouseClicked(MouseEvent e)
|
void
|
mouseEntered(MouseEvent e)
|
void
|
mouseExited(MouseEvent e)
|
void
|
mousePressed(MouseEvent me)
|
void
|
mouseReleased(MouseEvent e)
|
void
|
registerComponent(JFormattedTextField... components)
Add the required listeners to the specified component |
private void
|
setCaretPosition(JFormattedTextField ftf, int offset)
|
void
|
setDynamicFormatting(boolean dynamicFormatting)
Indicates that the formatting of the text in the formatted text field can change depending on whether the text field has focus or not. |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private boolean dynamicFormatting
| Constructor Detail |
|---|
public CaretPositionListener()
public CaretPositionListener(JFormattedTextField... components)
| Method Detail |
|---|
public void deregisterComponent(JFormattedTextField... components)
component - the component the listeners are removed from
private void determineCaretPosition(JFormattedTextField ftf)
public boolean isDynamicFormatting()
public void mouseClicked(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mousePressed(MouseEvent me)
public void mouseReleased(MouseEvent e)
public void registerComponent(JFormattedTextField... components)
component - the component the listeners are added to
private void setCaretPosition(JFormattedTextField ftf, int offset)
public void setDynamicFormatting(boolean dynamicFormatting)
dynamicFormatting - when true dynamic formatting must be considered
Groovy Documentation