public class MatrixBorder
extends javax.swing.border.AbstractBorder
Modifier and Type | Field and Description |
---|---|
static int |
BRACKETS
Constant for a square bracket ('[' shaped) border type.
|
static int |
BRACKETS_LEFT_DETERMINANT_RIGHT
Constant for a mixed border type (bracket border left, vertical line border right).
|
static double |
CONTROL_POINT_FACTOR
Constant for fine tuning of control point's location.
|
static int |
DETERMINANT
Constant for a vertical line border type (like used in determinants).
|
static int |
DETERMINANT_LEFT_BRACKETS_RIGHT
Constant for a mixed border type (vertical line border left, bracket border right).
|
static int |
LEFT_AND_RIGHT_BORDER |
static int |
NO_BORDER
Constant for an empty border type.
|
static int |
ONLY_LEFT_BORDER |
static int |
ONLY_RIGHT_BORDER |
static int |
PARENTHESES
Constant for a parentheses ('(' shaped) border type.
|
Constructor and Description |
---|
MatrixBorder(java.awt.Component component,
int borderType)
Creates a new MMMatrixBorder object for the given component
c
and the defined border type. |
MatrixBorder(java.awt.Component component,
int borderType,
int showBorders) |
Modifier and Type | Method and Description |
---|---|
java.awt.Insets |
getBorderInsets()
Returns (a copy of) the insets of the border.
|
java.awt.Insets |
getBorderInsets(java.awt.Component comp)
Returns (a copy of) the insets of the border.
|
int |
getBorderType()
Returns the border type of this matrix panel (square, determinant style, etc.).
|
java.awt.Color |
getBracketColor()
Returns (a copy of) the color of the components "bracket".
|
int |
getShowBorders()
Returns if the (left, right) border is visible.
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the border of the component
c . |
void |
setBorderInsets(java.awt.Insets insets)
Sets the border size to 'insets'.
|
void |
setBorderType(int i)
Sets the border type of this matrix panel (square, determinant style, etc.).
|
void |
setBracketColor(java.awt.Color curveColor)
Sets the color of the component's "bracket".
|
void |
setShowBorders(int showBorders)
Sets if the (left, right) border is visible.
|
public static final int NO_BORDER
public static final int PARENTHESES
public static final int BRACKETS
public static final int DETERMINANT
public static final int BRACKETS_LEFT_DETERMINANT_RIGHT
public static final int DETERMINANT_LEFT_BRACKETS_RIGHT
public static final int LEFT_AND_RIGHT_BORDER
public static final int ONLY_LEFT_BORDER
public static final int ONLY_RIGHT_BORDER
public static final double CONTROL_POINT_FACTOR
public MatrixBorder(java.awt.Component component, int borderType)
c
and the defined border type.NO_BORDER
,
PARENTHESES
,
BRACKETS
,
DETERMINANT
public MatrixBorder(java.awt.Component component, int borderType, int showBorders)
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
c
. This method is
called internally by java and draws the border of the component c
using the Graphicsobject g
. x,y,width and height are not
used!paintBorder
in interface javax.swing.border.Border
paintBorder
in class javax.swing.border.AbstractBorder
public void setShowBorders(int showBorders)
public int getShowBorders()
public void setBracketColor(java.awt.Color curveColor)
public java.awt.Color getBracketColor()
public java.awt.Insets getBorderInsets()
public java.awt.Insets getBorderInsets(java.awt.Component comp)
getBorderInsets
in interface javax.swing.border.Border
getBorderInsets
in class javax.swing.border.AbstractBorder
comp
- the component for which this border insets value appliespublic void setBorderInsets(java.awt.Insets insets)
public int getBorderType()
public void setBorderType(int i)
Further documentation and examples can be found under www.mathletfactory.de.