java.lang.Objectjavax.swing.border.AbstractBorder
public abstract class AbstractBorder
A class that implements an empty border with no size. This provides a convenient base class from which other border classes can be easily derived.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans TM has been added to the java.beans package. Please see XMLEncoder .
Constructor Summary | |
---|---|
AbstractBorder
() |
Method Summary | |
---|---|
![]() |
![]() ![]() ![]() ![]() |
![]() ![]() |
![]() ![]() ![]() ![]() |
Insets |
getBorderInsets
(
Component
c) This default implementation returns a new Insets instance where the top, left, bottom, and right fields are set to 0. |
Insets |
getBorderInsets
(
Component
c,
Insets
insets) Reinitializes the insets parameter with this Border's current Insets. |
static Rectangle |
getInteriorRectangle
(
Component
c,
Border
b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border. |
Rectangle |
getInteriorRectangle
(
Component
c, int x, int y, int width, int height) This convenience method calls the static method. |
boolean |
isBorderOpaque
() This default implementation returns false. |
void |
paintBorder
(
Component
c,
Graphics
g, int x, int y, int width, int height) This default implementation does no painting. |
Methods inherited from class java.lang. Object |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
---|
public AbstractBorder()
Method Detail |
---|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
public Insets getBorderInsets(Component c)
public Insets getBorderInsets(Component c, Insets insets)
public boolean isBorderOpaque()
public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)
public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
public int
getBaseline
(
Component
c, int width, int height)
The default implementation returns -1. Subclasses that support baseline should override appropriately. If a value >= 0 is returned, then the component has a valid baseline for any size >= the minimum size and getBaselineResizeBehavior can be used to determine how the baseline changes with size.
public
Component.BaselineResizeBehavior
getBaselineResizeBehavior
(
Component
c)
The default implementation returns BaselineResizeBehavior.OTHER, subclasses that support baseline should override appropriately. Subclasses should never return null; if the baseline can not be calculated return BaselineResizeBehavior.OTHER. Callers should first ask for the baseline using getBaseline and if a value >= 0 is returned use this method. It is acceptable for this method to return a value other than BaselineResizeBehavior.OTHER even if getBaseline returns a value less than 0.