Class ItemPainter
java.lang.Object
com.realtime.crossfire.jxclient.gui.item.ItemPainter
Paints Crossfire item images.
-
Constructor Summary
ConstructorsConstructorDescriptionItemPainter(@Nullable Image cursedImage, @Nullable Image damnedImage, @Nullable Image magicImage, @Nullable Image blessedImage, @Nullable Image appliedImage, @Nullable Image unidentifiedImage, @Nullable Image selectorImage, @Nullable Image lockedImage, @Nullable Image unpaidImage, @Nullable Image markedImage, @Nullable Color cursedColor, @Nullable Color damnedColor, @Nullable Color magicColor, @Nullable Color blessedColor, @Nullable Color appliedColor, @Nullable Color unidentifiedColor, @Nullable Color selectorColor, @Nullable Color lockedColor, @Nullable Color unpaidColor, @Nullable Color markedColor, @NotNull Font font, @NotNull Color nrofColor) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription@NotNull DimensionReturns the minimal size needed to display this item.@NotNull ItemPainterCreates a new instance having the same parameters as this instance except for the item's size.voidpaint(@NotNull Graphics2D g, @NotNull CfItem item, boolean selected, @NotNull Image face, int w, int h) Paints anCfItem.
-
Constructor Details
-
ItemPainter
public ItemPainter(@Nullable @Nullable Image cursedImage, @Nullable @Nullable Image damnedImage, @Nullable @Nullable Image magicImage, @Nullable @Nullable Image blessedImage, @Nullable @Nullable Image appliedImage, @Nullable @Nullable Image unidentifiedImage, @Nullable @Nullable Image selectorImage, @Nullable @Nullable Image lockedImage, @Nullable @Nullable Image unpaidImage, @Nullable @Nullable Image markedImage, @Nullable @Nullable Color cursedColor, @Nullable @Nullable Color damnedColor, @Nullable @Nullable Color magicColor, @Nullable @Nullable Color blessedColor, @Nullable @Nullable Color appliedColor, @Nullable @Nullable Color unidentifiedColor, @Nullable @Nullable Color selectorColor, @Nullable @Nullable Color lockedColor, @Nullable @Nullable Color unpaidColor, @Nullable @Nullable Color markedColor, @NotNull @NotNull Font font, @NotNull @NotNull 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 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
-
-
Method Details
-
newItemPainter
Creates a new instance having the same parameters as this instance except for the item's size.- Returns:
- the new instance
-
getMinimumSize
Returns the minimal size needed to display this item.- Returns:
- the minimal size
-
paint
public void paint(@NotNull @NotNull Graphics2D g, @NotNull @NotNull CfItem item, boolean selected, @NotNull @NotNull 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
-