Class Border
All Packages Class Hierarchy This Package Previous Next Index
Class Border
public abstract class netscape.application.Border
extends java.lang.Object
implements netscape.util.Codable
{
/* Constructors
*/
public Border();
/* Methods
*/
public abstract int bottomMargin();
public void computeInteriorRect(int, int, int, int, Rect);
public void computeInteriorRect(Rect, Rect);
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public abstract void drawInRect(Graphics, int, int, int, int);
public void drawInRect(Graphics, Rect);
public void encode(Encoder);
public void finishDecoding();
public int heightMargin();
public Rect interiorRect(int, int, int, int);
public Rect interiorRect(Rect);
public abstract int leftMargin();
public abstract int rightMargin();
public abstract int topMargin();
public int widthMargin();
}
Abstract Object subclass responsible for drawing the adornments around many
user interface components. By implementing the five primitive Border
methods, you can create additional Border styles and use them with any
component that accepts Borders. Use the provided convenience methods to
compute often used quantities of a particular Border, such as its
interior rectangle.
Constructors
Border
public Border()
Methods
leftMargin
public abstract int leftMargin()
- Primitive method that returns the width of the Border's left side.
rightMargin
public abstract int rightMargin()
- Primitive method that returns the width of the Border's right side.
topMargin
public abstract int topMargin()
- Primitive method that returns the height of the Border's top side.
bottomMargin
public abstract int bottomMargin()
- Primitive method that returns the height of the Border's bottom side.
drawInRect
public abstract void drawInRect(Graphics g,
int x,
int y,
int width,
int height)
- Primitive method for drawing the Border in the specified rectangle.
drawInRect
public void drawInRect(Graphics g,
Rect rect)
- Convenience method for drawing the Border in the Rect rect.
Equivalent to the code:
drawInRect(g, rect.x, rect.y, rect.width, rect.height);
widthMargin
public int widthMargin()
- Returns the Border's width margin, the sum of leftMargin()
and rightMargin().
- See Also:
- leftMargin, rightMargin
heightMargin
public int heightMargin()
- Returns the Border's height margin, the sum of topMargin()
and bottomMargin().
- See Also:
- topMargin, bottomMargin
computeInteriorRect
public void computeInteriorRect(int x,
int y,
int width,
int height,
Rect interiorRect)
- Computes the Border's interior Rect using the primitive margin
methods and the coordinates of the given rectangle. Places the results
in interiorRect.
computeInteriorRect
public void computeInteriorRect(Rect rect,
Rect interiorRect)
- Computes the Border's interior Rect using the primitive margin
methods and the coordinates of the Rect rect. Places the
results in interiorRect.
interiorRect
public Rect interiorRect(int x,
int y,
int width,
int height)
- Computes the Border's interior rectangle using the primitive margin
methods and the coordinates of the given rectangle. Returns the
interior Rect.
interiorRect
public Rect interiorRect(Rect rect)
- Computes the Border's interior rectangle using the primitive margin
methods and the coordinates of the Rect rect. Returns the
interior Rect.
describeClassInfo
public void describeClassInfo(ClassInfo info)
- Defined so that Borders are Codable. Stateless Borders need not
override.
- See Also:
- describeClassInfo
encode
public void encode(Encoder encoder) throws CodingException
- Defined so that Borders are Codable. Stateless Borders need not
override.
- See Also:
- encode
decode
public void decode(Decoder decoder) throws CodingException
- Defined so that Borders are Codable. Stateless Borders need not
override.
- See Also:
- decode
finishDecoding
public void finishDecoding() throws CodingException
- Defined so that Borders are Codable. Stateless Borders need not
override.
- See Also:
- finishDecoding
All Packages Class Hierarchy This Package Previous Next Index