javax.swing.plaf.basic

Class BasicTreeUI.TreeTraverseAction

public class BasicTreeUI.TreeTraverseAction extends AbstractAction

TreeTraverseAction is the action used for left/right keys. Will toggle the expandedness of a node, as well as potentially incrementing the selection.
Field Summary
protected intdirection
Determines direction to traverse, 1 means expand, -1 means collapse.
Constructor Summary
TreeTraverseAction(int direction, String name)
Constructor
Method Summary
voidactionPerformed(ActionEvent e)
Invoked when an action occurs.
booleanisEnabled()
Returns true if the action is enabled.

Field Detail

direction

protected int direction
Determines direction to traverse, 1 means expand, -1 means collapse.

Constructor Detail

TreeTraverseAction

public TreeTraverseAction(int direction, String name)
Constructor

Parameters: direction to traverse name is the name of the direction

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

Parameters: e the event that occured

isEnabled

public boolean isEnabled()
Returns true if the action is enabled.

Returns: true if the action is enabled, false otherwise