home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Java / netscape / application / TextAttachment.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-12  |  2.8 KB  |  105 lines

  1. package netscape.application;
  2.  
  3. import netscape.util.ClassInfo;
  4. import netscape.util.Codable;
  5. import netscape.util.CodingException;
  6. import netscape.util.Decoder;
  7. import netscape.util.Encoder;
  8.  
  9. public abstract class TextAttachment implements Codable {
  10.    private TextView _owner;
  11.    private int _width;
  12.    private int _height;
  13.    private boolean _visible = false;
  14.    static final String OWNER_KEY = "owner";
  15.    static final String WIDTH_KEY = "width";
  16.    static final String HEIGHT_KEY = "height";
  17.  
  18.    public void TextAttachment() {
  19.       this._owner = null;
  20.       this._width = this._height = 0;
  21.    }
  22.  
  23.    public void setOwner(TextView var1) {
  24.       this._owner = var1;
  25.    }
  26.  
  27.    public TextView owner() {
  28.       return this._owner;
  29.    }
  30.  
  31.    public void setWidth(int var1) {
  32.       this._width = var1;
  33.    }
  34.  
  35.    public int width() {
  36.       return this._width;
  37.    }
  38.  
  39.    public void setHeight(int var1) {
  40.       this._height = var1;
  41.    }
  42.  
  43.    public int height() {
  44.       return this._height;
  45.    }
  46.  
  47.    public void drawInRect(Graphics var1, Rect var2) {
  48.    }
  49.  
  50.    public boolean mouseDown(MouseEvent var1) {
  51.       return false;
  52.    }
  53.  
  54.    public void mouseDragged(MouseEvent var1) {
  55.    }
  56.  
  57.    public void mouseUp(MouseEvent var1) {
  58.    }
  59.  
  60.    public void willBecomeVisibleWithBounds(Rect var1) {
  61.    }
  62.  
  63.    public void boundsDidChange(Rect var1) {
  64.    }
  65.  
  66.    public void willBecomeInvisible() {
  67.    }
  68.  
  69.    public void describeClassInfo(ClassInfo var1) {
  70.       var1.addClass("netscape.application.TextAttachment", 1);
  71.       var1.addField("owner", (byte)18);
  72.       var1.addField("width", (byte)8);
  73.       var1.addField("height", (byte)8);
  74.    }
  75.  
  76.    public void encode(Encoder var1) throws CodingException {
  77.       var1.encodeObject("owner", this._owner);
  78.       var1.encodeInt("width", this._width);
  79.       var1.encodeInt("height", this._height);
  80.    }
  81.  
  82.    public void decode(Decoder var1) throws CodingException {
  83.       this._owner = (TextView)var1.decodeObject("owner");
  84.       this._width = var1.decodeInt("width");
  85.       this._height = var1.decodeInt("height");
  86.    }
  87.  
  88.    public void finishDecoding() throws CodingException {
  89.    }
  90.  
  91.    void _willShowWithBounds(Rect var1) {
  92.       if (this._visible) {
  93.          this.boundsDidChange(var1);
  94.       } else {
  95.          this.willBecomeVisibleWithBounds(var1);
  96.          this._visible = true;
  97.       }
  98.    }
  99.  
  100.    void _willHide() {
  101.       this.willBecomeInvisible();
  102.       this._visible = false;
  103.    }
  104. }
  105.