Modifier and Type | Field and Description |
---|---|
(package private) static int |
ARROW_DX
Arrow width
|
(package private) static int |
ARROW_DY
Arrow height
|
java.awt.Paint |
backgroundColor
Bar color
|
boolean |
hasNextBar
Whether this bar is continued on next line
|
boolean |
hasPreviousBar
Whether this bar continues on previous line
|
int |
head
Head x1 offset (from x1) if any (negative if no head is contained)
|
(package private) static int |
HEAD_DX
Head width
|
(package private) static int |
HEAD_DY
Head height
|
int |
height
Bar height (if -1, take the common bar height)
|
int |
left
Bar left
|
int |
slot
Allocated slot
|
(package private) ISource |
source
Source object
|
java.lang.String |
tag
Bar tag (relation)
|
int |
top
Bar top
|
int |
width
Bar width
|
Constructor and Description |
---|
BoxedLabel(java.awt.Rectangle rectangle,
java.awt.Paint backgroundColor,
java.lang.String tag,
int slot,
boolean hasPreviousFlag,
boolean hasNextFlag,
int head,
ISource source)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics g,
Context c)
Draw bar
|
java.awt.Rectangle |
getRectangle(int barHeight)
Get bar rectangle
|
ISource |
getSource()
Return source
|
java.lang.String |
toString() |
static final int ARROW_DX
static final int ARROW_DY
static final int HEAD_DX
static final int HEAD_DY
public final int left
public final int top
public final int width
public final int height
public final java.awt.Paint backgroundColor
public final java.lang.String tag
public final int slot
public final boolean hasNextBar
public final boolean hasPreviousBar
public final int head
final ISource source
public BoxedLabel(java.awt.Rectangle rectangle, java.awt.Paint backgroundColor, java.lang.String tag, int slot, boolean hasPreviousFlag, boolean hasNextFlag, int head, ISource source)
rectangle
- bar heightbackgroundColor
- bar background colortag
- bar tagslot
- bar's allocated slothasPreviousFlag
- Whether this bar continues previous linehasNextFlag
- Whether this bar is continued on next linehead
- Head x offset (from left) if anysource
- source objectpublic java.awt.Rectangle getRectangle(int barHeight)
getRectangle
in interface Drawable
barHeight
- bar heightpublic void draw(java.awt.Graphics g, Context c)
public java.lang.String toString()
toString
in class java.lang.Object