com.stimulsoft.report.barCodes
Class StiEAN13BarCodeType

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.base.services.StiService
          extended by com.stimulsoft.report.barCodes.StiBarCodeTypeService
              extended by com.stimulsoft.report.barCodes.StiEAN13BarCodeType
All Implemented Interfaces:
IStiSerializable, IStiSerializableRef, java.lang.Cloneable
Direct Known Subclasses:
StiEAN8BarCodeType, StiIsbn13BarCodeType, StiJan13BarCodeType, StiUpcABarCodeType, StiUpcEBarCodeType, StiUpcSup2BarCodeType, StiUpcSup5BarCodeType

public class StiEAN13BarCodeType
extends StiBarCodeTypeService

The class describes the Barcode type - EAN-13.


Nested Class Summary
protected static class StiEAN13BarCodeType.Ean13Symbol
           
protected static class StiEAN13BarCodeType.EanBarInfo
           
 
Nested classes/interfaces inherited from class com.stimulsoft.report.barCodes.StiBarCodeTypeService
StiBarCodeTypeService.StiBarCodeData, StiBarCodeTypeService.ValueObject
 
Field Summary
protected  java.lang.String[] ean13SymData
           
protected  java.lang.String[] symComboSet
           
protected  java.lang.String[] symParitySetAdd2
           
protected  java.lang.String[] symParitySetAdd5
           
 
Fields inherited from class com.stimulsoft.report.barCodes.StiBarCodeTypeService
DefaultLabelFontHeight, RectWindow, visiblePropertiesCount
 
Fields inherited from class com.stimulsoft.base.services.StiService
properties
 
Fields inherited from interface com.stimulsoft.base.serializing.interfaceobject.IStiSerializableRef
REFERENCE_EMPTY, REFERENCE_REPORT
 
Constructor Summary
StiEAN13BarCodeType()
           
StiEAN13BarCodeType(double module, double height, StiEanSupplementType supplementType, java.lang.String supplementCodeValue, boolean showQuietZoneIndicator)
           
 
Method Summary
protected  void CalculateSizeEan(double offsetY, double Zoom, java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> BarsArray, StiRectangle rect, StiBarCode barCode)
           
 void draw(StiGraphics context, StiBarCode barCode, StiRectangle rect, double zoom)
          Draws the bar code with the specified parameters.
protected  void drawEanBars(StiGraphics context, java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> barsArray, StiBarCode barCode)
           
 java.lang.String getDefaultCodeValue()
           
protected  double getEanLineHeightForCut()
           
protected  double getEanLineHeightLong()
           
protected  double getEanLineHeightShort()
           
protected  double getEanMainHeight()
           
protected  double getEanSpaceBeforeAdd()
           
protected  double getEanSpaceBottom()
           
protected  double getEanSpaceLeft()
           
protected  double getEanSpaceRight()
           
protected  double getEanSpaceTextTop()
           
protected  double getEanSpaceTop()
           
protected  double getEanTextHeight()
           
protected  double getEanTextPositionBottom()
           
protected  double getEanTextPositionTop()
           
protected  double getEanWideToNarrowRatio()
           
 double getHeight()
          Gets os sets height factor of the bar code.
 double getLabelFontHeight()
           
 double getModule()
          Gets or sets width of the most fine element of the bar code.
 java.lang.String getServiceName()
          Gets a service name.
 boolean getShowQuietZoneIndicator()
          Gets or sets value which indicates will show Quiet Zone Indicator or no.
 java.lang.String getSupplementCode()
          Gets or sets the component supplement bar code.
 StiEanSupplementType getSupplementType()
          Gets or sets type of supplement code.
protected  double GetSymbolWidth(char symbol)
          Returns width of one symbol in module.
protected  boolean IsSymbolSpace(char symbol)
          Returns true is char is space.
 void LoadFromJsonObject(JSONObject jObject)
           
protected  java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEan13Bars(java.lang.String code, boolean isLast)
           
protected  java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEanAdd2Bars(java.lang.String code, java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> baseArray, boolean isLast)
           
protected  java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEanAdd5Bars(java.lang.String code, java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> baseArray, boolean isLast)
           
protected  java.lang.String makeLonger(java.lang.String symString)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setHeight(double value)
           
 void setModule(double value)
           
 void setShowQuietZoneIndicator(boolean value)
           
 void setSupplementCode(java.lang.String value)
           
 void setSupplementType(StiEanSupplementType value)
           
 
Methods inherited from class com.stimulsoft.report.barCodes.StiBarCodeTypeService
baseDrawRectangle, baseDrawString, baseFillEllipse, baseFillPolygon, baseFillRectangle, baseFillRectangle2D, baseMeasureString, baseRollbackTransform, baseTransform, CalculateSize2, CalculateSizeFull, CheckCodeSymbols, draw2DBarCode, drawBarCode, drawBarCodeError, drawBarCodeError, drawBars, drawMaxicode, getBarCodeData, GetCode, getCombinedCode, getExportPainter, getServiceCategory, getServiceType, GetSymbolsStringWidth, getTextAlignment, IsSymbolLong, IsSymbolPostDescend, LoadFromJsonObjectInternal, rollbackTransform, setExportPainter, toInts, toString, translateRect
 
Methods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, isPropertyPresent, MemberwiseClone, packService, properties, setProperties, setServiceEnabled
 
Methods inherited from class com.stimulsoft.base.serializing.StiSerializedObject
cleanReference, getReference, setReference
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

symComboSet

protected java.lang.String[] symComboSet

symParitySetAdd2

protected java.lang.String[] symParitySetAdd2

symParitySetAdd5

protected java.lang.String[] symParitySetAdd5

ean13SymData

protected java.lang.String[] ean13SymData
Constructor Detail

StiEAN13BarCodeType

public StiEAN13BarCodeType()

StiEAN13BarCodeType

public StiEAN13BarCodeType(double module,
                           double height,
                           StiEanSupplementType supplementType,
                           java.lang.String supplementCodeValue,
                           boolean showQuietZoneIndicator)
Method Detail

getServiceName

public java.lang.String getServiceName()
Gets a service name.

Overrides:
getServiceName in class StiService

getModule

public double getModule()
Gets or sets width of the most fine element of the bar code.

Specified by:
getModule in class StiBarCodeTypeService

setModule

public void setModule(double value)
Specified by:
setModule in class StiBarCodeTypeService

getHeight

public double getHeight()
Gets os sets height factor of the bar code.

Specified by:
getHeight in class StiBarCodeTypeService

setHeight

public void setHeight(double value)
Specified by:
setHeight in class StiBarCodeTypeService

getSupplementType

public StiEanSupplementType getSupplementType()
Gets or sets type of supplement code.


setSupplementType

public void setSupplementType(StiEanSupplementType value)

getSupplementCode

public java.lang.String getSupplementCode()
Gets or sets the component supplement bar code.


setSupplementCode

public void setSupplementCode(java.lang.String value)

getShowQuietZoneIndicator

public boolean getShowQuietZoneIndicator()
Gets or sets value which indicates will show Quiet Zone Indicator or no.


setShowQuietZoneIndicator

public void setShowQuietZoneIndicator(boolean value)

getLabelFontHeight

public double getLabelFontHeight()
Specified by:
getLabelFontHeight in class StiBarCodeTypeService

getEanSpaceLeft

protected double getEanSpaceLeft()

getEanSpaceRight

protected double getEanSpaceRight()

getEanSpaceTop

protected double getEanSpaceTop()

getEanSpaceBottom

protected double getEanSpaceBottom()

getEanSpaceBeforeAdd

protected double getEanSpaceBeforeAdd()

getEanSpaceTextTop

protected double getEanSpaceTextTop()

getEanLineHeightShort

protected double getEanLineHeightShort()

getEanLineHeightLong

protected double getEanLineHeightLong()

getEanTextPositionTop

protected double getEanTextPositionTop()

getEanTextPositionBottom

protected double getEanTextPositionBottom()

getEanTextHeight

protected double getEanTextHeight()

getEanMainHeight

protected double getEanMainHeight()

getEanLineHeightForCut

protected double getEanLineHeightForCut()

getEanWideToNarrowRatio

protected double getEanWideToNarrowRatio()

CalculateSizeEan

protected final void CalculateSizeEan(double offsetY,
                                      double Zoom,
                                      java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> BarsArray,
                                      StiRectangle rect,
                                      StiBarCode barCode)

drawEanBars

protected final void drawEanBars(StiGraphics context,
                                 java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> barsArray,
                                 StiBarCode barCode)
                          throws java.lang.Exception
Throws:
java.lang.Exception

MakeEan13Bars

protected final java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEan13Bars(java.lang.String code,
                                                                                  boolean isLast)

MakeEanAdd2Bars

protected final java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEanAdd2Bars(java.lang.String code,
                                                                                    java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> baseArray,
                                                                                    boolean isLast)

MakeEanAdd5Bars

protected final java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> MakeEanAdd5Bars(java.lang.String code,
                                                                                    java.util.ArrayList<StiEAN13BarCodeType.EanBarInfo> baseArray,
                                                                                    boolean isLast)

makeLonger

protected final java.lang.String makeLonger(java.lang.String symString)

GetSymbolWidth

protected double GetSymbolWidth(char symbol)
Returns width of one symbol in module.

Overrides:
GetSymbolWidth in class StiBarCodeTypeService

IsSymbolSpace

protected boolean IsSymbolSpace(char symbol)
Returns true is char is space.

Overrides:
IsSymbolSpace in class StiBarCodeTypeService

draw

public void draw(StiGraphics context,
                 StiBarCode barCode,
                 StiRectangle rect,
                 double zoom)
          throws java.lang.Exception
Draws the bar code with the specified parameters.

Specified by:
draw in class StiBarCodeTypeService
Parameters:
context - Context for drawing.
shape - Component that invokes drawing.
rect - The rectangle that shows coordinates for drawing.
zoom - Zoom of drawing.
Throws:
java.lang.Exception

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Overrides:
SaveToJsonObject in class StiBarCodeTypeService
Throws:
JSONException

LoadFromJsonObject

public void LoadFromJsonObject(JSONObject jObject)
                        throws JSONException
Specified by:
LoadFromJsonObject in class StiBarCodeTypeService
Throws:
JSONException

getDefaultCodeValue

public java.lang.String getDefaultCodeValue()
Specified by:
getDefaultCodeValue in class StiBarCodeTypeService


Copyright © 2018 Stimulsoft. All Rights Reserved.