home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / Box.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.6 KB  |  62 lines

  1. package javax.swing;
  2.  
  3. import java.awt.AWTError;
  4. import java.awt.Component;
  5. import java.awt.Container;
  6. import java.awt.Dimension;
  7. import java.awt.LayoutManager;
  8. import javax.accessibility.Accessible;
  9. import javax.accessibility.AccessibleContext;
  10.  
  11. public class Box extends Container implements Accessible {
  12.    protected AccessibleContext accessibleContext = null;
  13.  
  14.    public Box(int var1) {
  15.       super.setLayout(new BoxLayout(this, var1));
  16.    }
  17.  
  18.    public static Box createHorizontalBox() {
  19.       return new Box(0);
  20.    }
  21.  
  22.    public static Box createVerticalBox() {
  23.       return new Box(1);
  24.    }
  25.  
  26.    public static Component createRigidArea(Dimension var0) {
  27.       return new Filler(var0, var0, var0);
  28.    }
  29.  
  30.    public static Component createHorizontalStrut(int var0) {
  31.       return new Filler(new Dimension(var0, 0), new Dimension(var0, 0), new Dimension(var0, 32767));
  32.    }
  33.  
  34.    public static Component createVerticalStrut(int var0) {
  35.       return new Filler(new Dimension(0, var0), new Dimension(0, var0), new Dimension(32767, var0));
  36.    }
  37.  
  38.    public static Component createGlue() {
  39.       return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 32767));
  40.    }
  41.  
  42.    public static Component createHorizontalGlue() {
  43.       return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 0));
  44.    }
  45.  
  46.    public static Component createVerticalGlue() {
  47.       return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(0, 32767));
  48.    }
  49.  
  50.    public void setLayout(LayoutManager var1) {
  51.       throw new AWTError("Illegal request");
  52.    }
  53.  
  54.    public AccessibleContext getAccessibleContext() {
  55.       if (this.accessibleContext == null) {
  56.          this.accessibleContext = new AccessibleBox(this);
  57.       }
  58.  
  59.       return this.accessibleContext;
  60.    }
  61. }
  62.