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 boundsDidChange(Rect); *Beta API*
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(); *Beta API*
public void willBecomeVisibleWithBounds(Rect); *Beta API*
}
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 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.
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.
willBecomeVisibleWithBounds
public void willBecomeVisibleWithBounds(Rect bounds) *Beta API*
- Called when the attachment is about to get visible for the first
time.
boundsDidChange
public void boundsDidChange(Rect newBounds) *Beta API*
- Called when the attachment bounds did change.
willBecomeInvisible
public void willBecomeInvisible() *Beta API*
- Called when the attachment is about to get removed
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
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Apr 1997