Class Line
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.pdfproclet.AbstractPdfProclet
-
- adams.flow.transformer.pdfproclet.Line
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,PdfProclet,PdfProcletWithVariableFileExtension,Serializable
public class Line extends AbstractPdfProclet implements PdfProcletWithVariableFileExtension
Draws a line.
-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: *
-x1 <float> (property: X1) The absolute X1 position. default: 0.0 minimum: 0.0
-y1 <float> (property: Y1) The absolute Y1 position. default: 0.0 minimum: 0.0
-x2 <float> (property: X2) The absolute X2 position. default: 10.0 minimum: 0.001
-y2 <float> (property: Y2) The absolute Y2 position. 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
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe color.protected BaseString[]m_Extensionsthe file extensions.protected floatm_LineWidththe line width.protected floatm_X1the absolute X1 position.protected floatm_X2the absolute X2 position.protected floatm_Y1the absolute Y1 position.protected floatm_Y2the absolute Y2 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 Line()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanProcess(PDFGenerator generator, Object obj)Whether the processor can handle this particular object.StringcolorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected booleandoProcess(PDFGenerator generator, File file)The actual processing of the document.protected booleandoProcess(PDFGenerator generator, Object obj)The actual processing of the document.StringextensionsTipText()Returns the tip text for this property.ColorgetColor()Returns the color.BaseString[]getExtensions()Returns the extensions that the processor can process.floatgetLineWidth()Returns the line width.floatgetX1()Returns the absolute X1 position.floatgetX2()Returns the absolute X2 position.floatgetY1()Returns the absolute Y1 position.floatgetY2()Returns the absolute Y2 position.StringglobalInfo()Returns a short description of the writer.StringlineWidthTipText()Returns the tip text for this property.voidsetColor(Color value)Sets the color.voidsetExtensions(BaseString[] value)Sets the extensions that the processor can process.voidsetLineWidth(float value)Sets the line width.voidsetX1(float value)Sets the absolute X1 position.voidsetX2(float value)Sets the absolute X2 position.voidsetY1(float value)Sets the absolute Y1 position.voidsetY2(float value)Sets the absolute Y2 position.StringX1TipText()Returns the tip text for this property.StringX2TipText()Returns the tip text for this property.StringY1TipText()Returns the tip text for this property.StringY2TipText()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_X1
protected float m_X1
the absolute X1 position.
-
m_Y1
protected float m_Y1
the absolute Y1 position.
-
m_X2
protected float m_X2
the absolute X2 position.
-
m_Y2
protected float m_Y2
the absolute Y2 position.
-
m_Color
protected Color m_Color
the color.
-
m_LineWidth
protected float m_LineWidth
the line width.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a short description of the writer.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description of the writer
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractPdfProclet
-
getExtensions
public BaseString[] getExtensions()
Returns the extensions that the processor can process.- Specified by:
getExtensionsin interfacePdfProclet- Specified by:
getExtensionsin interfacePdfProcletWithVariableFileExtension- Specified by:
getExtensionsin classAbstractPdfProclet- Returns:
- the extensions (no dot)
-
setExtensions
public void setExtensions(BaseString[] value)
Sets the extensions that the processor can process.- Specified by:
setExtensionsin interfacePdfProcletWithVariableFileExtension- Parameters:
value- the extensions (no dot)
-
extensionsTipText
public String extensionsTipText()
Returns the tip text for this property.- Specified by:
extensionsTipTextin interfacePdfProcletWithVariableFileExtension- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setX1
public void setX1(float value)
Sets the absolute X1 position.- Parameters:
value- the X1 position
-
getX1
public float getX1()
Returns the absolute X1 position.- Returns:
- the X1 position
-
X1TipText
public String X1TipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setY1
public void setY1(float value)
Sets the absolute Y1 position.- Parameters:
value- the Y1 position
-
getY1
public float getY1()
Returns the absolute Y1 position.- Returns:
- the Y1 position
-
Y1TipText
public String Y1TipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setX2
public void setX2(float value)
Sets the absolute X2 position.- Parameters:
value- the X2 position
-
getX2
public float getX2()
Returns the absolute X2 position.- Returns:
- the X2 position
-
X2TipText
public String X2TipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setY2
public void setY2(float value)
Sets the absolute Y2 position.- Parameters:
value- the Y2 position
-
getY2
public float getY2()
Returns the absolute Y2 position.- Returns:
- the Y2 position
-
Y2TipText
public String Y2TipText()
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.
-
doProcess
protected boolean doProcess(PDFGenerator generator, File file) throws Exception
The actual processing of the document.- Specified by:
doProcessin 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:
canProcessin interfacePdfProclet- Specified by:
canProcessin 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:
doProcessin classAbstractPdfProclet- Parameters:
generator- the contextobj- the object to add- Returns:
- true if successfully added
- Throws:
Exception- if something goes wrong
-
-