Class EmptyBorder
All Packages Class Hierarchy This Package Previous Next Index
Class EmptyBorder
public class netscape.application.EmptyBorder
extends netscape.application.Border
{
/* Constructors
*/
public EmptyBorder();
/* Methods
*/
public static Border emptyBorder();
public int bottomMargin();
public void decode(Decoder);
public void drawInRect(Graphics, int, int, int, int);
public int leftMargin();
public int rightMargin();
public int topMargin();
}
Border subclass with a zero margin border that draws nothing. EmptyBorders
act as placeholders for classes that take Borders but do not
want to check for null everywhere. As such, only implementors of
classes with Borders usually deal with this class. A typical application
removes a Border from an interface component by calling
setBorder(null), which the component may note by setting its Border
to an EmptyBorder instance.
Constructors
EmptyBorder
public EmptyBorder()
- Constructs an EmptyBorder.
Methods
emptyBorder
public static Border emptyBorder()
- Convenience method for retrieving the shared EmptyBorder.
leftMargin
public int leftMargin()
- Returns the EmptyBorder's left margin of 0 pixels.
- Overrides:
- leftMargin in class Border
rightMargin
public int rightMargin()
- Returns the EmptyBorder's right margin of 0 pixels.
- Overrides:
- rightMargin in class Border
topMargin
public int topMargin()
- Returns the EmptyBorder's top margin of 0 pixels.
- Overrides:
- topMargin in class Border
bottomMargin
public int bottomMargin()
- Returns the EmptyBorder's bottom margin of 0 pixels.
- Overrides:
- bottomMargin in class Border
drawInRect
public void drawInRect(Graphics g,
int x,
int y,
int width,
int height)
- Draws the EmptyBorder. This method does nothing.
- Overrides:
- drawInRect in class Border
decode
public void decode(Decoder decoder) throws CodingException
- Empty Borders store no additional state, but implement decode()
to replace themselves with the shared EmptyBorder instance, provided
they are not a subclass of EmptyBorder.
- Overrides:
- decode in class Border
- See Also:
- decode
All Packages Class Hierarchy This Package Previous Next Index