home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Insets;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
-
- class BasicSplitPaneDivider$OneTouchActionHandler implements ActionListener {
- private boolean toMinimum;
- // $FF: synthetic field
- private final BasicSplitPaneDivider this$0;
-
- BasicSplitPaneDivider$OneTouchActionHandler(BasicSplitPaneDivider var1, boolean var2) {
- this.this$0 = var1;
- this.toMinimum = var2;
- }
-
- public void actionPerformed(ActionEvent var1) {
- Insets var2 = this.this$0.splitPane.getInsets();
- int var3 = this.this$0.splitPane.getLastDividerLocation();
- int var4 = this.this$0.splitPaneUI.getDividerLocation(this.this$0.splitPane);
- int var5;
- if (this.toMinimum) {
- if (this.this$0.orientation == 0) {
- if (var4 >= this.this$0.splitPane.getHeight() - var2.bottom - this.this$0.getDividerSize()) {
- var5 = var3;
- } else {
- var5 = var2.top;
- }
- } else if (var4 >= this.this$0.splitPane.getWidth() - var2.right - this.this$0.getDividerSize()) {
- var5 = var3;
- } else {
- var5 = var2.left;
- }
- } else if (this.this$0.orientation == 0) {
- if (var4 == var2.top) {
- var5 = var3;
- } else {
- var5 = this.this$0.splitPane.getHeight() - this.this$0.getHeight() - var2.top;
- }
- } else if (var4 == var2.left) {
- var5 = var3;
- } else {
- var5 = this.this$0.splitPane.getWidth() - this.this$0.getWidth() - var2.left;
- }
-
- if (var4 != var5) {
- this.this$0.splitPane.setDividerLocation(var5);
- this.this$0.splitPane.setLastDividerLocation(var4);
- }
-
- }
- }
-