Class ItemPainter
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.item.ItemPainter
-
public class ItemPainter extends java.lang.ObjectPaints Crossfire item images.
-
-
Constructor Summary
Constructors Constructor 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.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, @NotNull java.awt.Font font, @NotNull java.awt.Color nrofColor)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.awt.DimensiongetMinimumSize()Returns the minimal size needed to display this item.@NotNull ItemPainternewItemPainter()Creates a new instance having the same parameters as this instance except for the item's size.voidpaint(@NotNull java.awt.Graphics2D g, @NotNull CfItem item, boolean selected, @NotNull java.awt.Image face, int w, int h)Paints anCfItem.
-
-
-
Constructor Detail
-
ItemPainter
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.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, @NotNull @NotNull java.awt.Font font, @NotNull @NotNull java.awt.Color nrofColor)Creates a new instance.- Parameters:
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 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 objectsfont- the font for nrof informationnrofColor- the color for nrof information
-
-
Method Detail
-
newItemPainter
@NotNull public @NotNull ItemPainter newItemPainter()
Creates a new instance having the same parameters as this instance except for the item's size.- Returns:
- the new instance
-
getMinimumSize
@NotNull public @NotNull java.awt.Dimension getMinimumSize()
Returns the minimal size needed to display this item.- Returns:
- the minimal size
-
paint
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)Paints anCfItem.- Parameters:
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
-
-