Package adams.data.barcode.encode
Class PassThrough
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class PassThrough extends AbstractBarcodeEncoder
* Dummy barcode type, draws nothing. *
*-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) * The logging level for outputting errors and debugging output. * default: WARNING *
* *-x <int> (property: x) * X position of the top-left corner. * default: 1 * minimum: 1 *
* *-y <int> (property: y) * Y position of the top-left corner. * default: 1 * minimum: 1 *
* *-width <int> (property: width) * Width of the barcode in pixels. * default: 100 * minimum: 1 *
* *-height <int> (property: height) * Height of the barcode in pixels. * default: 100 * minimum: 1 *
* *-margin <int> (property: margin) * White margin surrounding the barcode. * default: 5 * minimum: 0 *
*- Version:
- $Revision$
- Author:
- lx51 (lx51 at students dot waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.data.barcode.encode.AbstractBarcodeEncoder
m_Height, m_Margin, m_Width, m_X, m_Y
-
Fields inherited from class adams.flow.transformer.draw.AbstractDrawOperation
m_Owner
-
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 PassThrough()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BufferedImageContainer
doEncode(String payload, BufferedImageContainer cont, MessageCollection errors)
Encodes the supplied payload.protected String
getPayload()
Returns the payload to use for generating the barcode.String
globalInfo()
Returns a string describing the object.protected String
isValid(String payload)
Checks whether the payload can be processed.-
Methods inherited from class adams.data.barcode.encode.AbstractBarcodeEncoder
check, defineOptions, doDraw, encode, encode, getHeight, getMargin, getWidth, getX, getY, heightTipText, marginTipText, newImage, setHeight, setMargin, setWidth, setX, setY, widthTipText, xTipText, yTipText
-
Methods inherited from class adams.flow.transformer.draw.AbstractDrawOperation
draw, getOwner, getQuickInfo, setOwner
-
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
-
-
-
-
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
-
getPayload
protected String getPayload()
Returns the payload to use for generating the barcode.- Specified by:
getPayload
in classAbstractBarcodeEncoder
- Returns:
- the payload
-
isValid
protected String isValid(String payload)
Checks whether the payload can be processed.- Specified by:
isValid
in classAbstractBarcodeEncoder
- Parameters:
payload
- the code to check- Returns:
- null if valid, otherwise error message
-
doEncode
protected BufferedImageContainer doEncode(String payload, BufferedImageContainer cont, MessageCollection errors)
Encodes the supplied payload.- Specified by:
doEncode
in classAbstractBarcodeEncoder
- Parameters:
payload
- the payload to encodecont
- the container to add the barcode; creates a new one if nullerrors
- for collecting error messages- Returns:
- the updated/generated container, null if failed to generate
-
-