public class SubstanceCrosshatchWatermark extends java.lang.Object implements SubstanceWatermark
SubstanceWatermark, drawing cross hatches as
watermark. This implementation is inspired by Office 12 background. This
class is part of officially supported API.| Constructor and Description |
|---|
SubstanceCrosshatchWatermark() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the memory associated with
this watermark. |
void |
drawWatermarkImage(java.awt.Graphics graphics,
java.awt.Component c,
int x,
int y,
int width,
int height)
Draws the watermark on the specified graphics context in the specified
region.
|
java.lang.String |
getDisplayName()
Returns the display name of
this trait. |
static java.lang.String |
getName()
Returns the name of all watermarks of
this class. |
void |
previewWatermark(java.awt.Graphics g,
SubstanceSkin skin,
int x,
int y,
int width,
int height)
Draws the preview of the watermark image.
|
boolean |
updateWatermarkImage(SubstanceSkin skin)
Updates the current watermark image.
|
public void drawWatermarkImage(java.awt.Graphics graphics,
java.awt.Component c,
int x,
int y,
int width,
int height)
SubstanceWatermarkdrawWatermarkImage in interface SubstanceWatermarkgraphics - 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.public boolean updateWatermarkImage(SubstanceSkin skin)
SubstanceWatermarkupdateWatermarkImage in interface SubstanceWatermarkskin - Skin for the watermark.true if the watermark has been updated successfully,
false otherwise.public void previewWatermark(java.awt.Graphics g,
SubstanceSkin skin,
int x,
int y,
int width,
int height)
SubstanceWatermarkpreviewWatermark in interface SubstanceWatermarkg - 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.public java.lang.String getDisplayName()
SubstanceTraitthis trait. This method is part
of officially supported API.getDisplayName in interface SubstanceTraitthis trait.public static java.lang.String getName()
this class.this class.public void dispose()
SubstanceWatermarkthis watermark.dispose in interface SubstanceWatermark