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 boundsDidChange(Rect);
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public 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();
public void willBecomeInvisible();
public void willBecomeVisibleWithBounds(Rect);
}
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()
- Constructs an empty TextAttachment.
Methods
public void setOwner(TextView aTextView)
- Set aTextView as the TextAttachment's owner (the TextView that
will display this TextAttachment).
public TextView owner()
- Returns the TextAttachment's owner.
public void setWidth(int width)
- Sets the TextAttachment's pixel width.
public int width()
- Returns the TextAttachment's pixel width.
- See Also:
- setWidth
public void setHeight(int height)
- Sets the TextAttachment's pixel height.
public int height()
- Returns the TextAttachment's pixel height.
- See Also:
- setHeight
public void drawInRect(Graphics g,
Rect boundsRect)
- Method responsible for drawing the TextAttachment's contents
within the Graphics g. boundsRect is the
TextAttachment's bounds within its owner's coordinate system.
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.
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.
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.
public void willBecomeVisibleWithBounds(Rect bounds)
- Called when the attachment is about to get visible for the first
time.
public void boundsDidChange(Rect newBounds)
- Called when the attachment bounds did change.
public void willBecomeInvisible()
- Called when the attachment is about to get removed
public void describeClassInfo(ClassInfo info)
- Describes the TextAttachment class's information.
- See Also:
- describeClassInfo
public void encode(Encoder encoder) throws CodingException
- Encodes the TextAttachment instance.
- See Also:
- encode
public void decode(Decoder decoder) throws CodingException
- Decodes the TextAttachment instance.
- See Also:
- decode
public void finishDecoding() throws CodingException
- Finishes the TextAttachment decoding.
- See Also:
- finishDecoding
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Oct 1997