Class SubstanceStripeWatermark
java.lang.Object
org.pushingpixels.substance.api.watermark.SubstanceStripeWatermark
- All Implemented Interfaces:
SubstanceTrait
,SubstanceWatermark
Simple implementation of
SubstanceWatermark
, drawing darker
even lines as watermark. This is the default watermark implementation. This
class is part of officially supported API.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes the memory associated withthis
watermark.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.Returns the display name ofthis
trait.void
previewWatermark
(Graphics g, SubstanceSkin skin, int x, int y, int width, int height) Draws the preview of the watermark image.boolean
Updates the current watermark image.
-
Constructor Details
-
SubstanceStripeWatermark
public SubstanceStripeWatermark()
-
-
Method Details
-
drawWatermarkImage
Description copied from interface:SubstanceWatermark
Draws the watermark on the specified graphics context in the specified region.- Specified by:
drawWatermarkImage
in interfaceSubstanceWatermark
- 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
Description copied from interface:SubstanceWatermark
Updates the current watermark image.- Specified by:
updateWatermarkImage
in interfaceSubstanceWatermark
- Parameters:
skin
- Skin for the watermark.- Returns:
true
if the watermark has been updated successfully,false
otherwise.
-
previewWatermark
Description copied from interface:SubstanceWatermark
Draws the preview of the watermark image.- Specified by:
previewWatermark
in interfaceSubstanceWatermark
- 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.
-
getDisplayName
Description copied from interface:SubstanceTrait
Returns the display name ofthis
trait. This method is part of officially supported API.- Specified by:
getDisplayName
in interfaceSubstanceTrait
- Returns:
- The display name of
this
trait.
-
dispose
public void dispose()Description copied from interface:SubstanceWatermark
Disposes the memory associated withthis
watermark.- Specified by:
dispose
in interfaceSubstanceWatermark
-