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 / java / awt / Component$AccessibleAWTComponent.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  5.0 KB  |  240 lines

  1. package java.awt;
  2.  
  3. import java.awt.event.ComponentListener;
  4. import java.awt.event.FocusListener;
  5. import java.beans.PropertyChangeListener;
  6. import java.io.Serializable;
  7. import java.util.Locale;
  8. import javax.accessibility.Accessible;
  9. import javax.accessibility.AccessibleComponent;
  10. import javax.accessibility.AccessibleContext;
  11. import javax.accessibility.AccessibleRole;
  12. import javax.accessibility.AccessibleState;
  13. import javax.accessibility.AccessibleStateSet;
  14.  
  15. public abstract class Component$AccessibleAWTComponent extends AccessibleContext implements Serializable, AccessibleComponent {
  16.    protected ComponentListener accessibleAWTComponentHandler;
  17.    protected FocusListener accessibleAWTFocusHandler;
  18.    // $FF: synthetic field
  19.    private final Component this$0;
  20.  
  21.    protected Component$AccessibleAWTComponent(Component var1) {
  22.       this.this$0 = var1;
  23.       this.accessibleAWTComponentHandler = null;
  24.       this.accessibleAWTFocusHandler = null;
  25.    }
  26.  
  27.    public void addPropertyChangeListener(PropertyChangeListener var1) {
  28.       if (this.accessibleAWTComponentHandler == null) {
  29.          this.accessibleAWTComponentHandler = new Component.AccessibleAWTComponent.AccessibleAWTComponentHandler(this);
  30.          this.this$0.addComponentListener(this.accessibleAWTComponentHandler);
  31.       }
  32.  
  33.       if (this.accessibleAWTFocusHandler == null) {
  34.          this.accessibleAWTFocusHandler = new Component.AccessibleAWTComponent.AccessibleAWTFocusHandler(this);
  35.          this.this$0.addFocusListener(this.accessibleAWTFocusHandler);
  36.       }
  37.  
  38.       super.addPropertyChangeListener(var1);
  39.    }
  40.  
  41.    public void removePropertyChangeListener(PropertyChangeListener var1) {
  42.       if (this.accessibleAWTComponentHandler != null) {
  43.          this.this$0.removeComponentListener(this.accessibleAWTComponentHandler);
  44.          this.accessibleAWTComponentHandler = null;
  45.       }
  46.  
  47.       if (this.accessibleAWTFocusHandler != null) {
  48.          this.this$0.removeFocusListener(this.accessibleAWTFocusHandler);
  49.          this.accessibleAWTFocusHandler = null;
  50.       }
  51.  
  52.       super.removePropertyChangeListener(var1);
  53.    }
  54.  
  55.    public String getAccessibleName() {
  56.       return super.accessibleName;
  57.    }
  58.  
  59.    public String getAccessibleDescription() {
  60.       return super.accessibleDescription;
  61.    }
  62.  
  63.    public AccessibleRole getAccessibleRole() {
  64.       return AccessibleRole.AWT_COMPONENT;
  65.    }
  66.  
  67.    public AccessibleStateSet getAccessibleStateSet() {
  68.       return this.this$0.getAccessibleStateSet();
  69.    }
  70.  
  71.    public Accessible getAccessibleParent() {
  72.       if (super.accessibleParent != null) {
  73.          return super.accessibleParent;
  74.       } else {
  75.          Container var1 = this.this$0.getParent();
  76.          return var1 instanceof Accessible ? (Accessible)var1 : null;
  77.       }
  78.    }
  79.  
  80.    public int getAccessibleIndexInParent() {
  81.       return this.this$0.getAccessibleIndexInParent();
  82.    }
  83.  
  84.    public int getAccessibleChildrenCount() {
  85.       return 0;
  86.    }
  87.  
  88.    public Accessible getAccessibleChild(int var1) {
  89.       return null;
  90.    }
  91.  
  92.    public Locale getLocale() {
  93.       return this.this$0.getLocale();
  94.    }
  95.  
  96.    public AccessibleComponent getAccessibleComponent() {
  97.       return this;
  98.    }
  99.  
  100.    public Color getBackground() {
  101.       return this.this$0.getBackground();
  102.    }
  103.  
  104.    public void setBackground(Color var1) {
  105.       this.this$0.setBackground(var1);
  106.    }
  107.  
  108.    public Color getForeground() {
  109.       return this.this$0.getForeground();
  110.    }
  111.  
  112.    public void setForeground(Color var1) {
  113.       this.this$0.setForeground(var1);
  114.    }
  115.  
  116.    public Cursor getCursor() {
  117.       return this.this$0.getCursor();
  118.    }
  119.  
  120.    public void setCursor(Cursor var1) {
  121.       this.this$0.setCursor(var1);
  122.    }
  123.  
  124.    public Font getFont() {
  125.       return this.this$0.getFont();
  126.    }
  127.  
  128.    public void setFont(Font var1) {
  129.       this.this$0.setFont(var1);
  130.    }
  131.  
  132.    public FontMetrics getFontMetrics(Font var1) {
  133.       return var1 == null ? null : this.this$0.getFontMetrics(var1);
  134.    }
  135.  
  136.    public boolean isEnabled() {
  137.       return this.this$0.isEnabled();
  138.    }
  139.  
  140.    public void setEnabled(boolean var1) {
  141.       boolean var2 = this.this$0.isEnabled();
  142.       this.this$0.setEnabled(var1);
  143.       if (var1 != var2 && this.this$0.accessibleContext != null) {
  144.          if (var1) {
  145.             this.this$0.accessibleContext.firePropertyChange("AccessibleState", (Object)null, AccessibleState.ENABLED);
  146.          } else {
  147.             this.this$0.accessibleContext.firePropertyChange("AccessibleState", AccessibleState.ENABLED, (Object)null);
  148.          }
  149.       }
  150.  
  151.    }
  152.  
  153.    public boolean isVisible() {
  154.       return this.this$0.isVisible();
  155.    }
  156.  
  157.    public void setVisible(boolean var1) {
  158.       boolean var2 = this.this$0.isVisible();
  159.       this.this$0.setVisible(var1);
  160.       if (var1 != var2 && this.this$0.accessibleContext != null) {
  161.          if (var1) {
  162.             this.this$0.accessibleContext.firePropertyChange("AccessibleState", (Object)null, AccessibleState.VISIBLE);
  163.          } else {
  164.             this.this$0.accessibleContext.firePropertyChange("AccessibleState", AccessibleState.VISIBLE, (Object)null);
  165.          }
  166.       }
  167.  
  168.    }
  169.  
  170.    public boolean isShowing() {
  171.       return this.this$0.isShowing();
  172.    }
  173.  
  174.    public boolean contains(Point var1) {
  175.       return this.this$0.contains(var1);
  176.    }
  177.  
  178.    public Point getLocationOnScreen() {
  179.       Object var1 = this.this$0.getTreeLock();
  180.       synchronized(var1) {
  181.          if (this.this$0.isShowing()) {
  182.             Point var5 = this.this$0.getLocationOnScreen();
  183.             return var5;
  184.          } else {
  185.             Object var2 = null;
  186.             return (Point)var2;
  187.          }
  188.       }
  189.    }
  190.  
  191.    public Point getLocation() {
  192.       return this.this$0.getLocation();
  193.    }
  194.  
  195.    public void setLocation(Point var1) {
  196.       this.this$0.setLocation(var1);
  197.    }
  198.  
  199.    public Rectangle getBounds() {
  200.       return this.this$0.getBounds();
  201.    }
  202.  
  203.    public void setBounds(Rectangle var1) {
  204.       this.this$0.setBounds(var1);
  205.    }
  206.  
  207.    public Dimension getSize() {
  208.       return this.this$0.getSize();
  209.    }
  210.  
  211.    public void setSize(Dimension var1) {
  212.       this.this$0.setSize(var1);
  213.    }
  214.  
  215.    public Accessible getAccessibleAt(Point var1) {
  216.       return null;
  217.    }
  218.  
  219.    public boolean isFocusTraversable() {
  220.       return this.this$0.isFocusTraversable();
  221.    }
  222.  
  223.    public void requestFocus() {
  224.       this.this$0.requestFocus();
  225.    }
  226.  
  227.    public void addFocusListener(FocusListener var1) {
  228.       this.this$0.addFocusListener(var1);
  229.    }
  230.  
  231.    public void removeFocusListener(FocusListener var1) {
  232.       this.this$0.removeFocusListener(var1);
  233.    }
  234.  
  235.    // $FF: synthetic method
  236.    static Component access$000(Component$AccessibleAWTComponent var0) {
  237.       return var0.this$0;
  238.    }
  239. }
  240.