Class Barcode
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.shape.RMShape
-
- com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
-
- com.inductiveautomation.rm.shape.j2dshapes.Barcode
-
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,RMShapeSelfInit
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
public class Barcode extends AbstractJ2DShape implements RMShapeSelfInit
Filename: Barcode Author: Perry Arellano-Jones Created on: 6/15/15 Project: ignition_dev_7_8BProvides a Barcode component for the Reporting Module.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ARCHIVE_NAME
static java.lang.String
CODE_FORMAT_ATTRIB
static java.lang.String
CODESTRING_ATTRIB
static java.lang.String
CONTENT_PROP
static java.awt.Font
DEFAULT_LABEL_FONT
static java.lang.String
FONT_ATTRIB
static java.lang.String
PLACEHOLDER_ATTRIB
static java.awt.Font
PLACEHOLDER_FONT
static java.lang.String
QR_CODE_AUTO
static java.lang.String
QR_CODE_EC_LEVEL_ATTRIB
static java.lang.String
QR_CODE_VERSION_ATTRIB
static java.util.Map<com.google.zxing.BarcodeFormat,java.lang.String>
sample
static java.lang.String
SHOWTEXT_ATTRIB
-
Fields inherited from class com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
DEFAULT_COLORS, dirty, DPI300, DPI72, RasterDPI
-
Fields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
-
-
Constructor Summary
Constructors Constructor Description Barcode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawErrorAndThrow(java.awt.Graphics2D g, int width, int height, int pad, java.lang.IllegalArgumentException iae)
java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.com.google.zxing.BarcodeFormat
getBarcodeFormat()
java.lang.String
getCodeString()
Returns the key used to load if none is provided.java.awt.Font
getLabelFont()
int
getPageIndex()
Returns the page index.java.lang.String
getQrCodeVersion()
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
getQrEcLevel()
boolean
getShowText()
boolean
isShowText()
protected void
render(java.awt.Graphics2D g, int width, int height)
This is where implementations of AbstractJ2DShape actually paint themselves to a graphics context.protected RMShape
rpgShape(ReportOwner anRptOwner, RMShape aParent)
Generate report with report owner.void
selfInit()
void
setBarcodeFormat(com.google.zxing.BarcodeFormat format)
void
setCodeString(java.lang.String str)
Sets the key used to create a barcode if none is provided.void
setIsPlaceholder(boolean isPlaceholder)
void
setLabelFont(java.awt.Font labelFont)
void
setQrCodeVersion(java.lang.String version)
void
setQrEcLevel(com.google.zxing.qrcode.decoder.ErrorCorrectionLevel level)
void
setShowText(boolean showText)
RXElement
toXML(RXArchiver anArchiver)
XML Archival.-
Methods inherited from class com.inductiveautomation.rm.shape.j2dshapes.AbstractJ2DShape
getDefaultColorCodes, getDefaultColors, getDisplayedFill, paintShape, setDirty
-
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, clone, cloneDeep, computePrefHeight, computePrefWidth, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, divideShapeFromTop, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChild, getChildAnimator, getChildAnimator, getChildClipShape, getChildCount, getChildren, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgAll, rpgBindings, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setWidth, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Field Detail
-
ARCHIVE_NAME
public static final java.lang.String ARCHIVE_NAME
- See Also:
- Constant Field Values
-
CONTENT_PROP
public static final java.lang.String CONTENT_PROP
- See Also:
- Constant Field Values
-
CODESTRING_ATTRIB
public static final java.lang.String CODESTRING_ATTRIB
- See Also:
- Constant Field Values
-
CODE_FORMAT_ATTRIB
public static final java.lang.String CODE_FORMAT_ATTRIB
- See Also:
- Constant Field Values
-
QR_CODE_VERSION_ATTRIB
public static final java.lang.String QR_CODE_VERSION_ATTRIB
- See Also:
- Constant Field Values
-
QR_CODE_EC_LEVEL_ATTRIB
public static final java.lang.String QR_CODE_EC_LEVEL_ATTRIB
- See Also:
- Constant Field Values
-
QR_CODE_AUTO
public static final java.lang.String QR_CODE_AUTO
- See Also:
- Constant Field Values
-
SHOWTEXT_ATTRIB
public static final java.lang.String SHOWTEXT_ATTRIB
- See Also:
- Constant Field Values
-
PLACEHOLDER_ATTRIB
public static final java.lang.String PLACEHOLDER_ATTRIB
- See Also:
- Constant Field Values
-
FONT_ATTRIB
public static final java.lang.String FONT_ATTRIB
- See Also:
- Constant Field Values
-
DEFAULT_LABEL_FONT
public static final java.awt.Font DEFAULT_LABEL_FONT
-
PLACEHOLDER_FONT
public static final java.awt.Font PLACEHOLDER_FONT
-
sample
public static final java.util.Map<com.google.zxing.BarcodeFormat,java.lang.String> sample
-
-
Method Detail
-
selfInit
public void selfInit()
- Specified by:
selfInit
in interfaceRMShapeSelfInit
-
getCodeString
public java.lang.String getCodeString()
Returns the key used to load if none is provided.
-
setCodeString
public void setCodeString(java.lang.String str)
Sets the key used to create a barcode if none is provided.
-
render
protected void render(java.awt.Graphics2D g, int width, int height)
This is where implementations of AbstractJ2DShape actually paint themselves to a graphics context.- Specified by:
render
in classAbstractJ2DShape
-
drawErrorAndThrow
public void drawErrorAndThrow(java.awt.Graphics2D g, int width, int height, int pad, java.lang.IllegalArgumentException iae)
-
getLabelFont
public java.awt.Font getLabelFont()
-
setLabelFont
public void setLabelFont(java.awt.Font labelFont)
-
getPageIndex
public int getPageIndex()
Returns the page index.
-
isShowText
public boolean isShowText()
-
setShowText
public void setShowText(boolean showText)
-
getShowText
public boolean getShowText()
-
getBarcodeFormat
public com.google.zxing.BarcodeFormat getBarcodeFormat()
-
setBarcodeFormat
public void setBarcodeFormat(com.google.zxing.BarcodeFormat format)
-
getQrEcLevel
public com.google.zxing.qrcode.decoder.ErrorCorrectionLevel getQrEcLevel()
-
setQrEcLevel
public void setQrEcLevel(com.google.zxing.qrcode.decoder.ErrorCorrectionLevel level)
-
getQrCodeVersion
public java.lang.String getQrCodeVersion()
-
setQrCodeVersion
public void setQrCodeVersion(java.lang.String version)
-
rpgShape
protected RMShape rpgShape(ReportOwner anRptOwner, RMShape aParent)
Description copied from class:RMShape
Generate report with report owner.
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMShape
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMShape
-
setIsPlaceholder
public void setIsPlaceholder(boolean isPlaceholder)
-
-