javax.swing.plaf.basic

Class BasicTreeUI.TreeHomeAction

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.
Field Summary
protected intdirection
The direction, either home or end
Constructor Summary
TreeHomeAction(int dir, String name)
Creates a new TreeHomeAction instance.
Method Summary
voidactionPerformed(ActionEvent e)
Invoked when an action occurs.
booleanisEnabled()
Returns true if the action is enabled.

Field Detail

direction

protected int direction
The direction, either home or end

Constructor Detail

TreeHomeAction

public TreeHomeAction(int dir, String name)
Creates a new TreeHomeAction instance.

Parameters: dir the direction to go to, -1 for home, 1 for end name the name of the action

Method Detail

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.

Returns: true if the action is enabled.