|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.swing.LabelSausage
public abstract class LabelSausage
An abstract lightweight renderer that sizes and renders a label (with optional icon) in a roundy-ended sausage.
| Field Summary | |
|---|---|
protected int |
_dia
The diameter of the circle that perfectly surrounds our icon. |
protected Icon |
_icon
The optional icon. |
protected Label |
_label
The label. |
protected int |
_lxoff
The x offset for the label. |
protected int |
_lyoff
The y offset for the label. |
protected Dimension |
_size
The size of this label sausage. |
protected int |
_xoff
The x offset of the icon. |
protected int |
_yoff
The y offset of the icon. |
| Constructor Summary | |
|---|---|
protected |
LabelSausage(Label label,
Icon icon)
Constructs a label sausage. |
| Method Summary | |
|---|---|
protected void |
drawBase(Graphics2D gfx,
int x,
int y)
Draws the base sausage within which all the other decorations are added. |
protected void |
drawBorder(Graphics2D gfx,
int x,
int y)
Draws the black outer border. |
protected void |
drawExtras(Graphics2D gfx,
int x,
int y,
Object cliData)
Draws any extras that may be required. |
protected void |
drawIcon(Graphics2D gfx,
int x,
int y,
Object cliData)
Draws the icon, if applicable. |
protected void |
drawLabel(Graphics2D gfx,
int x,
int y)
Draws the label. |
protected void |
layout(Graphics2D gfx,
int extraPadding)
Lays out the label sausage. |
protected void |
layout(Graphics2D gfx,
int iconPadding,
int extraPadding)
Lays out the label sausage. |
protected void |
paint(Graphics2D gfx,
int x,
int y,
Color background,
Object cliData)
Paints the label sausage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Label _label
protected Icon _icon
protected Dimension _size
protected int _dia
protected int _xoff
protected int _yoff
protected int _lyoff
protected int _lxoff
| Constructor Detail |
|---|
protected LabelSausage(Label label,
Icon icon)
| Method Detail |
|---|
protected void layout(Graphics2D gfx,
int extraPadding)
protected void layout(Graphics2D gfx,
int iconPadding,
int extraPadding)
iconPadding - the number of pixels in the x direction to pad
around the icon.
protected void paint(Graphics2D gfx,
int x,
int y,
Color background,
Object cliData)
protected void drawBase(Graphics2D gfx,
int x,
int y)
protected void drawIcon(Graphics2D gfx,
int x,
int y,
Object cliData)
protected void drawLabel(Graphics2D gfx,
int x,
int y)
protected void drawBorder(Graphics2D gfx,
int x,
int y)
protected void drawExtras(Graphics2D gfx,
int x,
int y,
Object cliData)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||