public class Code128Barcode extends LinearBarcode
JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
A
Character set A flag
|
static int |
B
Character set B flag
|
protected static int[] |
BUF_SIZES |
static int |
C
Character set c flag
|
static String |
CHANGE_TO_A
Code set change from current to A character
|
static String |
CHANGE_TO_B
Code set change from current to B character
|
static String |
CHANGE_TO_C
Code set change from current to c character
|
static String |
FNC_1
FNC1 start character
|
protected int |
mode |
static int |
O
Auto character set flag
|
protected static Module |
QUIET_SECTION |
static String |
SHIFT
Code shift character
|
static Module |
START_A |
static Module |
START_B |
static Module |
START_C |
protected static int[] |
START_INDICES |
protected int |
startIndex |
protected static Module |
STOP |
barHeight, barWidth, data, drawingQuietSection, drawingText, labelaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTNO_SUCH_PAGE, PAGE_EXISTSABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
Code128Barcode(String data)
Create a new Code 128 barcode using character set B.
|
Code128Barcode(String data,
int mode)
Creates a new Coded 128 barcode with the specified data and the specified
character set.
|
| Modifier and Type | Method and Description |
|---|---|
Module |
calculateChecksum()
Calculates the check sum digit for the barcode.
|
protected int |
calculateMinimumBarHeight(int resolution)
Calculates the minimum allowed barcode height for the barcode.
|
Module[] |
encodeData()
Encodes the data of the barcode into bars.
|
int |
getCharacterSet()
Returns the current character set being used in this barcode.
|
String |
getLabel()
Returns the text label to be displayed underneath the barcode/
|
protected Module |
getPostAmble()
Returns the post amble for the barcode.
|
protected Module |
getPreAmble()
Returns the pre-amble for the barcode.
|
protected double |
getSymbolWidth(int resolution)
Returns the width of the encoded symbol portion of the barcode in pixels for
the given resolution.
|
draw, drawTextLabelbeautify, draw, drawModule, getBounds, getBounds, getData, getHeight, getMaximumSize, getMinimumSize, getPreferredSize, getResolution, getSize, getWidth, getX, getY, isDrawingQuietSection, isDrawingText, output, paintComponent, print, setBarHeight, setBarWidth, setDrawingQuietSection, setDrawingText, setFont, setLabel, setResolution, toStringaddAncestorListener, 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, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, 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, getBackground, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, 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, hide, 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, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int A
public static final int B
public static final int C
public static final int O
public static final String SHIFT
public static final String CHANGE_TO_A
public static final String CHANGE_TO_B
public static final String CHANGE_TO_C
public static final String FNC_1
public static final Module START_A
public static final Module START_B
public static final Module START_C
protected static final Module STOP
protected static final Module QUIET_SECTION
protected static final int[] START_INDICES
protected static final int[] BUF_SIZES
protected int startIndex
protected int mode
public Code128Barcode(String data) throws BarcodeException
data - The data to encodeBarcodeException - If the data to be encoded is invalidpublic Code128Barcode(String data, int mode) throws BarcodeException
data - The data to encodemode - The character set to use for encodingBarcodeException - If the data to be encoded is invalidpublic int getCharacterSet()
public String getLabel()
protected double getSymbolWidth(int resolution)
resolution - The resolution to calculate the width forprotected int calculateMinimumBarHeight(int resolution)
calculateMinimumBarHeight in class Barcoderesolution - The output resolution (for calculating the width)public Module[] encodeData()
encodeData in class Barcodepublic Module calculateChecksum()
calculateChecksum in class Barcodeprotected Module getPreAmble()
getPreAmble in class Barcodeprotected Module getPostAmble()
getPostAmble in class BarcodeCopyright © 2003-2013 barbecue.sourceforge.net. All Rights Reserved.