|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.border.AbstractBorder com.jstatcom.component.MatrixBorder
public final class MatrixBorder
This border puts angular brackets [ ] around a component. It can be used to visualize a matrix or a range object. The appearance of the brackets can be configured via the constructor, but reasonable defaults are provided by static factory methods as well.
Constructor Summary | |
---|---|
MatrixBorder()
Creates the default MatrixBorder instance. |
|
MatrixBorder(int thick,
int width,
int outerTop,
int innerTop,
int outerLeft,
int innerLeft)
Creates a MatrixBorder instance according to spacing
and size parameters. |
Method Summary | |
---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Overrides super method. |
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
Reinitialize the insets parameter with this border's current insets. |
static MatrixBorder |
getInstanceSmall()
Gets a MatrixBorder that is smaller than the
default, for example to be used with default sized text fields. |
static MatrixBorder |
getInstanceThick()
Gets a MatrixBorder that is thicker than the
default. |
boolean |
isBorderOpaque()
This default implementation returns false. |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Called by the repaint manager to paint this border. |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatrixBorder()
MatrixBorder
instance.
public MatrixBorder(int thick, int width, int outerTop, int innerTop, int outerLeft, int innerLeft)
MatrixBorder
instance according to spacing
and size parameters. Instead of this constructor, the static factory
methods can be called for some reasonable variations of the default
MatrixBorder
.
thick
- border thickness, default is 1width
- width of the brackets, default is 8outerTop
- space between outer top and bracket, default is 1innerTop
- space between bracket and top of component, default is 3outerLeft
- space between outer left and bracket, default is 1innerLeft
- space between bracket and left of component, default is 3Method Detail |
---|
public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
getBorderInsets
in class javax.swing.border.AbstractBorder
c
- the component for which this border insets value applies
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
getBorderInsets
in class javax.swing.border.AbstractBorder
c
- the component for which this border insets value appliesinsets
- the object to be reinitialized
public static MatrixBorder getInstanceSmall()
MatrixBorder
that is smaller than the
default, for example to be used with default sized text fields.
public static MatrixBorder getInstanceThick()
MatrixBorder
that is thicker than the
default.
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border
isBorderOpaque
in class javax.swing.border.AbstractBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
paintBorder
in class javax.swing.border.AbstractBorder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |