javax.swing.plaf.basic
Class BasicTreeUI.TreeHomeAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Enclosing class:
- BasicTreeUI
public class BasicTreeUI.TreeHomeAction
- extends AbstractAction
TreeHomeAction is used to handle end/home actions. Scrolls either the first
or last cell to be visible based on direction.
- See Also:
- Serialized Form
Field Summary |
protected int |
direction
The direction, either home or end |
direction
protected int direction
- The direction, either home or end
BasicTreeUI.TreeHomeAction
public BasicTreeUI.TreeHomeAction(int dir,
String name)
- Creates a new TreeHomeAction instance.
- Parameters:
dir
- the direction to go to, -1
for home,
1
for endname
- the name of the action
actionPerformed
public void actionPerformed(ActionEvent e)
- Invoked when an action occurs.
- Parameters:
e
- is the event that occured
isEnabled
public boolean isEnabled()
- Returns true if the action is enabled.
- Specified by:
isEnabled
in interface Action
- Overrides:
isEnabled
in class AbstractAction
- Returns:
- true if the action is enabled.
- See Also:
AbstractAction.setEnabled(boolean)