Provide support for TSC Print Language (TSPL) form/label creation. More...
Public Member Functions | |
TsplForm (String formName) | |
Create form with a given name. More... | |
String | GetName () |
Change Form name. More... | |
void | SetName (String name) |
boolean | IsDeleteAfterUse () |
Not Supported. More... | |
void | SetDeleteAfterUse (boolean deleteAfterUse) |
void | RawContent (String rawContent) |
Raw content added to form for cases where custom content needs to be added. More... | |
void | Scale (TSPL.SCALE_UNITS units, int horzRes, int vertRes) |
Change the scaling used for object positioning within form. More... | |
void | Box (int lineThickness, int startRow, int startCol, int endRow, int endCol) |
Add box. More... | |
void | Line (int lineThickness, int startRow, int startCol, int endRow, int endCol) |
Add Line: Vertical, Horizontal, Diagonal. More... | |
void | Text (int startRow, int startCol, int vertExpand, int horzExpand, String data) |
Add Text. More... | |
void | Barcode_1D (TSPL.Barcode_Type1D bcdType, int startRow, int startCol, String bcdData) |
Add 1D barcode using default barcode settings. More... | |
void | Barcode_1D (Barcode_1D_Properties bcdSetup, int startRow, int startCol, String bcdData) |
Add 1D barcode with non-default settings passed in. More... | |
void | Barcode_2D (TSPL.Barcode_Type2D bcdType, int startRow, int startCol, String bcdData) |
Add 2D barcode using default barcode settings. More... | |
void | Barcode_2D (Barcode_2D_Properties bcdSetup, int startRow, int startCol, String bcdData) |
Add 2D barcode with non-default settings passed in. More... | |
void | Rfid_Write (Rfid_WriteProperties writeProps, Rfid_WriteBitField bitField) |
For writes where only one bit field will be written. More... | |
void | Rfid_Write (TSPL.Rfid_MemBlock memBank, TSPL.Rfid_Format dataFormat, int bitCount, String data) |
For simple writes where only one bit field will be written. More... | |
void | AddTsplObject (Object tsplObject) |
Add object that can be converted to TSPL syntax. More... | |
void | Rfid_Verify (Rfid_ReadProperties readProps, Rfid_ReadBitField readBitField) |
Read and send back to host the contents read. More... | |
String | toString () |
Private Member Functions | |
StringBuilder | GetAsString () |
Private Attributes | |
List< Object > | tsplObjects = new ArrayList<>() |
String | name |
boolean | deleteAfterUse = true |
Provide support for TSC Print Language (TSPL) form/label creation.
Note when positioning objects, the origin is the upper left of a form/label. This means that when positioning objects in terms of row (vertical) and column (horizontal), placement of objects within form/label move down when row increases and move right when column increases.
com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.TsplForm | ( | String | formName | ) |
Create form with a given name.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.AddTsplObject | ( | Object | tsplObject | ) |
Add object that can be converted to TSPL syntax.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
Referenced by com.UniPRT.Sdk.LabelMaker.TSPL.Label.AddObject().
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_1D | ( | Barcode_1D_Properties | bcdSetup, |
int | startRow, | ||
int | startCol, | ||
String | bcdData | ||
) |
Add 1D barcode with non-default settings passed in.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_1D | ( | TSPL.Barcode_Type1D | bcdType, |
int | startRow, | ||
int | startCol, | ||
String | bcdData | ||
) |
Add 1D barcode using default barcode settings.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_2D | ( | Barcode_2D_Properties | bcdSetup, |
int | startRow, | ||
int | startCol, | ||
String | bcdData | ||
) |
Add 2D barcode with non-default settings passed in.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_2D | ( | TSPL.Barcode_Type2D | bcdType, |
int | startRow, | ||
int | startCol, | ||
String | bcdData | ||
) |
Add 2D barcode using default barcode settings.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Box | ( | int | lineThickness, |
int | startRow, | ||
int | startCol, | ||
int | endRow, | ||
int | endCol | ||
) |
Add box.
Start/end positions relative to form/label origin which is the upper left.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
|
private |
References com.UniPRT.Sdk.LabelMaker.TsplLib.TSPL.GetBuildInFontSize(), com.UniPRT.Sdk.LabelMaker.PrintResolution.GetDotsPerInch(), com.UniPRT.Sdk.LabelMaker.Defaults.GetPrinterResolution(), com.UniPRT.Sdk.LabelMaker.TsplLib.TSPL.LINE_TERMINATOR, and com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
Referenced by com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.toString().
String com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.GetName | ( | ) |
Change Form name.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.name.
Referenced by com.UniPRT.Sdk.LabelMaker.TSPL.Label.GetName().
boolean com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.IsDeleteAfterUse | ( | ) |
Not Supported.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.deleteAfterUse.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Line | ( | int | lineThickness, |
int | startRow, | ||
int | startCol, | ||
int | endRow, | ||
int | endCol | ||
) |
Add Line: Vertical, Horizontal, Diagonal.
Start/end positions relative to form/label origin which is the upper left. Vertical Lines: start column = ending column Horizontal Lines: start row = ending row Diagonal Lines: start column != ending column, start row != ending row
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.RawContent | ( | String | rawContent | ) |
Raw content added to form for cases where custom content needs to be added.
Adding raw content allows adding of PGL commands or other features that may not be available. No formatting of content is done. Caller responsible for making sure content follows PGL syntax.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TSPL.LINE_TERMINATOR, and com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
Referenced by com.UniPRT.Sdk.LabelMaker.TSPL.Label.AddRawContent().
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Rfid_Verify | ( | Rfid_ReadProperties | readProps, |
Rfid_ReadBitField | readBitField | ||
) |
Read and send back to host the contents read.
Printer must be configured to send data back to host. And, host must be listening for data at the appropriate communication port from printer. e.g. Status port 3002, or management port 3007, or data port
References com.UniPRT.Sdk.LabelMaker.TsplLib.Rfid_ReadBitField.GetDataFormat(), com.UniPRT.Sdk.LabelMaker.TsplLib.Rfid_ReadBitField.GetFieldTag(), com.UniPRT.Sdk.LabelMaker.TsplLib.Verify.SetFieldTag(), com.UniPRT.Sdk.LabelMaker.TsplLib.Verify.SetReportFormat(), and com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Rfid_Write | ( | Rfid_WriteProperties | writeProps, |
Rfid_WriteBitField | bitField | ||
) |
For writes where only one bit field will be written.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Rfid_Write | ( | TSPL.Rfid_MemBlock | memBank, |
TSPL.Rfid_Format | dataFormat, | ||
int | bitCount, | ||
String | data | ||
) |
For simple writes where only one bit field will be written.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Scale | ( | TSPL.SCALE_UNITS | units, |
int | horzRes, | ||
int | vertRes | ||
) |
Change the scaling used for object positioning within form.
Note that although scaling can change to make positioning of objects easier, it does not affect the printing of the objects. Default scaling is 300 dpi horizontal, 300 dpi vertical.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.SetDeleteAfterUse | ( | boolean | deleteAfterUse | ) |
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.SetName | ( | String | name | ) |
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.name.
Referenced by com.UniPRT.Sdk.LabelMaker.TSPL.Label.SetName().
void com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Text | ( | int | startRow, |
int | startCol, | ||
int | vertExpand, | ||
int | horzExpand, | ||
String | data | ||
) |
Add Text.
Start/end positions relative to form/label origin which is the upper left. Vertical and horizontal expansion are used to adjust text height/width. 0 values for no expansion.
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.tsplObjects.
String com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.toString | ( | ) |
References com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.GetAsString().
Referenced by com.UniPRT.Sdk.LabelMaker.TSPL.Label.ToString().
|
private |
|
private |
|
private |
Referenced by com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.AddTsplObject(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_1D(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Barcode_2D(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Box(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.GetAsString(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Line(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.RawContent(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Rfid_Verify(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Rfid_Write(), com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Scale(), and com.UniPRT.Sdk.LabelMaker.TsplLib.TsplForm.Text().