Package org.pushingpixels.substance.api.watermark

# Class SubstanceNullWatermark

java.lang.Object
org.pushingpixels.substance.api.watermark.SubstanceNullWatermark

All Implemented Interfaces:
  `SubstanceTrait`, `SubstanceWatermark`

public class SubstanceNullWatermark extends Object implements SubstanceWatermark
Implementation of `SubstanceWatermark` that paints a translucent fill (with no pattern). This class is part of officially supported API.

## Constructor Summary

Constructors
Constructor
Description
`SubstanceNullWatermark()`
Simple constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
Disposes the memory associated with `this` 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.
`String`
`getDisplayName()`
Returns the display name of `this` trait.
`void`
`previewWatermark(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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SubstanceNullWatermark

public SubstanceNullWatermark()
Simple constructor.

## Method Details

### drawWatermarkImage

public void drawWatermarkImage(Graphics graphics, 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(Graphics g, SubstanceSkin skin, 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.
  `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.

### updateWatermarkImage

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

Specified by:
  `updateWatermarkImage` in interface `SubstanceWatermark`
Parameters:
  `skin` - Skin for the watermark.
Returns:
  `true` if the watermark has been updated successfully, `false` otherwise.

### getDisplayName

public 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.

### dispose

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

Specified by:
  `dispose` in interface `SubstanceWatermark`