Class TextAttachment
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class TextAttachment

public abstract class netscape.application.TextAttachment
    extends java.lang.Object
    implements netscape.util.Codable
{
    /* Constructors
     */
    public TextAttachment();

    /* Methods
     */
    public void TextAttachment();
    public void decode(Decoder);
    public void describeClassInfo(ClassInfo);
    public abstract void drawInRect(Graphics, Rect);
    public void encode(Encoder);
    public void finishDecoding();
    public int height();
    public boolean mouseDown(MouseEvent);
    public void mouseDragged(MouseEvent);
    public void mouseUp(MouseEvent);
    public TextView owner();
    public void setHeight(int);
    public void setOwner(TextView);
    public void setWidth(int);
    public int width();
}
Abstract object subclass for placing items (Images, controls, and so on) among a TextView's characters. Use ImageAttachment to display an Image. Subclass TextAttachment for anything else.
See Also:
ImageAttachment

Constructors

TextAttachment

  public TextAttachment()

Methods

TextAttachment

  public void TextAttachment()
Constructs an empty TextAttachment.

setOwner

  public void setOwner(TextView aTextView)
Set aTextView as the TextAttachment's owner (the TextView that will display this TextAttachment).

owner

  public TextView owner()
Returns the TextAttachment's owner.

setWidth

  public void setWidth(int width)
Sets the TextAttachment's pixel width.

width

  public int width()
Returns the TextAttachment's pixel width.
See Also:
setWidth

setHeight

  public void setHeight(int height)
Sets the TextAttachment's pixel height.

height

  public int height()
Returns the TextAttachment's pixel height.
See Also:
setHeight

drawInRect

  public abstract void drawInRect(Graphics g,
                                  Rect boundsRect)
Abstract method responsible for drawing the TextAttachment's contents within the Graphics g. boundsRect is the TextAttachment's bounds within its owner's coordinate system.

mouseDown

  public boolean mouseDown(MouseEvent event)
Called by the TextAttachment's owner when the user clicks within the TextAttachment. This method should return false if the TextAttachment isn't interested in the event, true otherwise.

mouseDragged

  public void mouseDragged(MouseEvent event)
Called by the TextAttachment's owner as the user drags the mouse after having clicked within the TextAttachment. Only called if mouseDown() returned true.

mouseUp

  public void mouseUp(MouseEvent event)
Called by the TextAttachment's owner when the user releases the mouse after having clicked within the TextAttachment. Only called if mouseDown() returned true.

describeClassInfo

  public void describeClassInfo(ClassInfo info)
Describes the TextAttachment class's information.
See Also:
describeClassInfo

encode

  public void encode(Encoder encoder) throws CodingException
Encodes the TextAttachment instance.
See Also:
encode

decode

  public void decode(Decoder decoder) throws CodingException
Decodes the TextAttachment instance.
See Also:
decode

finishDecoding

  public void finishDecoding() throws CodingException
Finishes the TextAttachment decoding.
See Also:
finishDecoding

All Packages  Class Hierarchy  This Package  Previous  Next  Index