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.StringARCHIVE_NAMEstatic java.lang.StringCODE_FORMAT_ATTRIBstatic java.lang.StringCODESTRING_ATTRIBstatic java.lang.StringCONTENT_PROPstatic java.awt.FontDEFAULT_LABEL_FONTstatic java.lang.StringFONT_ATTRIBstatic java.lang.StringPLACEHOLDER_ATTRIBstatic java.awt.FontPLACEHOLDER_FONTstatic java.lang.StringQR_CODE_AUTOstatic java.lang.StringQR_CODE_EC_LEVEL_ATTRIBstatic java.lang.StringQR_CODE_VERSION_ATTRIBstatic java.util.Map<com.google.zxing.BarcodeFormat,java.lang.String>samplestatic java.lang.StringSHOWTEXT_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 voiddrawErrorAndThrow(java.awt.Graphics2D g, int width, int height, int pad, java.lang.IllegalArgumentException iae)java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.com.google.zxing.BarcodeFormatgetBarcodeFormat()java.lang.StringgetCodeString()Returns the key used to load if none is provided.java.awt.FontgetLabelFont()intgetPageIndex()Returns the page index.java.lang.StringgetQrCodeVersion()com.google.zxing.qrcode.decoder.ErrorCorrectionLevelgetQrEcLevel()booleangetShowText()booleanisShowText()protected voidrender(java.awt.Graphics2D g, int width, int height)This is where implementations of AbstractJ2DShape actually paint themselves to a graphics context.protected RMShaperpgShape(ReportOwner anRptOwner, RMShape aParent)Generate report with report owner.voidselfInit()voidsetBarcodeFormat(com.google.zxing.BarcodeFormat format)voidsetCodeString(java.lang.String str)Sets the key used to create a barcode if none is provided.voidsetIsPlaceholder(boolean isPlaceholder)voidsetLabelFont(java.awt.Font labelFont)voidsetQrCodeVersion(java.lang.String version)voidsetQrEcLevel(com.google.zxing.qrcode.decoder.ErrorCorrectionLevel level)voidsetShowText(boolean showText)RXElementtoXML(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:
selfInitin 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:
renderin 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:RMShapeGenerate report with report owner.
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.- Specified by:
toXMLin interfaceArchivable- Overrides:
toXMLin classRMShape
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Specified by:
fromXMLin interfaceArchivable- Overrides:
fromXMLin classRMShape
-
setIsPlaceholder
public void setIsPlaceholder(boolean isPlaceholder)
-
-