|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.border.AbstractBorder
edu.princeton.swing.PHyperlink.UnderlineBorder
public static class PHyperlink.UnderlineBorder
UnderlineBorder is a simple subclass of AbstractBorder that draws an underline.
Constructor Summary | |
---|---|
PHyperlink.UnderlineBorder(Color color,
int pad,
int thickness)
Creates a new UnderlineBorder. |
Method Summary | |
---|---|
Insets |
getBorderInsets(Component c)
Returns the insets of the border. |
Insets |
getBorderInsets(Component c,
Insets insets)
Reinitialize the insets parameter with this Border's current Insets. |
Color |
getColor()
Returns the color of the border. |
int |
getPad()
Returns the number of pixels of transparent space before the underline. |
int |
getThickness()
Returns the thickness of the underline. |
boolean |
isBorderOpaque()
Returns whether or not the border is opaque. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified position and size. |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PHyperlink.UnderlineBorder(Color color, int pad, int thickness)
color
- The color of the border. If null is passed, the underline will be drawn
with the Component's foreground color.pad
- The number of pixels of transparent space before the underline. Negative
values will result in an IllegalArgumentException.thickness
- The thickness of the underline. Negative values will result in an
IllegalArgumentException.Method Detail |
---|
public Color getColor()
public int getPad()
public int getThickness()
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
paintBorder
in class AbstractBorder
public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
getBorderInsets
in class AbstractBorder
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets
in class AbstractBorder
public boolean isBorderOpaque()
isBorderOpaque
in interface Border
isBorderOpaque
in class AbstractBorder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |