public class DiagramNodeBorder
extends javax.swing.border.AbstractBorder
Constructor and Description |
---|
DiagramNodeBorder(java.awt.Insets insets)
Creates a border for a diagram node with no line color
|
DiagramNodeBorder(java.awt.Insets insets,
java.awt.Color lineColor)
Creates a border for a diagram node with a line color
|
Modifier and Type | Method and Description |
---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c)
Returns the insets for the component
|
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
Updates and returns the insets for the component
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draws the border
|
public DiagramNodeBorder(java.awt.Insets insets)
insets
- The insets for the borderpublic DiagramNodeBorder(java.awt.Insets insets, java.awt.Color lineColor)
insets
- The insets for the borderlineColor
- The color of the border linepublic 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
c
- The components to draw forg
- The grahics contextx
- The X locationy
- The Y locationwidth
- The component's widthheight
- The component's heightpublic java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
getBorderInsets
in class javax.swing.border.AbstractBorder
c
- The componentpublic java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
getBorderInsets
in class javax.swing.border.AbstractBorder
c
- The componentinsets
- The insets object