|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.idautomation.maxicode.MaxiCode
This class paints a maxicode symbol.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
boolean |
autoResize
If true, the image will be resized to fit the size available for the component. |
java.awt.Color |
backColor
Background color. |
java.awt.Color |
color
Color of the MaxiCode pattern. |
java.lang.String |
country
Country code (modes 2 and 3) |
protected static int |
d
|
java.lang.String |
dataStr
Data to be encoded. |
double |
L
Length in millimeters of the symbol, default = 25.5 mm. |
int |
mode
Maxicode mode: Values range from 2 to 6; default=2 for US; 3 = International and 4 = standard (non-shipping) symbols. |
int |
numberOfCodes
Number of symbol in structured appended mode |
int |
offsetX
paint the symbol at these coordinates |
int |
offsetY
paint the symbol at these coordinates |
int |
positionOfCode
Position of this symbol in the sequence of the structured appended. |
boolean |
processTilde
If true, three numbers after the Tilde will insert an ASCII code; For example ~009 will insert ASCII 9 into the data string. |
int |
resolution
Resolution of the printer in dpi, Default is 200. |
int |
rotation
Rotation angle. |
java.lang.String |
serviceClass
Service class (modes 2 and 3). |
java.lang.String |
zipCode
Postal code (modes 2 and 3) In mode 3 it can be an alphanumeric of length 5. |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
MaxiCode()
Constructor |
|
| Method Summary | |
int[][] |
createPattern()
creates a hexagon pattern, if a standard cannot be used. |
boolean |
getAutoResize()
Gets the autoResize property. |
java.awt.Color |
getBackground()
Gets the backColor property. |
java.lang.String |
getCountry()
Gets the country property. |
java.lang.String |
getData()
Gets the dataStr property. |
java.awt.Color |
getForeground()
Gets the color property value. |
int |
getHHexagon()
Height of hexagon modules (pixels) |
int |
getMode()
Gets the mode property. |
java.lang.String |
getName()
Returns "MaxiCode". |
int |
getNumberOfCodes()
Gets the numberOfCodes property. |
int |
getPositionOfCode()
Gets the positionOfCode property. |
java.awt.Dimension |
getPreferredSize()
Returns size needed to draw the symbol. |
boolean |
getProcessTilde()
Gets the processTilde property. |
int |
getResolution()
Gets the resolution property. |
int |
getRotation()
Gets the rotation property. |
java.lang.String |
getServiceClass()
Gets the serviceClass property. |
int |
getWHexagon()
Width of hexagon modules (pixels) |
java.lang.String |
getZipCode()
Gets the zipCode property. |
void |
paint(java.awt.Graphics g)
paints the maxicode symbol. |
protected java.awt.Image |
rotate(java.awt.Image im,
int angle,
int maxw,
int maxh)
rotates an image |
void |
setAutoResize(boolean b)
Sets the autoResize property. |
void |
setBackground(java.awt.Color newColor)
Sets the backColor property. |
void |
setCountry(java.lang.String c)
Sets the country property. |
void |
setData(java.lang.String d)
Sets the dataStr property. |
void |
setForeground(java.awt.Color newColor)
Sets the color property. |
void |
setHexagonPattern(int[][] p)
set a user defined pattern for the hexagons. |
void |
setImageSize(int imgWidth,
int imgHeight)
Sets the size of the generated image, if used then autoSize is set to false. |
boolean |
setL(double l)
Sets the L property. |
void |
setMode(int m)
Sets the mode property. |
void |
setNumberOfCodes(int n)
Sets the numberOfCodes property. |
void |
setPositionOfCode(int n)
Sets the positionOfCode property. |
void |
setProcessTilde(boolean pt)
Sets the processTilde property. |
void |
setRedraw(boolean b)
Force recalculating the symbol next time paint() is called |
boolean |
setResolution(int r)
Sets the resolution property. |
void |
setRotation(int r)
Sets the rotation property. |
void |
setServiceClass(java.lang.String s)
Sets the serviceClass property. |
void |
setZipCode(java.lang.String zp)
Sets the zipCode property. |
| Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.awt.Color color
setForeground(Color newColor),
getForeground(),
User Manualpublic java.awt.Color backColor
setBackground(Color newColor),
getBackground(),
User Manualpublic double L
setL(double l),
User Manualpublic int resolution
setResolution(int r),
getResolution(),
User Manualpublic int offsetX
public int offsetY
protected static final int d
public boolean processTilde
setProcessTilde(boolean pt),
getProcessTilde(),
User Manualpublic int mode
setMode(int m),
getMode(),
User Manualpublic java.lang.String zipCode
setZipCode(String zp),
getZipCode(),
User Manualpublic java.lang.String serviceClass
setServiceClass(String s),
getServiceClass(),
User Manualpublic java.lang.String country
setCountry(String c),
getCountry(),
User Manualpublic java.lang.String dataStr
setData(String d),
getData(),
User Manualpublic int numberOfCodes
setNumberOfCodes(int n),
getNumberOfCodes(),
User Manualpublic int positionOfCode
setPositionOfCode(int n),
getPositionOfCode(),
User Manualpublic int rotation
setRotation(int r),
getRotation(),
User Manualpublic boolean autoResize
setAutoResize(boolean b),
getAutoResize(),
User Manual| Constructor Detail |
public MaxiCode()
| Method Detail |
public void setForeground(java.awt.Color newColor)
newColor - the new value for the color variable.color,
User Manualpublic java.awt.Color getForeground()
color,
User Manualpublic void setBackground(java.awt.Color newColor)
newColor - the new value for the backColor variable.backColor,
User Manualpublic java.awt.Color getBackground()
backColor,
User Manualpublic boolean setL(double l)
l - the new value for the L variable.L,
User Manualpublic boolean setResolution(int r)
r - the new value for the resolution variable.resolution,
User Manualpublic int getResolution()
resolution,
User Manualpublic void setProcessTilde(boolean pt)
pt - the new value for the processTilde variable.processTilde,
User Manualpublic boolean getProcessTilde()
processTilde,
User Manualpublic void setHexagonPattern(int[][] p)
public java.lang.String getName()
public int getWHexagon()
getHHexagon(),
User Manualpublic int getHHexagon()
getWHexagon(),
User Manualpublic void setMode(int m)
m - the new value for the mode variable.mode,
User Manualpublic int getMode()
mode,
User Manualpublic void setZipCode(java.lang.String zp)
zp - the new value for the zipCode variable.zipCode,
User Manualpublic java.lang.String getZipCode()
zipCode,
User Manualpublic void setServiceClass(java.lang.String s)
s - the new value for the serviceClass variable.serviceClass,
User Manualpublic java.lang.String getServiceClass()
serviceClass,
User Manualpublic void setCountry(java.lang.String c)
c - the new value for the country variable.country,
User Manualpublic java.lang.String getCountry()
country,
User Manualpublic void setData(java.lang.String d)
d - the new value for the dataStr variable.dataStr,
User Manualpublic java.lang.String getData()
dataStr,
User Manualpublic void setNumberOfCodes(int n)
n - the new value for the numberOfCodes variable.numberOfCodes,
User Manualpublic int getNumberOfCodes()
numberOfCodes,
User Manualpublic void setPositionOfCode(int n)
n - the new value for the positionOfCode variable.positionOfCode,
User Manualpublic int getPositionOfCode()
positionOfCode,
User Manualpublic void setRotation(int r)
r - the new value for the rotation variable.rotation,
User Manualpublic int getRotation()
rotation,
User Manualpublic java.awt.Dimension getPreferredSize()
public void setAutoResize(boolean b)
b - the new value for the autoResize variable.autoResize,
User Manualpublic boolean getAutoResize()
autoResize,
User Manual
public void setImageSize(int imgWidth,
int imgHeight)
public int[][] createPattern()
public void setRedraw(boolean b)
public void paint(java.awt.Graphics g)
protected java.awt.Image rotate(java.awt.Image im,
int angle,
int maxw,
int maxh)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||