home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.AbstractAction;
- import java.awt.event.ActionEvent;
- import java.io.Serializable;
-
- class BasicTreeUI$TreeIncrementAction extends AbstractAction implements Serializable {
- // $FF: synthetic field
- private final BasicTreeUI this$0;
- private int direction;
-
- public BasicTreeUI$TreeIncrementAction(BasicTreeUI var1, int var2, String var3) {
- super(var3);
- this.this$0 = var1;
- this.this$0 = var1;
- this.direction = var2;
- }
-
- public void actionPerformed(ActionEvent var1) {
- int var2;
- if (this.this$0.tree != null && this.this$0.treeSelectionModel != null && (var2 = this.this$0.getRowCount()) > 0) {
- int var3 = this.this$0.tree.getMaxSelectionRow();
- int var4;
- if (var3 == -1) {
- if (this.direction == 1) {
- var4 = 0;
- } else {
- var4 = var2 - 1;
- }
- } else {
- var4 = Math.min(var2 - 1, Math.max(0, var3 + this.direction));
- }
-
- this.this$0.tree.setSelectionInterval(var4, var4);
- this.this$0.ensureRowsAreVisible(var4, var4);
- }
-
- }
-
- public boolean isEnabled() {
- return this.this$0.tree != null && this.this$0.tree.isEnabled();
- }
- }
-