public class CanBorder
extends javax.swing.border.AbstractBorder
Constructor and Description |
---|
CanBorder()
Instantiates a new can border with default aspect ratio of 0.25
|
CanBorder(float aspectRatio)
Instantiates a new can border.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component comp)
Get insets for this border.
|
void |
paintBorder(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint this border aroundthe component in the given graphics context
|
public CanBorder()
public CanBorder(float aspectRatio)
aspectRatio
- the aspect ratiopublic 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 paintBorder(java.awt.Component comp, 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
comp
- the component for which this border is being paintedg
- the paint graphicsx
- the x position of the painted bordery
- the y position of the painted borderwidth
- the width of the painted borderheight
- the height of the painted border