org.jvnet.substance.watermark
Class SubstanceNoneWatermark

java.lang.Object
  extended by org.jvnet.substance.watermark.SubstanceNoneWatermark
All Implemented Interfaces:
SubstanceTrait, SubstanceWatermark

public class SubstanceNoneWatermark
extends java.lang.Object
implements SubstanceWatermark

Implementation of SubstanceWatermark that paints nothing. This class is part of officially supported API.

Since:
version 3.3
Author:
Kirill Grouchnikov

Constructor Summary
SubstanceNoneWatermark()
          Simple constructor.
 
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.
static java.lang.String getName()
          Returns the name of all watermarks of this class.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubstanceNoneWatermark

public SubstanceNoneWatermark()
Simple constructor.

Method Detail

drawWatermarkImage

public void drawWatermarkImage(java.awt.Graphics graphics,
                               java.awt.Component c,
                               int x,
                               int y,
                               int width,
                               int height)
Description copied from interface: SubstanceWatermark
Draws the watermark on the specified graphics context in the specified region.

Specified by:
drawWatermarkImage in interface SubstanceWatermark
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.

previewWatermark

public void previewWatermark(java.awt.Graphics g,
                             int x,
                             int y,
                             int width,
                             int height)
Description copied from interface: SubstanceWatermark
Draws the preview of the watermark image.

Specified by:
previewWatermark in interface SubstanceWatermark
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.

updateWatermarkImage

public boolean updateWatermarkImage()
Description copied from interface: SubstanceWatermark
Updates the current watermark image.

Specified by:
updateWatermarkImage in interface SubstanceWatermark
Returns:
true if the watermark has been updated successfully, false otherwise.

getDisplayName

public 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
Specified by:
getDisplayName in interface SubstanceWatermark
Returns:
The display name of this trait.

getName

public static java.lang.String getName()
Returns the name of all watermarks of this class.

Returns:
The name of all watermarks of this class.

isDependingOnTheme

public boolean isDependingOnTheme()
Description copied from interface: SubstanceWatermark
Returns indication whether this watermark depends on the current SubstanceTheme.

Specified by:
isDependingOnTheme in interface SubstanceWatermark
Returns:
true if this watermark depends on the current SubstanceTheme, false otherwise.

dispose

public void dispose()
Description copied from interface: SubstanceWatermark
Disposes the memory associated with this watermark.

Specified by:
dispose in interface SubstanceWatermark