Class POSPrinterService.EscSimple
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.PrintDataPart
de.gmxhome.conrad.jpos.jpos_base.posprinter.POSPrinterService.EscSimple
- Enclosing class:
- POSPrinterService
Class describing simple attribute setting escape sequences ESC|[!]xC, where x is one of b, i, rv, tb or tp.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the specified attribute shall be set or reset.boolean
getBold()
Returns whether attribute is bold.getEscSimple(POSPrinterService.PrintDataPart obj, int type, int subtype, int ignored, String escdata, boolean negated, boolean valueispresent)
Checks whether the specified esc sequence parameters form a simple attribute sequence.boolean
Returns whether attribute is italic.boolean
Returns whether attribute is reverse.boolean
Returns whether attribute is subscript.boolean
Returns whether attribute is superscript.void
validate(POSPrinterService srv, int station)
Used to perform full validation of the print data.void
validateData(POSPrinterService srv, int station)
Used to perform additional validation of the print data, if output to the given station occurs.
-
Method Details
-
getActivate
public boolean getActivate()Returns whether the specified attribute shall be set or reset.- Returns:
- true to set the attribute and false to reset the attribute.
-
getBold
public boolean getBold()Returns whether attribute is bold.- Returns:
- True in case of bold attribute, otherwise false.
-
getItalic
public boolean getItalic()Returns whether attribute is italic.- Returns:
- True in case of italic attribute, otherwise false.
-
getReverse
public boolean getReverse()Returns whether attribute is reverse.- Returns:
- True in case of reverse attribute, otherwise false.
-
getSubscript
public boolean getSubscript()Returns whether attribute is subscript.- Returns:
- True in case of subscript attribute, otherwise false.
-
getSuperscript
public boolean getSuperscript()Returns whether attribute is superscript.- Returns:
- True in case of superscript attribute, otherwise false.
-
getEscSimple
public static POSPrinterService.PrintDataPart getEscSimple(POSPrinterService.PrintDataPart obj, int type, int subtype, int ignored, String escdata, boolean negated, boolean valueispresent)Checks whether the specified esc sequence parameters form a simple attribute sequence. If so, it returns an EscSimple object. If not, the object given as first parameter will be returned. Simple attributes are bolt, italic, reverse, subscript and superscript.- Parameters:
obj
- An object containing corresponding sequence parameters or null.type
- The sequence type (see EscUnknown, property Esc).subtype
- The subtype (see EscUnknown, property Subtype).ignored
- The value (see EscUnknown, property Value). Will be ignored.escdata
- If value is a data length, the corresponding data. Otherwise null.negated
- The negation flag (see EscUnknown, property Negated).valueispresent
- The present flag (see EscUnknown, property ValuePresent).- Returns:
- An EscSimple object, if the sequence is a well-formed simple attribute sequence, otherwise obj.
-
validate
Description copied from class:POSPrinterService.PrintDataPart
Used to perform full validation of the print data. To do this, relevant capabilities will be checked and the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.- Specified by:
validate
in classPOSPrinterService.PrintDataPart
- Parameters:
srv
- POSPrinterService to be used for additional validation.station
- Printer station for which the validation shall be checked.- Throws:
jpos.JposException
- If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.
-
validateData
Description copied from class:POSPrinterService.PrintDataPart
Used to perform additional validation of the print data, if output to the given station occurs. To do this, simply the corresponding method of the POSPrinterInterface used by the given POSPrinterService will be called.- Specified by:
validateData
in classPOSPrinterService.PrintDataPart
- Parameters:
srv
- POSPrinterService to be used for validation.station
- Printer station used for validation.- Throws:
jpos.JposException
- If not precisely supported with ErrorCode E_ILLEGAL, if not supported and no workaround is possible, with ErrorCode E_FAILURE.
-