|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction javax.swing.text.TextAction javax.swing.text.DefaultEditorKit.VerticalPageAction
Scrolls up/down vertically. The select version of this action extends the selection, instead of simply moving the caret.
DefaultEditorKit.pageUpAction
,
DefaultEditorKit#selectPageUpAction
,
DefaultEditorKit.getActions()
Nested Class Summary |
Nested classes inherited from class javax.swing.AbstractAction |
|
Field Summary | |
private int |
direction
Direction to scroll, 1 is down, -1 is up. |
private boolean |
select
Adjusts the Rectangle to contain the bounds of the character at index in response to a page up. |
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
DefaultEditorKit.VerticalPageAction(String nm,
int direction,
boolean select)
Create this object with the appropriate identifier. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
The operation to perform when this action is triggered. |
private void |
adjustScrollIfNecessary(JTextComponent text,
Rectangle visible,
int initialY,
int index)
Adjusts the rectangle that indicates the location to scroll to after selecting index . |
private int |
constrainOffset(JTextComponent text,
int offset)
Ensures that offset is a valid offset into the
model for text . |
private int |
constrainY(JTextComponent target,
int y,
int vis)
Makes sure y is a valid location in
target . |
Methods inherited from class javax.swing.text.TextAction |
augmentList, getFocusedComponent, getTextComponent |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean select
index
in response to a page up.
private int direction
Constructor Detail |
public DefaultEditorKit.VerticalPageAction(String nm, int direction, boolean select)
Method Detail |
public void actionPerformed(ActionEvent e)
private int constrainY(JTextComponent target, int y, int vis)
y
is a valid location in
target
.
private int constrainOffset(JTextComponent text, int offset)
offset
is a valid offset into the
model for text
.
private void adjustScrollIfNecessary(JTextComponent text, Rectangle visible, int initialY, int index)
index
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |