Compiere 3.1

org.compiere.print
Class MPrintFormatItem

java.lang.Object
  extended by org.compiere.framework.PO
      extended by org.compiere.model.X_AD_PrintFormatItem
          extended by org.compiere.print.MPrintFormatItem
All Implemented Interfaces:
Serializable, Cloneable, Comparator<PO>, Evaluatee

public class MPrintFormatItem
extends X_AD_PrintFormatItem

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
accessLevel, AD_PRINTFORMATCHILD_ID_AD_Reference_ID, 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_CodeabarLinear, BARCODETYPE_EAN128, BARCODETYPE_GlobalTradeItemNoGTINUCCEAN128, BARCODETYPE_PDF417TwoDimensional, BARCODETYPE_SCC_14ShippingCodeUCCEAN128, BARCODETYPE_ShipmentIDNumberUCCEAN128, BARCODETYPE_SSCC_18NumberUCCEAN128, BARCODETYPE_UCC128, 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, Model, 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_Text, SHAPETYPE_3DRectangle, SHAPETYPE_AD_Reference_ID, SHAPETYPE_NormalRectangle, SHAPETYPE_Oval, SHAPETYPE_RoundRectangle, Table_ID, Table_Name, updatedMS
 
Fields inherited from class org.compiere.framework.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Constructor Summary
MPrintFormatItem(Ctx ctx, int AD_PrintFormatItem_ID, String trxName)
          Constructor
MPrintFormatItem(Ctx ctx, ResultSet rs, String trxName)
          Constructor
 
Method Summary
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save
protected  boolean beforeSave(boolean newRecord)
          Before Save
 MPrintFormatItem copyToClient(int To_Client_ID, int AD_PrintFormat_ID)
          Copy existing Definition To Client
static MPrintFormatItem createFromBViewColumn(MPrintFormat format, int AD_Column_ID, int AD_BView_ID, int seqNo)
           
static MPrintFormatItem createFromColumn(MPrintFormat format, int AD_Column_ID, int seqNo)
          Create Print Format Item from Column
 String getColumnName()
          Get ColumnName from AD_Column_ID
 String getPrintName(Language language)
          Get print name with language
 String getPrintNameSuffix(Language language)
          Get print name suffix with language
 boolean isBarcode()
          Barcode
 boolean isContent()
          Content
 boolean isFieldAlignBlock()
          Field Align Block
 boolean isFieldAlignDefault()
          Field Align Default
 boolean isFieldAlignLeading()
          Field Align Leading
 boolean isFieldAlignTrailing()
          Field Align Trailing
 boolean isFieldCenter()
          Field Center
 boolean isFooter()
          Footer
 boolean isHeader()
          Header
 boolean isLineAlignCenter()
          Line Align Center
 boolean isLineAlignLeading()
          Line Align Leading
 boolean isLineAlignTrailing()
          Line Align Trailing
 boolean isTypeBox()
          Type Box
 boolean isTypeField()
          Type Field
 boolean isTypeImage()
          Type Image
 boolean isTypePrintFormat()
          Type Print Format
 boolean isTypeText()
          Type Text
 String toString()
          String representation
 
Methods inherited from class org.compiere.model.X_AD_PrintFormatItem
get_AccessLevel, getAD_BView_Field_ID, getAD_Column_ID, getAD_PrintColor_ID, getAD_PrintFont_ID, getAD_PrintFormat_ID, getAD_PrintFormatChild_ID, getAD_PrintFormatItem_ID, getAD_PrintGraph_ID, getArcDiameter, getBarcodeType, getBelowColumn, getFieldAlignmentType, getImageURL, getKeyNamePair, getLineAlignmentType, getLineWidth, getMaxHeight, getMaxWidth, getName, getPrintAreaType, getPrintFormatType, getPrintName, getPrintNameSuffix, getRunningTotalLines, getSeqNo, getShapeType, getSortNo, getXPosition, getXSpace, getYPosition, getYSpace, initPO, isAveraged, isBarcodeTypeValid, isCentrallyMaintained, isCounted, isDeviationCalc, isFieldAlignmentTypeValid, isFilledRectangle, isFixedWidth, isGroupBy, isHeightOneLine, isImageField, isImageIsAttached, isLineAlignmentTypeValid, isMaxCalc, isMinCalc, isNextLine, isNextPage, isOrderBy, isPageBreak, isPrintAreaTypeValid, isPrinted, isPrintFormatTypeValid, isRelativePosition, isRunningTotal, isSetNLPosition, isShapeTypeValid, isSummarized, isSuppressNull, isVarianceCalc, setAD_BView_Field_ID, setAD_Column_ID, setAD_PrintColor_ID, setAD_PrintFont_ID, setAD_PrintFormat_ID, setAD_PrintFormatChild_ID, setAD_PrintFormatItem_ID, setAD_PrintGraph_ID, setArcDiameter, setBarcodeType, setBelowColumn, setFieldAlignmentType, setImageIsAttached, setImageURL, setIsAveraged, setIsCentrallyMaintained, setIsCounted, setIsDeviationCalc, setIsFilledRectangle, setIsFixedWidth, setIsGroupBy, setIsHeightOneLine, setIsImageField, setIsMaxCalc, setIsMinCalc, setIsNextLine, setIsNextPage, setIsOrderBy, setIsPageBreak, setIsPrinted, setIsRelativePosition, setIsRunningTotal, setIsSetNLPosition, setIsSummarized, setIsSuppressNull, setIsVarianceCalc, setLineAlignmentType, setLineWidth, setMaxHeight, setMaxWidth, setName, setPrintAreaType, setPrintFormatType, setPrintName, setPrintNameSuffix, setRunningTotalLines, setSeqNo, setShapeType, setSortNo, setXPosition, setXSpace, setYPosition, setYSpace
 
Methods inherited from class org.compiere.framework.PO
addAttachment, addAttachment, addError, afterDelete, beforeDelete, compare, convertToBigDecimal, convertToBoolean, convertToInt, convertToTimestamp, copy, copyValues, copyValues, createAttachment, delete_Accounting, delete, delete, dump, dump, equals, get_ChangeVO, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_EntityType, get_HashMap, get_ID, get_IDOld, get_Info, get_KeyColumns, get_Logger, get_Table_ID, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_ValuesAsString, get_WhereClause, get_xmlDocument, get_xmlString, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getVO, hashCode, insert_Accounting, is_Changed, is_KeyColumn, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveNew_getID, saveNewInsertSQL, saveNewSpecial, saveUpdate, set_ChangeVO, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueString, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setContext, setCtx, setDocWorkflowMgr, setIsActive, setStandardDefaults, setUpdateable, setUpdatedBy, toStringX, unlock, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MPrintFormatItem

public MPrintFormatItem(Ctx ctx,
                        int AD_PrintFormatItem_ID,
                        String trxName)
Constructor

Parameters:
ctx - context
AD_PrintFormatItem_ID - AD_PrintFormatItem_ID
trxName - transaction

MPrintFormatItem

public MPrintFormatItem(Ctx ctx,
                        ResultSet rs,
                        String trxName)
Constructor

Parameters:
ctx - context
rs - ResultSet
trxName - transaction
Method Detail

getPrintName

public String getPrintName(Language language)
Get print name with language

Parameters:
language - language - ignored if IsMultiLingualDocument not 'Y'
Returns:
print name

getPrintNameSuffix

public String getPrintNameSuffix(Language language)
Get print name suffix with language

Parameters:
language - language - ignored if IsMultiLingualDocument not 'Y'
Returns:
print name suffix

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:
toString in class X_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 - parent
AD_Column_ID - column
seqNo - sequence of display if 0 it is not printed
Returns:
Print Format Item

copyToClient

public MPrintFormatItem copyToClient(int To_Client_ID,
                                     int AD_PrintFormat_ID)
Copy existing Definition To Client

Parameters:
To_Client_ID - to client
AD_PrintFormat_ID - parent print format
Returns:
print format item

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord -
Returns:
true if ok

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save

Overrides:
afterSave in class PO
Parameters:
newRecord - new
success - success
Returns:
success

createFromBViewColumn

public static MPrintFormatItem createFromBViewColumn(MPrintFormat format,
                                                     int AD_Column_ID,
                                                     int AD_BView_ID,
                                                     int seqNo)

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.