com.stimulsoft.report.barCodes
Class StiBarCodeTypeService

java.lang.Object
  extended by com.stimulsoft.base.serializing.StiSerializedObject
      extended by com.stimulsoft.base.services.StiService
          extended by com.stimulsoft.report.barCodes.StiBarCodeTypeService
All Implemented Interfaces:
IStiSerializable, IStiSerializableRef, java.lang.Cloneable
Direct Known Subclasses:
StiAustraliaPost4StateBarCodeType, StiCodabarBarCodeType, StiCode11BarCodeType, StiCode128BarCodeType, StiCode39BarCodeType, StiCode93BarCodeType, StiDataMatrixBarCodeType, StiDutchKIXBarCodeType, StiEAN13BarCodeType, StiFIMBarCodeType, StiInterleaved2of5BarCodeType, StiITF14BarCodeType, StiMaxicodeBarCodeType, StiPdf417BarCodeType, StiPharmacodeBarCodeType, StiPlesseyBarCodeType, StiPostnetBarCodeType, StiQRCodeBarCodeType, StiRoyalMail4StateBarCodeType, StiStandard2of5BarCodeType

public abstract class StiBarCodeTypeService
extends StiService


Nested Class Summary
protected static class StiBarCodeTypeService.StiBarCodeData
           
protected static class StiBarCodeTypeService.ValueObject
           
 
Field Summary
protected static double DefaultLabelFontHeight
           
protected  StiRectangle RectWindow
           
 int 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
StiBarCodeTypeService()
           
 
Method Summary
protected  void baseDrawRectangle(StiGraphics context, StiColor penColor, double penSize, double x, double y, double width, double height, java.lang.Double zoom, java.lang.Double pageZoom)
           
protected  void baseDrawString(StiGraphics context, java.lang.String st, StiFont font, StiBrush brush, StiRectangle rect, StiTextHorAlignment horAlignment, StiVertAlignment vertAlignment, java.lang.Double zoom)
           
protected  void baseFillEllipse(StiGraphics context, StiBrush brush, double x, double y, double width, double height, java.lang.Double zoom, java.lang.Double pageZoom)
           
protected  void baseFillPolygon(StiGraphics context, StiBrush brush, StiPoint[] points, java.lang.Double zoom, java.lang.Double pageZoom)
           
protected  void baseFillRectangle(StiGraphics context, StiBrush brush, double x, double y, double width, double height, java.lang.Double zoom, java.lang.Double pageZoom)
           
protected  void baseFillRectangle2D(StiGraphics context, StiBrush brush, double x, double y, double width, double height, java.lang.Double zoom, java.lang.Double pageZoom)
           
protected  StiSize baseMeasureString(StiGraphics context, java.lang.String st, StiFont font)
           
protected  void baseRollbackTransform(StiGraphics context)
           
protected  void baseTransform(StiGraphics context, double x, double y, double angle, double dx, double dy, StiRectangle clip)
           
protected  void CalculateSize2(double SpaceLeft, double SpaceRight, double SpaceTop, double SpaceBottom, double LineHeightShort, double LineHeightLong, double TextPosition, double TextHeight, double MainHeight, double WideToNarrowRatio, double Zoom, java.lang.String BarsArray, StiRectangle rect, StiBarCode barCode)
           
protected  void CalculateSizeFull(double SpaceLeft, double SpaceRight, double SpaceTop, double SpaceBottom, double LineHeightShort, double LineHeightLong, double TextPosition, double TextHeight, double MainHeight, double LineHeightForCut, double WideToNarrowRatio, double Zoom, java.lang.String Code, java.lang.String TextString, java.lang.String BarsArray, StiRectangle rect, StiBarCode barCode)
           
protected  java.lang.String CheckCodeSymbols(java.lang.String inputCode, java.lang.String tolerantSymbols)
          Remove from string all undefined symbols.
abstract  void draw(StiGraphics context, StiBarCode barCode, StiRectangle rect, double zoom)
           
protected  void draw2DBarCode(StiGraphics context, StiRectangle rect, StiBarCode barCode, double zoom)
           
protected  void drawBarCode(StiGraphics context, StiRectangle rect, StiBarCode barCode)
          Draws bar code.
protected  void drawBarCodeError(StiGraphics context, StiRectangle rect, StiBarCode barCode)
           
protected  void drawBarCodeError(StiGraphics context, StiRectangle rect, StiBarCode barCode, java.lang.String message)
           
protected  void drawBars(StiGraphics context, java.lang.String sym, StiBrush foreBrush, java.lang.Double zoom, java.lang.Double pageZoom)
          Draws content of bar code.
protected  void drawMaxicode(StiGraphics context, StiRectangle rect, StiBarCode barCode, double zoom)
           
protected  StiBarCodeTypeService.StiBarCodeData getBarCodeData()
           
 java.lang.String GetCode(IStiBarCode barCode)
          Returns string of char - input data for calculation of bar code.
 java.lang.String getCombinedCode()
           
abstract  java.lang.String getDefaultCodeValue()
           
 StiBarCodeExportPainter getExportPainter()
           
abstract  double getHeight()
           
abstract  double getLabelFontHeight()
           
abstract  double getModule()
           
 java.lang.String getServiceCategory()
          Gets a service category.
 java.lang.Class<?> getServiceType()
          Gets a service type.
protected  double GetSymbolsStringWidth(java.lang.String symbolsString)
          Returns width of string in modules.
protected  double GetSymbolWidth(char symbol)
          Returns width of one symbol in module.
protected  StiTextHorAlignment getTextAlignment()
           
protected  boolean IsSymbolLong(char symbol)
          Returns true if one line is long.
protected  boolean IsSymbolPostDescend(char symbol)
          Returns true if short line is post-descend
protected  boolean IsSymbolSpace(char symbol)
          Returns true is char is space.
abstract  void LoadFromJsonObject(JSONObject jObject)
           
static StiBarCodeTypeService LoadFromJsonObjectInternal(JSONObject jObject)
           
protected  void rollbackTransform(StiGraphics context)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 void setExportPainter(StiBarCodeExportPainter exportPainter)
           
abstract  void setHeight(double value)
           
abstract  void setModule(double value)
           
protected static int[] toInts(byte[] bytes)
           
 java.lang.String toString()
           
protected  void translateRect(StiGraphics context, StiRectangle rect, StiBarCode barCode)
          Translate coordinates using vertical and horizontal justify
 
Methods inherited from class com.stimulsoft.base.services.StiService
clone, getProperties, getServiceEnabled, getServiceInfo, getServiceName, 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

RectWindow

protected StiRectangle RectWindow

DefaultLabelFontHeight

protected static final double DefaultLabelFontHeight
See Also:
Constant Field Values

visiblePropertiesCount

public final int visiblePropertiesCount
See Also:
Constant Field Values
Constructor Detail

StiBarCodeTypeService

public StiBarCodeTypeService()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDefaultCodeValue

public abstract java.lang.String getDefaultCodeValue()

getServiceCategory

public final java.lang.String getServiceCategory()
Gets a service category.

Overrides:
getServiceCategory in class StiService

getServiceType

public final java.lang.Class<?> getServiceType()
Gets a service type.

Specified by:
getServiceType in class StiService

getBarCodeData

protected final StiBarCodeTypeService.StiBarCodeData getBarCodeData()

getModule

public abstract double getModule()

setModule

public abstract void setModule(double value)

getHeight

public abstract double getHeight()

setHeight

public abstract void setHeight(double value)

getTextAlignment

protected StiTextHorAlignment getTextAlignment()

getLabelFontHeight

public abstract double getLabelFontHeight()

CheckCodeSymbols

protected final java.lang.String CheckCodeSymbols(java.lang.String inputCode,
                                                  java.lang.String tolerantSymbols)
Remove from string all undefined symbols.


GetCode

public java.lang.String GetCode(IStiBarCode barCode)
Returns string of char - input data for calculation of bar code.

Parameters:
barCode -
Returns:

getCombinedCode

public java.lang.String getCombinedCode()

GetSymbolWidth

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


IsSymbolLong

protected final boolean IsSymbolLong(char symbol)
Returns true if one line is long.


IsSymbolSpace

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


IsSymbolPostDescend

protected final boolean IsSymbolPostDescend(char symbol)
Returns true if short line is post-descend


GetSymbolsStringWidth

protected final double GetSymbolsStringWidth(java.lang.String symbolsString)
Returns width of string in modules.

Parameters:
symbolsString -
Returns:

drawBars

protected final void drawBars(StiGraphics context,
                              java.lang.String sym,
                              StiBrush foreBrush,
                              java.lang.Double zoom,
                              java.lang.Double pageZoom)
                       throws java.lang.Exception
Draws content of bar code.

Throws:
java.lang.Exception

drawBarCode

protected final void drawBarCode(StiGraphics context,
                                 StiRectangle rect,
                                 StiBarCode barCode)
                          throws java.lang.Exception
Draws bar code.

Throws:
java.lang.Exception

CalculateSizeFull

protected final void CalculateSizeFull(double SpaceLeft,
                                       double SpaceRight,
                                       double SpaceTop,
                                       double SpaceBottom,
                                       double LineHeightShort,
                                       double LineHeightLong,
                                       double TextPosition,
                                       double TextHeight,
                                       double MainHeight,
                                       double LineHeightForCut,
                                       double WideToNarrowRatio,
                                       double Zoom,
                                       java.lang.String Code,
                                       java.lang.String TextString,
                                       java.lang.String BarsArray,
                                       StiRectangle rect,
                                       StiBarCode barCode)

CalculateSize2

protected final void CalculateSize2(double SpaceLeft,
                                    double SpaceRight,
                                    double SpaceTop,
                                    double SpaceBottom,
                                    double LineHeightShort,
                                    double LineHeightLong,
                                    double TextPosition,
                                    double TextHeight,
                                    double MainHeight,
                                    double WideToNarrowRatio,
                                    double Zoom,
                                    java.lang.String BarsArray,
                                    StiRectangle rect,
                                    StiBarCode barCode)

draw2DBarCode

protected final void draw2DBarCode(StiGraphics context,
                                   StiRectangle rect,
                                   StiBarCode barCode,
                                   double zoom)
                            throws java.lang.Exception
Throws:
java.lang.Exception

drawMaxicode

protected void drawMaxicode(StiGraphics context,
                            StiRectangle rect,
                            StiBarCode barCode,
                            double zoom)
                     throws java.lang.Exception
Throws:
java.lang.Exception

drawBarCodeError

protected final void drawBarCodeError(StiGraphics context,
                                      StiRectangle rect,
                                      StiBarCode barCode)
                               throws java.lang.Exception
Throws:
java.lang.Exception

drawBarCodeError

protected final void drawBarCodeError(StiGraphics context,
                                      StiRectangle rect,
                                      StiBarCode barCode,
                                      java.lang.String message)
                               throws java.lang.Exception
Throws:
java.lang.Exception

draw

public abstract void draw(StiGraphics context,
                          StiBarCode barCode,
                          StiRectangle rect,
                          double zoom)
                   throws java.lang.Exception
Throws:
java.lang.Exception

translateRect

protected final void translateRect(StiGraphics context,
                                   StiRectangle rect,
                                   StiBarCode barCode)
                            throws java.io.IOException
Translate coordinates using vertical and horizontal justify

Throws:
java.io.IOException

rollbackTransform

protected final void rollbackTransform(StiGraphics context)

baseTransform

protected void baseTransform(StiGraphics context,
                             double x,
                             double y,
                             double angle,
                             double dx,
                             double dy,
                             StiRectangle clip)
                      throws java.io.IOException
Throws:
java.io.IOException

baseRollbackTransform

protected void baseRollbackTransform(StiGraphics context)

baseFillRectangle

protected void baseFillRectangle(StiGraphics context,
                                 StiBrush brush,
                                 double x,
                                 double y,
                                 double width,
                                 double height,
                                 java.lang.Double zoom,
                                 java.lang.Double pageZoom)
                          throws java.lang.Exception
Throws:
java.lang.Exception

baseFillPolygon

protected void baseFillPolygon(StiGraphics context,
                               StiBrush brush,
                               StiPoint[] points,
                               java.lang.Double zoom,
                               java.lang.Double pageZoom)
                        throws java.lang.Exception
Throws:
java.lang.Exception

baseFillRectangle2D

protected void baseFillRectangle2D(StiGraphics context,
                                   StiBrush brush,
                                   double x,
                                   double y,
                                   double width,
                                   double height,
                                   java.lang.Double zoom,
                                   java.lang.Double pageZoom)
                            throws java.lang.Exception
Throws:
java.lang.Exception

baseFillEllipse

protected void baseFillEllipse(StiGraphics context,
                               StiBrush brush,
                               double x,
                               double y,
                               double width,
                               double height,
                               java.lang.Double zoom,
                               java.lang.Double pageZoom)
                        throws java.lang.Exception
Throws:
java.lang.Exception

baseDrawRectangle

protected void baseDrawRectangle(StiGraphics context,
                                 StiColor penColor,
                                 double penSize,
                                 double x,
                                 double y,
                                 double width,
                                 double height,
                                 java.lang.Double zoom,
                                 java.lang.Double pageZoom)
                          throws java.lang.Exception
Throws:
java.lang.Exception

baseDrawString

protected void baseDrawString(StiGraphics context,
                              java.lang.String st,
                              StiFont font,
                              StiBrush brush,
                              StiRectangle rect,
                              StiTextHorAlignment horAlignment,
                              StiVertAlignment vertAlignment,
                              java.lang.Double zoom)
                       throws java.io.IOException
Throws:
java.io.IOException

baseMeasureString

protected StiSize baseMeasureString(StiGraphics context,
                                    java.lang.String st,
                                    StiFont font)

toInts

protected static int[] toInts(byte[] bytes)

getExportPainter

public StiBarCodeExportPainter getExportPainter()
Returns:
the exportPainter

setExportPainter

public void setExportPainter(StiBarCodeExportPainter exportPainter)
Parameters:
exportPainter - the exportPainter to set

LoadFromJsonObjectInternal

public static StiBarCodeTypeService LoadFromJsonObjectInternal(JSONObject jObject)
                                                        throws JSONException
Throws:
JSONException

SaveToJsonObject

public JSONObject SaveToJsonObject(StiJsonSaveMode mode)
                            throws JSONException
Throws:
JSONException

LoadFromJsonObject

public abstract void LoadFromJsonObject(JSONObject jObject)
                                 throws JSONException
Throws:
JSONException


Copyright © 2018 Stimulsoft. All Rights Reserved.