Interface SubstanceWatermark
-
- All Superinterfaces:
SubstanceTrait
- All Known Implementing Classes:
SubstanceCrosshatchWatermark,SubstanceImageWatermark,SubstanceNullWatermark,SubstanceStripeWatermark
public interface SubstanceWatermark extends SubstanceTrait
Interface for watermarks. This class is part of officially supported API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Disposes the memory associated withthiswatermark.voiddrawWatermarkImage(Graphics graphics, Component c, int x, int y, int width, int height)Draws the watermark on the specified graphics context in the specified region.voidpreviewWatermark(Graphics g, SubstanceSkin skin, int x, int y, int width, int height)Draws the preview of the watermark image.booleanupdateWatermarkImage(SubstanceSkin skin)Updates the current watermark image.-
Methods inherited from interface org.pushingpixels.substance.api.trait.SubstanceTrait
getDisplayName
-
-
-
-
Method Detail
-
drawWatermarkImage
void drawWatermarkImage(Graphics graphics, Component c, int x, int y, int width, int height)
Draws the watermark on the specified graphics context in the specified region.- Parameters:
graphics- Graphics context.c- Component that is painted.x- Left X of the region.y- Top Y of the region.width- Region width.height- Region height.
-
updateWatermarkImage
boolean updateWatermarkImage(SubstanceSkin skin)
Updates the current watermark image.- Parameters:
skin- Skin for the watermark.- Returns:
trueif the watermark has been updated successfully,falseotherwise.
-
previewWatermark
void previewWatermark(Graphics g, SubstanceSkin skin, int x, int y, int width, int height)
Draws the preview of the watermark image.- Parameters:
g- Graphic context.skin- Optional skin to use for the preview. Can be ignored by the implementation.x- the x coordinate of the watermark to be drawn.y- The y coordinate of the watermark to be drawn.width- The width of the watermark to be drawn.height- The height of the watermark to be drawn.
-
dispose
void dispose()
Disposes the memory associated withthiswatermark.
-
-