home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / JFrame$AccessibleJFrame.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  5.2 KB  |  207 lines

  1. package com.sun.java.swing;
  2.  
  3. import com.sun.java.accessibility.Accessible;
  4. import com.sun.java.accessibility.AccessibleComponent;
  5. import com.sun.java.accessibility.AccessibleContext;
  6. import com.sun.java.accessibility.AccessibleRole;
  7. import com.sun.java.accessibility.AccessibleState;
  8. import com.sun.java.accessibility.AccessibleStateSet;
  9. import java.awt.Color;
  10. import java.awt.Container;
  11. import java.awt.Cursor;
  12. import java.awt.Dimension;
  13. import java.awt.Font;
  14. import java.awt.FontMetrics;
  15. import java.awt.Point;
  16. import java.awt.Rectangle;
  17. import java.awt.event.FocusListener;
  18. import java.io.Serializable;
  19. import java.util.Locale;
  20.  
  21. class JFrame$AccessibleJFrame extends AccessibleContext implements Serializable, AccessibleComponent {
  22.    // $FF: synthetic field
  23.    private final JFrame this$0;
  24.  
  25.    public String getAccessibleName() {
  26.       if (super.accessibleName != null) {
  27.          return super.accessibleName;
  28.       } else {
  29.          return this.this$0.getTitle() == null ? super.getAccessibleName() : this.this$0.getTitle();
  30.       }
  31.    }
  32.  
  33.    public AccessibleRole getAccessibleRole() {
  34.       return AccessibleRole.FRAME;
  35.    }
  36.  
  37.    public AccessibleStateSet getAccessibleStateSet() {
  38.       AccessibleStateSet var1 = SwingUtilities.getAccessibleStateSet(this.this$0);
  39.       if (this.this$0.isResizable()) {
  40.          var1.add(AccessibleState.RESIZABLE);
  41.       }
  42.  
  43.       if (this.this$0.getFocusOwner() != null) {
  44.          var1.add(AccessibleState.ACTIVE);
  45.       }
  46.  
  47.       return var1;
  48.    }
  49.  
  50.    public Accessible getAccessibleParent() {
  51.       Container var1 = this.this$0.getParent();
  52.       return var1 instanceof Accessible ? (Accessible)var1 : null;
  53.    }
  54.  
  55.    public int getAccessibleIndexInParent() {
  56.       return SwingUtilities.getAccessibleIndexInParent(this.this$0);
  57.    }
  58.  
  59.    public int getAccessibleChildrenCount() {
  60.       return SwingUtilities.getAccessibleChildrenCount(this.this$0);
  61.    }
  62.  
  63.    public Accessible getAccessibleChild(int var1) {
  64.       return SwingUtilities.getAccessibleChild(this.this$0, var1);
  65.    }
  66.  
  67.    public Locale getLocale() {
  68.       return this.this$0.getLocale();
  69.    }
  70.  
  71.    public AccessibleComponent getAccessibleComponent() {
  72.       return this;
  73.    }
  74.  
  75.    public Color getBackground() {
  76.       return this.this$0.getBackground();
  77.    }
  78.  
  79.    public void setBackground(Color var1) {
  80.       this.this$0.setBackground(var1);
  81.    }
  82.  
  83.    public Color getForeground() {
  84.       return this.this$0.getForeground();
  85.    }
  86.  
  87.    public void setForeground(Color var1) {
  88.       this.this$0.setForeground(var1);
  89.    }
  90.  
  91.    public Cursor getCursor() {
  92.       return this.this$0.getCursor();
  93.    }
  94.  
  95.    public void setCursor(Cursor var1) {
  96.       this.this$0.setCursor(var1);
  97.    }
  98.  
  99.    public Font getFont() {
  100.       return this.this$0.getFont();
  101.    }
  102.  
  103.    public void setFont(Font var1) {
  104.       this.this$0.setFont(var1);
  105.    }
  106.  
  107.    public FontMetrics getFontMetrics(Font var1) {
  108.       return this.this$0.getFontMetrics(var1);
  109.    }
  110.  
  111.    public boolean isEnabled() {
  112.       return this.this$0.isEnabled();
  113.    }
  114.  
  115.    public void setEnabled(boolean var1) {
  116.       this.this$0.setEnabled(var1);
  117.    }
  118.  
  119.    public boolean isVisible() {
  120.       return this.this$0.isVisible();
  121.    }
  122.  
  123.    public void setVisible(boolean var1) {
  124.       this.this$0.setVisible(var1);
  125.    }
  126.  
  127.    public boolean isShowing() {
  128.       return this.this$0.isShowing();
  129.    }
  130.  
  131.    public boolean contains(Point var1) {
  132.       return this.this$0.contains(var1);
  133.    }
  134.  
  135.    public Point getLocationOnScreen() {
  136.       return this.this$0.getLocationOnScreen();
  137.    }
  138.  
  139.    public Point getLocation() {
  140.       return this.this$0.getLocation();
  141.    }
  142.  
  143.    public void setLocation(Point var1) {
  144.       this.this$0.setLocation(var1);
  145.    }
  146.  
  147.    public Rectangle getBounds() {
  148.       return this.this$0.getBounds();
  149.    }
  150.  
  151.    public void setBounds(Rectangle var1) {
  152.       this.this$0.setBounds(var1);
  153.    }
  154.  
  155.    public Dimension getSize() {
  156.       return this.this$0.getSize();
  157.    }
  158.  
  159.    public void setSize(Dimension var1) {
  160.       this.this$0.setSize(var1);
  161.    }
  162.  
  163.    public Accessible getAccessibleAt(Point var1) {
  164.       int var6 = this.getAccessibleChildrenCount();
  165.  
  166.       for(int var7 = 0; var7 < var6; ++var7) {
  167.          Accessible var2 = this.getAccessibleChild(var7);
  168.          if (var2 != null) {
  169.             AccessibleContext var3 = var2.getAccessibleContext();
  170.             if (var3 != null) {
  171.                AccessibleComponent var4 = var3.getAccessibleComponent();
  172.                if (var4 != null && var4.isShowing()) {
  173.                   Point var5 = var4.getLocation();
  174.                   Point var8 = new Point(var1.x - var5.x, var1.y - var5.y);
  175.                   if (var4.contains(var8)) {
  176.                      return var2;
  177.                   }
  178.                }
  179.             }
  180.          }
  181.       }
  182.  
  183.       return this.this$0;
  184.    }
  185.  
  186.    public boolean isFocusTraversable() {
  187.       return this.this$0.isFocusTraversable();
  188.    }
  189.  
  190.    public void requestFocus() {
  191.       this.this$0.requestFocus();
  192.    }
  193.  
  194.    public void addFocusListener(FocusListener var1) {
  195.       this.this$0.addFocusListener(var1);
  196.    }
  197.  
  198.    public void removeFocusListener(FocusListener var1) {
  199.       this.this$0.removeFocusListener(var1);
  200.    }
  201.  
  202.    JFrame$AccessibleJFrame(JFrame var1) {
  203.       this.this$0 = var1;
  204.       this.this$0 = var1;
  205.    }
  206. }
  207.