Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance.watermark
Interface SubstanceWatermark

All Superinterfaces:
  SubstanceTrait

All Known Implementing Classes:
  SubstanceCrosshatchWatermark, SubstanceImageWatermark, SubstanceNoiseWatermark, SubstanceNullWatermark, SubstancePlanktonWatermark, SubstanceStripeWatermark

    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.
`void` | `previewWatermark(java.awt.Graphics g, 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 interface org.jvnet.substance.api.trait.SubstanceTrait
`getDisplayName`

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(SubstanceSkin skin)

  Updates the current watermark image.

  Parameters:
    `skin` - Skin for the watermark.
  Returns:
    `true` if the watermark has been updated successfully, `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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD