home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.event.ActionEvent;
- import javax.swing.AbstractAction;
- import javax.swing.tree.TreePath;
-
- class BasicTreeUI$TreeSelectAllAction extends AbstractAction {
- // $FF: synthetic field
- private final BasicTreeUI this$0;
- private boolean selectAll;
-
- public BasicTreeUI$TreeSelectAllAction(BasicTreeUI var1, String var2, boolean var3) {
- super(var2);
- this.this$0 = var1;
- this.selectAll = var3;
- }
-
- public void actionPerformed(ActionEvent var1) {
- int var2 = this.this$0.getRowCount(this.this$0.tree);
- if (this.this$0.tree != null && var2 > 0) {
- if (this.selectAll) {
- TreePath var3 = BasicTreeUI.access$4(this.this$0);
- TreePath var4 = BasicTreeUI.access$9(this.this$0);
- if (var3 != null && !this.this$0.tree.isVisible(var3)) {
- var3 = null;
- }
-
- this.this$0.tree.setSelectionInterval(0, var2 - 1);
- if (var3 != null) {
- BasicTreeUI.access$3(this.this$0, var3);
- }
-
- if (var4 != null && this.this$0.tree.isVisible(var4)) {
- BasicTreeUI.access$2(this.this$0, var4);
- } else if (var3 != null) {
- BasicTreeUI.access$2(this.this$0, var3);
- }
- } else {
- TreePath var5 = BasicTreeUI.access$4(this.this$0);
- TreePath var6 = BasicTreeUI.access$9(this.this$0);
- this.this$0.tree.clearSelection();
- BasicTreeUI.access$2(this.this$0, var6);
- BasicTreeUI.access$3(this.this$0, var5);
- }
- }
-
- }
-
- public boolean isEnabled() {
- return this.this$0.tree != null && this.this$0.tree.isEnabled();
- }
- }
-