List of usage examples for javax.swing.text DefaultEditorKit endAction
String endAction
To view the source code for javax.swing.text DefaultEditorKit endAction.
Click Source Link
Action
for moving the caret to the end of the document. From source file:DateTimeEditor.java
protected void setupKeymap() { Keymap keymap = m_textField.addKeymap("DateTimeKeymap", null); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), m_upAction); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), m_downAction); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), new BackwardAction(DefaultEditorKit.backwardAction)); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), new ForwardAction(DefaultEditorKit.forwardAction)); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0), new BeginAction(DefaultEditorKit.beginAction)); keymap.addActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_END, 0), new EndAction(DefaultEditorKit.endAction)); m_textField.setKeymap(keymap);/* www . j ava2 s .c om*/ }