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
public class MPrintFormatItem extends X_AD_PrintFormatItem implements 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:
- Serialized Form
-
-
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, 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_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
Constructors Constructor Description MPrintFormatItem(Properties ctx, int AD_PrintFormatItem_ID, String trxName)ConstructorMPrintFormatItem(Properties ctx, ResultSet rs, String trxName)ConstructorMPrintFormatItem(Properties ctx, MPrintFormatItem copy)MPrintFormatItem(Properties ctx, MPrintFormatItem copy, String trxName)MPrintFormatItem(MPrintFormatItem copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanafterSave(boolean newRecord, boolean success)After Saveprotected booleanbeforeSave(boolean newRecord)Before SaveMPrintFormatItemcopyToClient(int To_Client_ID, int AD_PrintFormat_ID)Copy existing Definition To ClientMPrintFormatItemcopyToClient(int To_Client_ID, int AD_PrintFormat_ID, String trxName)Copy existing Definition To Clientstatic MPrintFormatItemcreateFromColumn(MPrintFormat format, int AD_Column_ID, int seqNo)Create Print Format Item from Columnstatic MPrintFormatItemcreateFromGridField(MPrintFormat format, GridField gridField, int seqNo)StringgetColumnName()Get ColumnName from AD_Column_IDStringgetPrintName(Language language)Get print name with languageStringgetPrintNameSuffix(Language language)Get print name suffix with languagebooleanis_Changed()Is there a Change to be saved?booleanisBarcode()BarcodebooleanisContent()ContentbooleanisFieldAlignBlock()Field Align BlockbooleanisFieldAlignDefault()Field Align DefaultbooleanisFieldAlignLeading()Field Align LeadingbooleanisFieldAlignTrailing()Field Align TrailingbooleanisFieldCenter()Field CenterbooleanisFooter()FooterbooleanisHeader()HeaderbooleanisLineAlignCenter()Line Align CenterbooleanisLineAlignLeading()Line Align LeadingbooleanisLineAlignTrailing()Line Align TrailingbooleanisTypeBox()Type BoxbooleanisTypeField()Type FieldbooleanisTypeImage()Type ImagebooleanisTypePrintFormat()Type Print FormatbooleanisTypeScript()Type ScriptbooleanisTypeText()Type TextMPrintFormatItemmarkImmutable()mark PO as immutablevoidsetPrintName(Language language, String printName)Set print name on languageStringtoString()String representation-
Methods inherited from class org.compiere.model.X_AD_PrintFormatItem
get_AccessLevel, getAD_Column, getAD_Column_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_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, 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_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, 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, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, 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, 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 Detail
-
MPrintFormatItem
public MPrintFormatItem(Properties ctx, int AD_PrintFormatItem_ID, String trxName)
Constructor- Parameters:
ctx- contextAD_PrintFormatItem_ID- AD_PrintFormatItem_IDtrxName- transaction
-
MPrintFormatItem
public MPrintFormatItem(Properties ctx, ResultSet rs, String trxName)
Constructor- Parameters:
ctx- contextrs- ResultSettrxName- transaction
-
MPrintFormatItem
public MPrintFormatItem(MPrintFormatItem copy)
- Parameters:
copy-
-
MPrintFormatItem
public MPrintFormatItem(Properties ctx, MPrintFormatItem copy)
- Parameters:
ctx-copy-
-
MPrintFormatItem
public MPrintFormatItem(Properties ctx, MPrintFormatItem copy, String trxName)
- Parameters:
ctx-copy-trxName-
-
-
Method Detail
-
getPrintName
public String getPrintName(Language language)
Get print name with language- Parameters:
language- language - ignored if IsMultiLingualDocument not 'Y'- Returns:
- print name
-
setPrintName
public void setPrintName(Language language, String printName)
Set print name on language- Parameters:
language- language - ignored if IsMultiLingualDocument not 'Y'
-
getPrintNameSuffix
public String getPrintNameSuffix(Language language)
Get print name suffix with language- Parameters:
language- language - ignored if IsMultiLingualDocument not 'Y'- Returns:
- print name suffix
-
isTypeScript
public boolean isTypeScript()
Type Script- Returns:
- true if script
-
isTypeField
public boolean isTypeField()
Type Field- Returns:
- true if field
-
isTypeText
public boolean isTypeText()
Type Text- Returns:
- true if text
-
isTypePrintFormat
public boolean isTypePrintFormat()
Type Print Format- Returns:
- true if print format
-
isTypeImage
public boolean isTypeImage()
Type Image- Returns:
- true if image
-
isTypeBox
public boolean isTypeBox()
Type Box- Returns:
- true if box
-
isFieldCenter
public boolean isFieldCenter()
Field Center- Returns:
- true if center
-
isFieldAlignLeading
public boolean isFieldAlignLeading()
Field Align Leading- Returns:
- true if leading
-
isFieldAlignTrailing
public boolean isFieldAlignTrailing()
Field Align Trailing- Returns:
- true if trailing
-
isFieldAlignBlock
public boolean isFieldAlignBlock()
Field Align Block- Returns:
- true if block
-
isFieldAlignDefault
public boolean isFieldAlignDefault()
Field Align Default- Returns:
- true if default alignment
-
isLineAlignCenter
public boolean isLineAlignCenter()
Line Align Center- Returns:
- true if center
-
isLineAlignLeading
public boolean isLineAlignLeading()
Line Align Leading- Returns:
- true if leading
-
isLineAlignTrailing
public boolean isLineAlignTrailing()
Line Align Trailing- Returns:
- true if trailing
-
isHeader
public boolean isHeader()
Header- Returns:
- true if area is header
-
isContent
public boolean isContent()
Content- Returns:
- true if area is centent
-
isFooter
public boolean isFooter()
Footer- Returns:
- true if area is footer
-
isBarcode
public boolean isBarcode()
Barcode- Returns:
- true if barcode selected
-
toString
public String toString()
String representation- Overrides:
toStringin classX_AD_PrintFormatItem- Returns:
- info
-
getColumnName
public String getColumnName()
Get ColumnName from AD_Column_ID- Returns:
- ColumnName
-
createFromColumn
public static MPrintFormatItem createFromColumn(MPrintFormat format, int AD_Column_ID, int seqNo)
Create 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)
-
copyToClient
public MPrintFormatItem copyToClient(int To_Client_ID, int AD_PrintFormat_ID)
Copy existing Definition To Client- Parameters:
To_Client_ID- to clientAD_PrintFormat_ID- parent print format- Returns:
- print format item
-
copyToClient
public MPrintFormatItem copyToClient(int To_Client_ID, int AD_PrintFormat_ID, String trxName)
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)
Before Save- Overrides:
beforeSavein classPO- Parameters:
newRecord-- Returns:
- true if ok
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)After Save
-
is_Changed
public boolean is_Changed()
Description copied from class:POIs there a Change to be saved?- Overrides:
is_Changedin classPO- Returns:
- true if record changed
-
markImmutable
public MPrintFormatItem markImmutable()
Description copied from interface:ImmutablePOSupportmark PO as immutable- Specified by:
markImmutablein interfaceImmutablePOSupport- Returns:
- PO
-
-