Class Rectangle
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.pdfproclet.AbstractPdfProclet
-
- adams.flow.transformer.pdfproclet.Rectangle
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,PdfProclet
,PdfProcletWithVariableFileExtension
,Serializable
public class Rectangle extends AbstractPdfProclet implements PdfProcletWithVariableFileExtension
Draws a rectangle.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-regexp-filename <adams.core.base.BaseRegExp> (property: regExpFilename) The regular expression that the filename must match. default: .*
-extension <adams.core.base.BaseString> [-extension ...] (property: extensions) The file extension(s) that the processor will be used for. default: *
-x <float> (property: X) The absolute X position. default: 0.0 minimum: 0.0
-y <float> (property: Y) The absolute Y position. default: 0.0 minimum: 0.0
-width <float> (property: width) The width. default: 10.0 minimum: 0.001
-height <float> (property: height) The height of the rectangle. default: 10.0 minimum: 0.001
-color <java.awt.Color> (property: color) The color of the rectangle. default: #000000
-line-width <float> (property: lineWidth) The line width. default: 1.0 minimum: 0.001
-fill <boolean> (property: fill) If enabled the shape gets filled with the specified color. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_Color
the color.protected BaseString[]
m_Extensions
the file extensions.protected boolean
m_Fill
whether to fill the circle.protected float
m_Height
the height.protected float
m_LineWidth
the line width.protected float
m_Width
the width.protected float
m_X
the absolute X position.protected float
m_Y
the absolute Y position.-
Fields inherited from class adams.flow.transformer.pdfproclet.AbstractPdfProclet
m_RegExpFilename, MATCH_ALL_EXTENSION
-
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 Rectangle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProcess(PDFGenerator generator, Object obj)
Whether the processor can handle this particular object.String
colorTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected boolean
doProcess(PDFGenerator generator, File file)
The actual processing of the document.protected boolean
doProcess(PDFGenerator generator, Object obj)
The actual processing of the document.String
extensionsTipText()
Returns the tip text for this property.String
fillTipText()
Returns the tip text for this property.Color
getColor()
Returns the color.BaseString[]
getExtensions()
Returns the extensions that the processor can process.boolean
getFill()
Returns whether to fill the shape with the specified color.float
getHeight()
Returns the height.float
getLineWidth()
Returns the line width.float
getWidth()
Returns the width.float
getX()
Returns the absolute X position.float
getY()
Returns the absolute Y position.String
globalInfo()
Returns a short description of the writer.String
heightTipText()
Returns the tip text for this property.String
lineWidthTipText()
Returns the tip text for this property.void
setColor(Color value)
Sets the color.void
setExtensions(BaseString[] value)
Sets the extensions that the processor can process.void
setFill(boolean value)
Sets whether to fill the shape with the specified color.void
setHeight(float value)
Sets the height.void
setLineWidth(float value)
Sets the line width.void
setWidth(float value)
Sets the width.void
setX(float value)
Sets the absolute X position.void
setY(float value)
Sets the absolute Y position.String
widthTipText()
Returns the tip text for this property.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.pdfproclet.AbstractPdfProclet
addColumnTextAt, addElement, canProcess, getRegExpFilename, postProcess, postProcess, preProcess, preProcess, process, process, regExpFilenameTipText, setRegExpFilename
-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.flow.transformer.pdfproclet.PdfProclet
canProcess, getRegExpFilename, process, process, regExpFilenameTipText, setRegExpFilename
-
-
-
-
Field Detail
-
m_Extensions
protected BaseString[] m_Extensions
the file extensions.
-
m_X
protected float m_X
the absolute X position.
-
m_Y
protected float m_Y
the absolute Y position.
-
m_Width
protected float m_Width
the width.
-
m_Height
protected float m_Height
the height.
-
m_Color
protected Color m_Color
the color.
-
m_LineWidth
protected float m_LineWidth
the line width.
-
m_Fill
protected boolean m_Fill
whether to fill the circle.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a short description of the writer.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description of the writer
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractPdfProclet
-
getExtensions
public BaseString[] getExtensions()
Returns the extensions that the processor can process.- Specified by:
getExtensions
in interfacePdfProclet
- Specified by:
getExtensions
in interfacePdfProcletWithVariableFileExtension
- Specified by:
getExtensions
in classAbstractPdfProclet
- Returns:
- the extensions (no dot)
-
setExtensions
public void setExtensions(BaseString[] value)
Sets the extensions that the processor can process.- Specified by:
setExtensions
in interfacePdfProcletWithVariableFileExtension
- Parameters:
value
- the extensions (no dot)
-
extensionsTipText
public String extensionsTipText()
Returns the tip text for this property.- Specified by:
extensionsTipText
in interfacePdfProcletWithVariableFileExtension
- 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 absolute X position.- Parameters:
value
- the X position
-
getX
public float getX()
Returns the absolute X position.- 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 absolute Y position.- Parameters:
value
- the Y position
-
getY
public float getY()
Returns the absolute Y position.- 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.
-
setWidth
public void setWidth(float value)
Sets the width.- Parameters:
value
- the width
-
getWidth
public float getWidth()
Returns the width.- Returns:
- the width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHeight
public void setHeight(float value)
Sets the height.- Parameters:
value
- the height
-
getHeight
public float getHeight()
Returns the height.- Returns:
- the height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColor
public void setColor(Color value)
Sets the color.- Parameters:
value
- the color
-
getColor
public Color getColor()
Returns the color.- Returns:
- the color
-
colorTipText
public String colorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLineWidth
public void setLineWidth(float value)
Sets the line width.- Parameters:
value
- the line width
-
getLineWidth
public float getLineWidth()
Returns the line width.- Returns:
- the line width
-
lineWidthTipText
public String lineWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFill
public void setFill(boolean value)
Sets whether to fill the shape with the specified color.- Parameters:
value
- true if to fill
-
getFill
public boolean getFill()
Returns whether to fill the shape with the specified color.- Returns:
- true if to fill
-
fillTipText
public String fillTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doProcess
protected boolean doProcess(PDFGenerator generator, File file) throws Exception
The actual processing of the document.- Specified by:
doProcess
in classAbstractPdfProclet
- Parameters:
generator
- the contextfile
- the file to add- Returns:
- true if successfully added
- Throws:
Exception
- if something goes wrong
-
canProcess
public boolean canProcess(PDFGenerator generator, Object obj)
Whether the processor can handle this particular object.- Specified by:
canProcess
in interfacePdfProclet
- Specified by:
canProcess
in classAbstractPdfProclet
- Parameters:
generator
- the contextobj
- the object to check- Returns:
- true if the object can be handled
-
doProcess
protected boolean doProcess(PDFGenerator generator, Object obj) throws Exception
The actual processing of the document.- Specified by:
doProcess
in classAbstractPdfProclet
- Parameters:
generator
- the contextobj
- the object to add- Returns:
- true if successfully added
- Throws:
Exception
- if something goes wrong
-
-