Package adams.flow.transformer.pdfstamp
Class Image
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class Image extends AbstractPageRangeStamper
Places the image at the specified location.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-pages <adams.core.Range> (property: pages) The pages to stamp. default: first-last example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-image <adams.core.io.PlaceholderFile> (property: image) The image to use as stamp. default: ${CWD}
-x <float> (property: X) The X position. default: 0.0 minimum: 0.0
-y <float> (property: Y) The Y position. default: 0.0 minimum: 0.0
-rotation <float> (property: rotation) The rotation in degrees, counterclockwise. default: 0.0 minimum: 0.0 maximum: 360.0
-scale <float> (property: scale) The scaling factor for the image, ie, scaling it to the page dimensions; use 0 to turn scaling off. default: 1.0 minimum: 0.0 maximum: 1.0
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderFile
m_Image
the image.protected float
m_Rotation
the rotation.protected float
m_Scale
the percentage (0-1) to scale the images to.protected float
m_X
the x position.protected float
m_Y
the y position.-
Fields inherited from class adams.flow.transformer.pdfstamp.AbstractPageRangeStamper
m_Pages
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Image()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected void
doStamp(com.itextpdf.text.pdf.PdfStamper stamper, int page)
Performs the actual stamping.PlaceholderFile
getImage()
Returns the image to insert.float
getRotation()
Returns the rotation for the text.float
getScale()
Returns the scale factor (0-1) for images based on the page size.float
getX()
Returns the X position for the text.float
getY()
Returns the Y position for the text.String
globalInfo()
Returns a string describing the object.String
imageTipText()
Returns the tip text for this property.String
rotationTipText()
Returns the tip text for this property.String
scaleTipText()
Returns the tip text for this property.void
setImage(PlaceholderFile value)
Sets the image to insert.void
setRotation(float value)
Sets the rotation for the text.void
setScale(float value)
Sets the scale factor (0-1) for images based on the page size.void
setX(float value)
Sets the X position for the text.void
setY(float value)
Sets the Y position for the text.String
XTipText()
Returns the tip text for this property.String
YTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.pdfstamp.AbstractPageRangeStamper
doStamp, getPages, pagesTipText, setPages
-
Methods inherited from class adams.flow.transformer.pdfstamp.AbstractStamper
check, stamp
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Image
protected PlaceholderFile m_Image
the image.
-
m_X
protected float m_X
the x position.
-
m_Y
protected float m_Y
the y position.
-
m_Rotation
protected float m_Rotation
the rotation.
-
m_Scale
protected float m_Scale
the percentage (0-1) to scale the images to.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractPageRangeStamper
-
setImage
public void setImage(PlaceholderFile value)
Sets the image to insert.- Parameters:
value
- the image filename
-
getImage
public PlaceholderFile getImage()
Returns the image to insert.- Returns:
- the image filename
-
imageTipText
public String imageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setX
public void setX(float value)
Sets the X position for the text.- Parameters:
value
- the x position
-
getX
public float getX()
Returns the X position for the text.- Returns:
- the x position
-
XTipText
public String XTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setY
public void setY(float value)
Sets the Y position for the text.- Parameters:
value
- the y position
-
getY
public float getY()
Returns the Y position for the text.- Returns:
- the y position
-
YTipText
public String YTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRotation
public void setRotation(float value)
Sets the rotation for the text.- Parameters:
value
- the rotation (degrees counterclockwise)
-
getRotation
public float getRotation()
Returns the rotation for the text.- Returns:
- the rotation (degrees counterclockwise)
-
rotationTipText
public String rotationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setScale
public void setScale(float value)
Sets the scale factor (0-1) for images based on the page size.- Parameters:
value
- the scale factor, 0 to turn off scaling
-
getScale
public float getScale()
Returns the scale factor (0-1) for images based on the page size.- Returns:
- the scale factor
-
scaleTipText
public String scaleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doStamp
protected void doStamp(com.itextpdf.text.pdf.PdfStamper stamper, int page)
Performs the actual stamping.- Specified by:
doStamp
in classAbstractPageRangeStamper
- Parameters:
stamper
- the stamper to usepage
- the page to apply the stamp to
-
-