Modifier and Type | Field and Description |
---|---|
(package private) static int |
ARROW_DX
Arrow width
|
(package private) static int |
ARROW_DY
Arrow height
|
private java.awt.Paint |
backgroundColor
Bar color
|
private boolean |
hasNextBar
Whether this bar is continued on next line
|
private boolean |
hasPreviousBar
Whether this bar continues on previous line
|
private 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
|
private int |
height
Bar height (if -1, take the common bar height)
|
private java.awt.image.BufferedImage |
image
Image
|
private int |
left
Bar left
|
private java.awt.image.BufferedImage |
overlayImage
Image
|
private int |
slot
Allocated slot
|
private ISource |
source
Source object
|
private java.lang.String |
tag
Bar tag (relation)
|
private int |
top
Bar top
|
private int |
width
Bar width
|
Constructor and Description |
---|
Icon(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
|
private static java.awt.image.BufferedImage |
overlay(java.awt.image.BufferedImage image,
java.awt.image.BufferedImage image0) |
java.lang.String |
toString() |
static final int ARROW_DX
static final int ARROW_DY
static final int HEAD_DX
static final int HEAD_DY
private final int left
private final int top
private final int width
private final int height
private final java.awt.Paint backgroundColor
private final java.lang.String tag
private final int slot
private final boolean hasNextBar
private final boolean hasPreviousBar
private final int head
private final ISource source
private final java.awt.image.BufferedImage image
private final java.awt.image.BufferedImage overlayImage
public Icon(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)
private static java.awt.image.BufferedImage overlay(java.awt.image.BufferedImage image, java.awt.image.BufferedImage image0)
public java.lang.String toString()
toString
in class java.lang.Object