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$TreeToggleAction extends AbstractAction implements Serializable {
- // $FF: synthetic field
- private final BasicTreeUI this$0;
-
- public BasicTreeUI$TreeToggleAction(BasicTreeUI var1, String var2) {
- super(var2);
- this.this$0 = var1;
- this.this$0 = var1;
- }
-
- public void actionPerformed(ActionEvent var1) {
- if (this.this$0.tree != null) {
- int var2 = this.this$0.tree.getMinSelectionRow();
- if (var2 != -1 && !this.this$0.isLeaf(var2)) {
- if (this.this$0.isExpanded(var2)) {
- this.this$0.collapseRow(var2);
- return;
- }
-
- this.this$0.expandRow(var2);
- }
- }
-
- }
-
- public boolean isEnabled() {
- return this.this$0.tree != null && this.this$0.tree.isEnabled();
- }
- }
-