public abstract class BarcodeImpl
extends javax.swing.JComponent
| 限定符和类型 | 字段和说明 |
|---|---|
protected double |
barHeight |
protected double |
barWidth |
protected java.lang.String |
data |
protected boolean |
drawingQuietSection |
protected boolean |
drawingText |
protected java.awt.Font |
font |
protected java.awt.Dimension |
size |
protected int |
x |
protected int |
y |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| 限定符 | 构造器和说明 |
|---|---|
protected |
BarcodeImpl(java.lang.String data) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.String |
beautify(java.lang.String s) |
protected abstract Module |
calculateChecksum() |
protected double |
calculateMinimumBarHeight(int resolution) |
protected java.awt.Dimension |
calculateSize() |
java.lang.Object |
clone()
Clone.
|
protected abstract java.awt.Dimension |
draw(AbstractOutput output,
int x2,
int y2,
double barWidth2,
double barHeight2) |
void |
draw(java.awt.Graphics2D g,
int x,
int y)
Renders this
Barcode at the specified location in
the specified Graphics2D context. |
protected double |
drawModule(Module module,
AbstractOutput params,
double x,
double y) |
protected double |
drawModule(Module module,
AbstractOutput params,
int x,
int y,
double width,
double height) |
protected abstract Module[] |
encodeData() |
java.awt.Color |
getBackground() |
protected abstract double |
getBarcodeWidth(int resolution) |
java.awt.Rectangle |
getBounds()
From
JComponent. |
java.awt.Rectangle |
getBounds(java.awt.Rectangle rv)
From
JComponent. |
java.lang.String |
getData()
Returns the data that the barcode is coding for.
|
java.awt.Font |
getFont() |
java.awt.Color |
getForeground() |
int |
getHeight()
From
JComponent. |
protected java.lang.String |
getLabel()
Returns the text that will be displayed underneath the barcode (if requested).
|
java.awt.Dimension |
getMaximumSize()
From
JComponent. |
java.awt.Dimension |
getMinimumSize()
From
JComponent. |
protected abstract Module |
getPostAmble() |
protected abstract Module |
getPreAmble() |
java.awt.Dimension |
getPreferredSize()
From
JComponent. |
int |
getRcodeDrawPix() |
int |
getRCodeErrorCorrect() |
int |
getRCodeVersion() |
protected int |
getResolution() |
java.awt.Dimension |
getSize()
From
JComponent. |
int |
getWidth()
From
JComponent. |
int |
getX()
From
JComponent. |
int |
getY()
From
JComponent. |
protected void |
invalidateSize() |
boolean |
isDrawingQuietSection()
Indicates whether the barcode is drawing leading and trailing white space/quiet area.
|
boolean |
isDrawingText()
Indicates whether the barcode is drawing a text label underneath the barcode or not.
|
protected void |
paintComponent(java.awt.Graphics g) |
void |
setBackground(java.awt.Color background) |
void |
setBarHeight(double barHeight)
Sets the desired height for the bars in the barcode (in pixels).
|
void |
setBarWidth(double barWidth)
Sets the desired bar width for the barcode.
|
void |
setDrawingQuietSection(boolean drawingQuietSection) |
void |
setDrawingText(boolean drawingText)
Indicates whether the barcode data should be shown as a string underneath the
barcode or not.
|
void |
setFont(java.awt.Font font)
Sets the font to use when drawing the barcode data string underneath the barcode.
|
void |
setForeground(java.awt.Color foreground) |
void |
setRcodeDrawPix(int RcodeDrawPix) |
void |
setRCodeErrorCorrect(int RCodeErrorCorrect) |
void |
setRCodeVersion(int RCodeVersion) |
void |
setResolution(int resolution)
Sets the desired output resolution for the barcode.
|
void |
setSVGScalar(double scalar,
java.lang.String units) |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected java.lang.String data
protected boolean drawingText
protected boolean drawingQuietSection
protected double barWidth
protected double barHeight
protected java.awt.Font font
protected java.awt.Dimension size
protected int x
protected int y
protected BarcodeImpl(java.lang.String data)
throws BarcodeException
BarcodeExceptionpublic java.lang.String getData()
public java.awt.Font getFont()
getFont 在接口中 java.awt.MenuContainergetFont 在类中 java.awt.Componentpublic void setFont(java.awt.Font font)
setFont 在类中 javax.swing.JComponentfont - The font to usepublic java.awt.Color getForeground()
getForeground 在类中 java.awt.Componentpublic void setForeground(java.awt.Color foreground)
setForeground 在类中 javax.swing.JComponentpublic java.awt.Color getBackground()
getBackground 在类中 java.awt.Componentpublic void setBackground(java.awt.Color background)
setBackground 在类中 javax.swing.JComponentpublic void setDrawingText(boolean drawingText)
drawingText - True if the text should be shown, false if notpublic boolean isDrawingText()
public void setDrawingQuietSection(boolean drawingQuietSection)
public boolean isDrawingQuietSection()
public void setBarWidth(double barWidth)
barWidth - The desired width of the thinnest bar in pixelspublic void setBarHeight(double barHeight)
barHeight - The desired height of the barcode bars in pixelspublic void setResolution(int resolution)
resolution - The desired output resolution (in dots per inch)public int getX()
JComponent.getX 在类中 javax.swing.JComponentpublic int getY()
JComponent.getY 在类中 javax.swing.JComponentpublic int getWidth()
JComponent.getWidth 在类中 javax.swing.JComponentpublic int getHeight()
JComponent.getHeight 在类中 javax.swing.JComponentpublic java.awt.Rectangle getBounds()
JComponent.getBounds 在类中 java.awt.Componentpublic java.awt.Rectangle getBounds(java.awt.Rectangle rv)
JComponent.getBounds 在类中 javax.swing.JComponentrv - The rectangle to set the bounds onpublic java.awt.Dimension getPreferredSize()
JComponent.getPreferredSize 在类中 javax.swing.JComponentpublic java.awt.Dimension getMinimumSize()
JComponent.getMinimumSize 在类中 javax.swing.JComponentpublic java.awt.Dimension getMaximumSize()
JComponent.getMaximumSize 在类中 javax.swing.JComponentpublic java.awt.Dimension getSize()
JComponent.getSize 在类中 java.awt.Componentpublic void draw(java.awt.Graphics2D g,
int x,
int y)
Barcode at the specified location in
the specified Graphics2D context.
The origin of the layout is placed at x, y. Rendering may touch
any point within getBounds() of this position. This
leaves the g2 unchanged.g - The graphics contextx - The horizontal value of the upper left co-ordinate of the bounding boxy - The vertical value of the upper left co-ordinate of the bounding boxprotected abstract java.awt.Dimension draw(AbstractOutput output, int x2, int y2, double barWidth2, double barHeight2)
protected abstract double getBarcodeWidth(int resolution)
protected abstract Module[] encodeData()
protected abstract Module calculateChecksum()
protected abstract Module getPreAmble()
protected abstract Module getPostAmble()
protected java.lang.String getLabel()
protected double calculateMinimumBarHeight(int resolution)
protected int getResolution()
protected void invalidateSize()
protected java.awt.Dimension calculateSize()
protected double drawModule(Module module, AbstractOutput params, int x, int y, double width, double height)
protected double drawModule(Module module, AbstractOutput params, double x, double y)
protected java.lang.String beautify(java.lang.String s)
public void setSVGScalar(double scalar,
java.lang.String units)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone 在类中 java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void setRCodeVersion(int RCodeVersion)
public void setRCodeErrorCorrect(int RCodeErrorCorrect)
public void setRcodeDrawPix(int RcodeDrawPix)
public int getRCodeVersion()
public int getRCodeErrorCorrect()
public int getRcodeDrawPix()
protected void paintComponent(java.awt.Graphics g)
paintComponent 在类中 javax.swing.JComponent