Package org.compiere.print
Class MPrintFormatItem
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_AD_PrintFormatItem
org.compiere.print.MPrintFormatItem
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_AD_PrintFormatItem
,I_Persistent
,Evaluatee
,ImmutablePOSupport
Print Format Item Model.
Caches Column Name.
(Add missing Items with PrintFormatUtil)
- Version:
- $Id: MPrintFormatItem.java,v 1.3 2006/08/03 22:17:17 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_AD_PrintFormatItem
BARCODETYPE_AD_Reference_ID, BARCODETYPE_Codabar2Of7Linear, BARCODETYPE_CodabarMonarchLinear, BARCODETYPE_CodabarNW_7Linear, BARCODETYPE_CodabarUSD_4Linear, BARCODETYPE_Code128ACharacterSet, BARCODETYPE_Code128BCharacterSet, BARCODETYPE_Code128CCharacterSet, BARCODETYPE_Code128DynamicallySwitching, BARCODETYPE_Code393Of9LinearWithChecksum, BARCODETYPE_Code393Of9LinearWOChecksum, BARCODETYPE_Code39LinearWithChecksum, BARCODETYPE_Code39LinearWOChecksum, BARCODETYPE_Code39USD3WithChecksum, BARCODETYPE_Code39USD3WOChecksum, BARCODETYPE_Code39WithChecksum, BARCODETYPE_Code39WOChecksum, BARCODETYPE_CodeabarLinear, BARCODETYPE_EAN128, BARCODETYPE_EAN13, BARCODETYPE_GlobalTradeItemNoGTINUCCEAN128, BARCODETYPE_PDF417TwoDimensional, BARCODETYPE_QRCode, BARCODETYPE_SCC_14ShippingCodeUCCEAN128, BARCODETYPE_ShipmentIDNumberUCCEAN128, BARCODETYPE_SSCC_18NumberUCCEAN128, BARCODETYPE_UCC128, BARCODETYPE_UPC_A, BARCODETYPE_USPostalServiceUCCEAN128, FIELDALIGNMENTTYPE_AD_Reference_ID, FIELDALIGNMENTTYPE_Block, FIELDALIGNMENTTYPE_Center, FIELDALIGNMENTTYPE_Default, FIELDALIGNMENTTYPE_LeadingLeft, FIELDALIGNMENTTYPE_TrailingRight, LINEALIGNMENTTYPE_AD_Reference_ID, LINEALIGNMENTTYPE_Center, LINEALIGNMENTTYPE_LeadingLeft, LINEALIGNMENTTYPE_None, LINEALIGNMENTTYPE_TrailingRight, PRINTAREATYPE_AD_Reference_ID, PRINTAREATYPE_Content, PRINTAREATYPE_Footer, PRINTAREATYPE_Header, PRINTFORMATTYPE_AD_Reference_ID, PRINTFORMATTYPE_Field, PRINTFORMATTYPE_Image, PRINTFORMATTYPE_Line, PRINTFORMATTYPE_PrintFormat, PRINTFORMATTYPE_Rectangle, PRINTFORMATTYPE_Script, PRINTFORMATTYPE_Text, SHAPETYPE_3DRectangle, SHAPETYPE_AD_Reference_ID, SHAPETYPE_NormalRectangle, SHAPETYPE_Oval, SHAPETYPE_RoundRectangle
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_AD_PrintFormatItem
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Column_ID, COLUMNNAME_AD_FieldStyle_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_PrintColor_ID, COLUMNNAME_AD_PrintFont_ID, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_AD_PrintFormatChild_ID, COLUMNNAME_AD_PrintFormatItem_ID, COLUMNNAME_AD_PrintFormatItem_UU, COLUMNNAME_AD_PrintGraph_ID, COLUMNNAME_ArcDiameter, COLUMNNAME_BarcodeType, COLUMNNAME_BelowColumn, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DisplayLogic, COLUMNNAME_FieldAlignmentType, COLUMNNAME_FormatPattern, COLUMNNAME_ImageIsAttached, COLUMNNAME_ImageURL, COLUMNNAME_IsActive, COLUMNNAME_IsAveraged, COLUMNNAME_IsCentrallyMaintained, COLUMNNAME_IsCounted, COLUMNNAME_IsDesc, COLUMNNAME_IsDeviationCalc, COLUMNNAME_IsFilledRectangle, COLUMNNAME_IsFixedWidth, COLUMNNAME_IsGroupBy, COLUMNNAME_IsHeightOneLine, COLUMNNAME_IsImageField, COLUMNNAME_IsMaxCalc, COLUMNNAME_IsMinCalc, COLUMNNAME_IsNextLine, COLUMNNAME_IsNextPage, COLUMNNAME_IsOrderBy, COLUMNNAME_IsPageBreak, COLUMNNAME_IsPrintBarcodeText, COLUMNNAME_IsPrinted, COLUMNNAME_IsPrintInstanceAttributes, COLUMNNAME_IsRelativePosition, COLUMNNAME_IsRunningTotal, COLUMNNAME_IsSetNLPosition, COLUMNNAME_IsSummarized, COLUMNNAME_IsSuppressNull, COLUMNNAME_IsSuppressRepeats, COLUMNNAME_IsVarianceCalc, COLUMNNAME_LineAlignmentType, COLUMNNAME_LineWidth, COLUMNNAME_MaxHeight, COLUMNNAME_MaxWidth, COLUMNNAME_Name, COLUMNNAME_PrintAreaType, COLUMNNAME_PrintFormatType, COLUMNNAME_PrintName, COLUMNNAME_PrintNameSuffix, COLUMNNAME_RunningTotalLines, COLUMNNAME_Script, COLUMNNAME_SeqNo, COLUMNNAME_ShapeType, COLUMNNAME_SortNo, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_XPosition, COLUMNNAME_XSpace, COLUMNNAME_YPosition, COLUMNNAME_YSpace, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMPrintFormatItem
(Properties ctx, int AD_PrintFormatItem_ID, String trxName) ConstructorMPrintFormatItem
(Properties ctx, String AD_PrintFormatItem_UU, String trxName) UUID based ConstructorMPrintFormatItem
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMPrintFormatItem
(Properties ctx, MPrintFormatItem copy) Copy constructorMPrintFormatItem
(Properties ctx, MPrintFormatItem copy, String trxName) Copy constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterSave
(boolean newRecord, boolean success) Called after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.protected boolean
beforeSave
(boolean newRecord) Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.copyToClient
(int To_Client_ID, int AD_PrintFormat_ID) Copy existing Definition To ClientcopyToClient
(int To_Client_ID, int AD_PrintFormat_ID, String trxName) Copy existing Definition To Clientstatic MPrintFormatItem
createFromColumn
(MPrintFormat format, int AD_Column_ID, int seqNo) Create and Save Print Format Item from Columnstatic MPrintFormatItem
createFromGridField
(MPrintFormat format, GridField gridField, int seqNo) Create and save print format item from GridFieldGet ColumnName from AD_Column_IDgetPrintName
(Language language) Get print name with languagegetPrintNameSuffix
(Language language) Get print name suffix with languageboolean
Is there changes to be saved?boolean
Is Type Barcodeboolean
Is Content Areaboolean
Is Field Alignment Blockboolean
Is Field Alignment Defaultboolean
Is Field Alignment Leading Leftboolean
Field Alignment Trailing Rightboolean
Is Field Alignment Centerboolean
isFooter()
Is Footer Areaboolean
isHeader()
Is Header Areaboolean
Is Line Alignment Centerboolean
Is Line Alignment Leading Leftboolean
Is Line Alignment Trailing Rightboolean
Is of Type Box (Line or Rectangle)boolean
Is of Type Fieldboolean
Is of Type Imageboolean
Is of Type Print Formatboolean
Is of Type Scriptboolean
Is of Type Textmark PO as immutablevoid
setPrintName
(Language language, String printName) Set print name for languagetoString()
String representationMethods inherited from class org.compiere.model.X_AD_PrintFormatItem
get_AccessLevel, getAD_Column, getAD_Column_ID, getAD_FieldStyle, getAD_FieldStyle_ID, getAD_PrintColor, getAD_PrintColor_ID, getAD_PrintFont, getAD_PrintFont_ID, getAD_PrintFormat, getAD_PrintFormat_ID, getAD_PrintFormatChild, getAD_PrintFormatChild_ID, getAD_PrintFormatItem_ID, getAD_PrintFormatItem_UU, getAD_PrintGraph, getAD_PrintGraph_ID, getArcDiameter, getBarcodeType, getBelowColumn, getDisplayLogic, getFieldAlignmentType, getFormatPattern, getImageURL, getKeyNamePair, getLineAlignmentType, getLineWidth, getMaxHeight, getMaxWidth, getName, getPrintAreaType, getPrintFormatType, getPrintName, getPrintNameSuffix, getRunningTotalLines, getScript, getSeqNo, getShapeType, getSortNo, getXPosition, getXSpace, getYPosition, getYSpace, initPO, isAveraged, isCentrallyMaintained, isCounted, isDesc, isDeviationCalc, isFilledRectangle, isFixedWidth, isGroupBy, isHeightOneLine, isImageField, isImageIsAttached, isMaxCalc, isMinCalc, isNextLine, isNextPage, isOrderBy, isPageBreak, isPrintBarcodeText, isPrinted, isPrintInstanceAttributes, isRelativePosition, isRunningTotal, isSetNLPosition, isSummarized, isSuppressNull, isSuppressRepeats, isVarianceCalc, setAD_Column_ID, setAD_FieldStyle_ID, setAD_PrintColor_ID, setAD_PrintFont_ID, setAD_PrintFormat_ID, setAD_PrintFormatChild_ID, setAD_PrintFormatItem_ID, setAD_PrintFormatItem_UU, setAD_PrintGraph_ID, setArcDiameter, setBarcodeType, setBelowColumn, setDisplayLogic, setFieldAlignmentType, setFormatPattern, setImageIsAttached, setImageURL, setIsAveraged, setIsCentrallyMaintained, setIsCounted, setIsDesc, setIsDeviationCalc, setIsFilledRectangle, setIsFixedWidth, setIsGroupBy, setIsHeightOneLine, setIsImageField, setIsMaxCalc, setIsMinCalc, setIsNextLine, setIsNextPage, setIsOrderBy, setIsPageBreak, setIsPrintBarcodeText, setIsPrinted, setIsPrintInstanceAttributes, setIsRelativePosition, setIsRunningTotal, setIsSetNLPosition, setIsSummarized, setIsSuppressNull, setIsSuppressRepeats, setIsVarianceCalc, setLineAlignmentType, setLineWidth, setMaxHeight, setMaxWidth, setName, setPrintAreaType, setPrintFormatType, setPrintName, setPrintNameSuffix, setRunningTotalLines, setScript, setSeqNo, setShapeType, setSortNo, setXPosition, setXSpace, setYPosition, setYSpace
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_AD_PrintFormatItem
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MPrintFormatItem
UUID based Constructor- Parameters:
ctx
- ContextAD_PrintFormatItem_UU
- UUID keytrxName
- Transaction
-
MPrintFormatItem
Constructor- Parameters:
ctx
- contextAD_PrintFormatItem_ID
- AD_PrintFormatItem_IDtrxName
- transaction
-
MPrintFormatItem
Load Constructor- Parameters:
ctx
- contextrs
- ResultSettrxName
- transaction
-
MPrintFormatItem
Copy constructor- Parameters:
copy
-
-
MPrintFormatItem
Copy constructor- Parameters:
ctx
-copy
-
-
MPrintFormatItem
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
-
Method Details
-
getPrintName
Get print name with language- Parameters:
language
- language - ignored if IsMultiLingualDocument not 'Y'- Returns:
- print name
-
setPrintName
Set print name for language- Parameters:
language
- language - ignored if IsMultiLingualDocument not 'Y'
-
getPrintNameSuffix
Get print name suffix with language- Parameters:
language
- language - ignored if IsMultiLingualDocument not 'Y'- Returns:
- print name suffix
-
isTypeScript
public boolean isTypeScript()Is of Type Script- Returns:
- true if of type script
-
isTypeField
public boolean isTypeField()Is of Type Field- Returns:
- true if of type field
-
isTypeText
public boolean isTypeText()Is of Type Text- Returns:
- true if of type text
-
isTypePrintFormat
public boolean isTypePrintFormat()Is of Type Print Format- Returns:
- true if of type print format
-
isTypeImage
public boolean isTypeImage()Is of Type Image- Returns:
- true if of type image
-
isTypeBox
public boolean isTypeBox()Is of Type Box (Line or Rectangle)- Returns:
- true if of type box
-
isFieldCenter
public boolean isFieldCenter()Is Field Alignment Center- Returns:
- true if field alignment is center
-
isFieldAlignLeading
public boolean isFieldAlignLeading()Is Field Alignment Leading Left- Returns:
- true if field alignment is leading left
-
isFieldAlignTrailing
public boolean isFieldAlignTrailing()Field Alignment Trailing Right- Returns:
- true if field alignment is trailing right
-
isFieldAlignBlock
public boolean isFieldAlignBlock()Is Field Alignment Block- Returns:
- true if field alignment is block
-
isFieldAlignDefault
public boolean isFieldAlignDefault()Is Field Alignment Default- Returns:
- true if field is with default alignment
-
isLineAlignCenter
public boolean isLineAlignCenter()Is Line Alignment Center- Returns:
- true if line alignment is center
-
isLineAlignLeading
public boolean isLineAlignLeading()Is Line Alignment Leading Left- Returns:
- true if line alignment is leading left
-
isLineAlignTrailing
public boolean isLineAlignTrailing()Is Line Alignment Trailing Right- Returns:
- true if line alignment is trailing right
-
isHeader
public boolean isHeader()Is Header Area- Returns:
- true if area is header
-
isContent
public boolean isContent()Is Content Area- Returns:
- true if area is content
-
isBarcode
public boolean isBarcode()Is Type Barcode- Returns:
- true if item is of type barcode
-
toString
String representation- Overrides:
toString
in classX_AD_PrintFormatItem
- Returns:
- info
-
getColumnName
Get ColumnName from AD_Column_ID- Returns:
- ColumnName
-
createFromColumn
Create and Save Print Format Item from Column- Parameters:
format
- parentAD_Column_ID
- columnseqNo
- sequence of display if 0 it is not printed- Returns:
- Print Format Item
-
createFromGridField
public static MPrintFormatItem createFromGridField(MPrintFormat format, GridField gridField, int seqNo) Create and save print format item from GridField- Parameters:
format
-gridField
-seqNo
-- Returns:
- new print format item instance
-
copyToClient
Copy existing Definition To Client- Parameters:
To_Client_ID
- to clientAD_PrintFormat_ID
- parent print format- Returns:
- print format item
-
copyToClient
Copy existing Definition To Client- Parameters:
To_Client_ID
- to clientAD_PrintFormat_ID
- parent print format- Returns:
- print format item
-
beforeSave
protected boolean beforeSave(boolean newRecord) Description copied from class:PO
Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- true if it is a new record- Returns:
- true if record can be saved
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) Description copied from class:PO
Called after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it. -
is_Changed
public boolean is_Changed()Description copied from class:PO
Is there changes to be saved?- Overrides:
is_Changed
in classPO
- Returns:
- true if record changed
-
markImmutable
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-