| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EmptyBorder eb = new EmptyBorder(5, 5, 5, 5);
Based on 35 examples
public class EmptyBorder extends AbstractBorder implements Serializable
A class which provides an empty, transparent border which takes up space but does no drawing.
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 JavaBeansTM
has been added to the java.beans
package.
Please see {@link java.beans.XMLEncoder}.
Field Summary | |
---|---|
protected int |
bottom
|
protected int |
left
|
protected int |
right
|
protected int |
top
|
Constructor Summary | |
---|---|
EmptyBorder(Insets borderInsets) Creates an empty border with the specified insets. |
|
EmptyBorder(int top, int left, int bottom, int right) Creates an empty border with the specified insets. |
Method Summary | |
---|---|
Insets |
Returns the insets of the border. |
Insets |
Returns the insets of the border. |
Insets |
getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets. |
boolean |
Returns whether or not the border is opaque. |
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height) Does no drawing by default. |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque, paintBorder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int bottom
protected int left
protected int right
protected int top
Constructor Detail |
---|
public EmptyBorder(Insets borderInsets)
borderInsets
- the insets of the borderpublic EmptyBorder(int top, int left, int bottom, int right)
top
- the top inset of the borderleft
- the left inset of the borderbottom
- the bottom inset of the borderright
- the right inset of the borderMethod Detail |
---|
public Insets getBorderInsets()
public Insets getBorderInsets(Component c)
getBorderInsets
in class AbstractBorder
c
- the component for which this border insets value appliespublic Insets getBorderInsets(Component c, Insets insets)
getBorderInsets
in class AbstractBorder
c
- the component for which this border insets value appliesinsets
- the object to be reinitializedpublic boolean isBorderOpaque()
isBorderOpaque
in class AbstractBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in class AbstractBorder
c
g
x
y
width
height
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |