|
Oracle Outside In Java API Reference 8.5.4 E91699-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.oracle.outsidein.options.Watermark
public class Watermark
Describes a watermark image and its associated attributes.
OptionsCache.getWatermark()
, OptionsCache.setWatermark(Watermark)
Nested Class Summary | |
---|---|
static class |
Watermark.AnchorPosition Indicates the starting location of the watermark image, and all offsets will be with respect to this anchor position. |
static class |
Watermark.ScaleModeValue Indicates the method of scaling the watermark image. |
Constructor Summary | |
---|---|
Watermark() Create a disabled Watermark object. |
|
Watermark(java.io.File file) Create a Watermark object using the specified image file and opacity. |
|
Watermark(java.io.File file, int opacity, int percent, Watermark.AnchorPosition anchor, int vertOffset, int horzOffset) Create a Watermark object using the specified image file, opacity, and offsets. |
|
Watermark(SeekableByteChannel6 redirect) Create a Watermark object using the specified redirected IO object and opacity. |
|
Watermark(SeekableByteChannel6 redirect, int opacity, int percent, Watermark.AnchorPosition anchor, int vertOffset, int horzOffset) Create a Watermark object using the specified image file, opacity, and offsets. |
Method Summary | |
---|---|
Watermark.AnchorPosition |
getAnchorPosition() Obtains the position at which the watermark image is anchored. |
int |
getHorzOffset() Obtains the horizontal distance, in twips, to move the watermark from the center. |
int |
getOpacity() Obtains the opacity of the watermark as a value between 0 and 255, inclusive. |
int |
getPercent() Obtains the scaling value of the watermark image as a percentage of the destination page size. |
int |
getVertOffset() Obtains the vertical distance, in twips, to move the watermark from the center. |
void |
setAnchorPosition(Watermark.AnchorPosition position) Specifies the position on each page where the watermark image is anchored. |
void |
setHorzOffset(int offset) Specifies the horizontal distance, in twips, to move the watermark from the center. |
void |
setOpacity(int opacity) Specifies the opacity of the watermark as a value between 0 and 255, inclusive. |
void |
setPercent(int percent) Specifies the scaling value of the watermark image as a percentage of the destination page size. |
void |
setVertOffset(int offset) Specifies the vertical distance, in twips, to move the watermark from the center. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Watermark()
Watermark
object. This can be used to disable watermarks.public Watermark(java.io.File file) throws OutsideInException
Watermark
object using the specified image file and opacity.
file
- the image file between 0 and 255 inclusive (0 is disabled and 255 is fully opaque)OutsideInException
public Watermark(SeekableByteChannel6 redirect) throws OutsideInException
Watermark
object using the specified redirected IO object and opacity.
redirect
- the redirected IO object containing the image between 0 and 255 inclusive (0 is disabled and 255 is fully opaque)OutsideInException
public Watermark(java.io.File file, int opacity, int percent, Watermark.AnchorPosition anchor, int vertOffset, int horzOffset) throws OutsideInException
Watermark
object using the specified image file, opacity, and offsets.
file
- the image fileopacity
- the opacity of the watermark image as an integer between 0 and 255 inclusive (0 is disabled and 255 is fully opaquepercent
- the scaling value of the watermark image as a percentage of the destination page sizeanchor
- the position on each page where the watermark image is anchoredvertOffset
- the vertical offset from center, in twips (negative values correspond to below center, and positive values correspond to above center)horzOffset
- the horizontal offset from center, in twips (negative values correspond to left of center, and positive values correspond to right of center)OutsideInException
public Watermark(SeekableByteChannel6 redirect, int opacity, int percent, Watermark.AnchorPosition anchor, int vertOffset, int horzOffset) throws OutsideInException
Watermark
object using the specified image file, opacity, and offsets.
redirect
- the redirected I/O object referencing the watermark imageopacity
- the opacity of the watermark image as an integer between 0 and 255 inclusive (0 is disabled and 255 is fully opaquepercent
- the scaling value of the watermark image as a percentage of the destination page sizeanchor
- the position on each page where the watermark image is anchoredvertOffset
- the vertical offset from center, in twips (negative values correspond to below center, and positive values correspond to above center)horzOffset
- the horizontal offset from center, in twips (negative values correspond to left of center, and positive values correspond to right of center)OutsideInException
Method Detail |
---|
public int getOpacity()
public void setOpacity(int opacity) throws OutsideInException
opacity
- the opacity valueOutsideInException
public int getPercent()
Watermark.ScaleModeValue.PERCENT
.public void setPercent(int percent)
Watermark.ScaleModeValue.PERCENT
except if the percent value is set to 0, then the scaling method is set to Watermark.ScaleModeValue.NOSCALING
percent
- the scaling valuepublic Watermark.AnchorPosition getAnchorPosition()
public void setAnchorPosition(Watermark.AnchorPosition position)
position
- the position on each pagepublic int getVertOffset()
public void setVertOffset(int offset)
offset
- the offset value in twipspublic int getHorzOffset()
public void setHorzOffset(int offset)
offset
- the offset value in twips
|
Oracle Outside In Java API Reference 8.5.4 E91699-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |