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 TypeMethodDescriptionvoiddispose()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.Returns the display name ofthistrait.voidpreviewWatermark(Graphics g, SubstanceSkin skin, int x, int y, int width, int height) Draws the preview of the watermark image.booleanUpdates the current watermark image.
-
Constructor Details
-
SubstanceStripeWatermark
public SubstanceStripeWatermark()
-
-
Method Details
-
drawWatermarkImage
Description copied from interface:SubstanceWatermarkDraws the watermark on the specified graphics context in the specified region.- Specified by:
drawWatermarkImagein 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:SubstanceWatermarkUpdates the current watermark image.- Specified by:
updateWatermarkImagein interfaceSubstanceWatermark- Parameters:
skin- Skin for the watermark.- Returns:
trueif the watermark has been updated successfully,falseotherwise.
-
previewWatermark
Description copied from interface:SubstanceWatermarkDraws the preview of the watermark image.- Specified by:
previewWatermarkin 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:SubstanceTraitReturns the display name ofthistrait. This method is part of officially supported API.- Specified by:
getDisplayNamein interfaceSubstanceTrait- Returns:
- The display name of
thistrait.
-
dispose
public void dispose()Description copied from interface:SubstanceWatermarkDisposes the memory associated withthiswatermark.- Specified by:
disposein interfaceSubstanceWatermark
-