public class ItemPainter
extends java.lang.Object
Constructor and Description |
---|
ItemPainter(@Nullable java.awt.Image cursedImage,
@Nullable java.awt.Image damnedImage,
@Nullable java.awt.Image magicImage,
@Nullable java.awt.Image blessedImage,
@Nullable java.awt.Image appliedImage,
@Nullable java.awt.Image unidentifiedImage,
@Nullable java.awt.Image selectorImage,
@Nullable java.awt.Image lockedImage,
@Nullable java.awt.Image unpaidImage,
@Nullable java.awt.Image markedImage,
@Nullable java.awt.Color cursedColor,
@Nullable java.awt.Color damnedColor,
@Nullable java.awt.Color magicColor,
@Nullable java.awt.Color blessedColor,
@Nullable java.awt.Color appliedColor,
@Nullable java.awt.Color unidentifiedColor,
@Nullable java.awt.Color selectorColor,
@Nullable java.awt.Color lockedColor,
@Nullable java.awt.Color unpaidColor,
@Nullable java.awt.Color markedColor,
@NotNull java.awt.Font font,
@NotNull java.awt.Color nrofColor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull java.awt.Dimension |
getMinimumSize()
Returns the minimal size needed to display this item.
|
@NotNull ItemPainter |
newItemPainter()
Creates a new instance having the same parameters as this instance except
for the item's size.
|
void |
paint(@NotNull java.awt.Graphics2D g,
@NotNull CfItem item,
boolean selected,
@NotNull java.awt.Image face,
int w,
int h)
Paints an
CfItem . |
public ItemPainter(@Nullable @Nullable java.awt.Image cursedImage, @Nullable @Nullable java.awt.Image damnedImage, @Nullable @Nullable java.awt.Image magicImage, @Nullable @Nullable java.awt.Image blessedImage, @Nullable @Nullable java.awt.Image appliedImage, @Nullable @Nullable java.awt.Image unidentifiedImage, @Nullable @Nullable java.awt.Image selectorImage, @Nullable @Nullable java.awt.Image lockedImage, @Nullable @Nullable java.awt.Image unpaidImage, @Nullable @Nullable java.awt.Image markedImage, @Nullable @Nullable java.awt.Color cursedColor, @Nullable @Nullable java.awt.Color damnedColor, @Nullable @Nullable java.awt.Color magicColor, @Nullable @Nullable java.awt.Color blessedColor, @Nullable @Nullable java.awt.Color appliedColor, @Nullable @Nullable java.awt.Color unidentifiedColor, @Nullable @Nullable java.awt.Color selectorColor, @Nullable @Nullable java.awt.Color lockedColor, @Nullable @Nullable java.awt.Color unpaidColor, @Nullable @Nullable java.awt.Color markedColor, @NotNull @NotNull java.awt.Font font, @NotNull @NotNull java.awt.Color nrofColor)
cursedImage
- the overlay image for cursed objectsdamnedImage
- the overlay image for damned objectsmagicImage
- the overlay image for magical objectsblessedImage
- the overlay image for blessed objectsappliedImage
- the overlay image for applied objectsunidentifiedImage
- the overlay image for unidentified objectsselectorImage
- the overlay image for selected objectslockedImage
- the overlay image for locked objectsunpaidImage
- the overlay image for unpaid objectsmarkedImage
- the overlay image for marked objectscursedColor
- the background color for cursed objectsdamnedColor
- the background color for damned objectsmagicColor
- the background color for magical objectsblessedColor
- the background color for blessed objectsappliedColor
- the background color for applied objectsunidentifiedColor
- the background color for unidentified objectsselectorColor
- the background color for selected objectslockedColor
- the background color for locked objectsunpaidColor
- the background color for unpaid objectsmarkedColor
- the background color for marked objectsfont
- the font for nrof informationnrofColor
- the color for nrof information@NotNull public @NotNull ItemPainter newItemPainter()
@NotNull public @NotNull java.awt.Dimension getMinimumSize()
public void paint(@NotNull @NotNull java.awt.Graphics2D g, @NotNull @NotNull CfItem item, boolean selected, @NotNull @NotNull java.awt.Image face, int w, int h)
CfItem
.g
- the graphics instance to paint intoitem
- the itemselected
- whether the item is selectedface
- the item's facew
- the item's width in pixelh
- the item's height in pixel