org.jvnet.substance.watermark
Interface SubstanceWatermark

All Superinterfaces:
SubstanceTrait
All Known Implementing Classes:
SubstanceBinaryWatermark, SubstanceBubblesWatermark, SubstanceCoffeeBeansWatermark, SubstanceCopperplateEngravingWatermark, SubstanceCrosshatchWatermark, SubstanceDiagonalGradientWatermark, SubstanceFabricWatermark, SubstanceGenericNoiseWatermark, SubstanceImageWatermark, SubstanceLatchWatermark, SubstanceMagneticFieldWatermark, SubstanceMarbleVeinWatermark, SubstanceMazeWatermark, SubstanceMetalWallWatermark, SubstanceMosaicWatermark, SubstanceNoiseWatermark, SubstanceNoneWatermark, SubstanceNullWatermark, SubstancePlanktonWatermark, SubstanceStripeWatermark, SubstanceVerticalGradientWatermark, SubstanceWoodWatermark

public interface SubstanceWatermark
extends SubstanceTrait

Interface for watermarks. This class is part of officially supported API.

Author:
Kirill Grouchnikov

Method Summary
 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.
 boolean isDependingOnTheme()
          Returns indication whether this watermark depends on the current SubstanceTheme.
 void previewWatermark(java.awt.Graphics g, int x, int y, int width, int height)
          Draws the preview of the watermark image.
 boolean updateWatermarkImage()
          Updates the current watermark image.
 

Method Detail

drawWatermarkImage

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.

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()
Updates the current watermark image.

Returns:
true if the watermark has been updated successfully, false otherwise.

getDisplayName

java.lang.String getDisplayName()
Description copied from interface: SubstanceTrait
Returns the display name of this trait. This method is part of officially supported API.

Specified by:
getDisplayName in interface SubstanceTrait
Returns:
The display name of this trait.

isDependingOnTheme

boolean isDependingOnTheme()
Returns indication whether this watermark depends on the current SubstanceTheme.

Returns:
true if this watermark depends on the current SubstanceTheme, false otherwise.

previewWatermark

void previewWatermark(java.awt.Graphics g,
                      int x,
                      int y,
                      int width,
                      int height)
Draws the preview of the watermark image.

Parameters:
g - Graphic context.
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 with this watermark.