Setting and retrieving property values in Java

The dBarScanJ Class may be operated entirely by setting or retrieving Property values programmatically.

Properties that may be read are read using get methods; e.g. the oData property may be obtained using

s=scanner.getoData();

The following property get functions are provided:

Property                  get function

bCheckCheck           public boolean getbCheckCheck()
bChecked                public boolean getbChecked()
bSelection               public boolean getbSelection()
ChkA1                     public int getiChkA1()
ChkA2                     public int getiChkA2()
ChkC1                     public int getiChkC1()
ChkC2                     public int getiChkC2()
dControl1                public int getdControl1()
dControl2                public int getdControl2()
Errorcode                public int getErrorCode()
FNC1                      public char getFNC1()
FNC2                      public char getFNC2()
FNC3                      public char getFNC3()
FNC4                      public char getFNC4()
NBars                     public int getNbars()
nTargetTypes          public int getnTargetTypes()
oData                      public String getoData()
oCode                     public int getoCode()
selTop                     public int getselTop()
selLeft                     public int getselLeft()
selRight                   public int getselRight()
selBottom                public int getselBottom()
Status                    public String getStatus()
TargetType(i)          public String getTargetType(int i)
TypeMask                public int getTypeMask()

Similarly properties that may be written are written using set methods; e.g.

mask=7;
scanner.setTypeMask(mask);

The following property set function are provided:

Property                  get function

bCheckCheck           public void setbCheckCheck(boolean b)
bSelection               public void setbSelection(boolean b)
dControl1                public void setdControl1(int i)
dControl2                public void setdControl2(int i)
dImage                             public int setdImage(BufferedImage img)
FNC1                      public void setFNC1(char c)
FNC2                      public void setFNC2(char c)
FNC3                      public void setFNC3(char c)
FNC4                      public void setFNC4(char c)
selLeft                    public void setselLeft(int i)
selTop                    public void setselTop(int i)
selRight                   public void setselRight(int i)
selBottom                public void setselBottom(int i)
Serial                      public void setSerial(String s)
TypeMask                public void setTypeMask(int i)

Properties may also be written using the setParam() method, in which the parameters are strings, e.g.

Scanner.setParam(“TypeMask”,”7”).

The first parameter is the property name, which in this use is case-insensitive, and may be one of:

"BCHECKCHECK", "BSELECTION", "DCONTROL1", "DCONTROL2", "FNC1", "FNC2", "FNC3", "FNC4", "SELBOTTOM", "SELLEFT", "SELRIGHT", "SELTOP", "SERIAL", "TYPEMASK",

 

 

More:

Decoding a barcode image in Java