Class MPrintPaper

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_PrintPaper, I_Persistent, Evaluatee, ImmutablePOSupport

public class MPrintPaper extends X_AD_PrintPaper implements ImmutablePOSupport
AD_PrintPaper Print Paper Model

Change log:

  • 2009-02-10 - armen - [ 2580531 ] Custom Paper Support - https://sourceforge.net/p/adempiere/feature-requests/655/
Version:
$Id: MPrintPaper.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
Author:
Jorg Janke, Teo Sarca
  • FR [ 2829019 ] Check PrintPaper on save https://sourceforge.net/p/adempiere/feature-requests/782/
  • See Also:
    • Constructor Details

      • MPrintPaper

        public MPrintPaper(Properties ctx, String AD_PrintPaper_UU, String trxName)
        UUID based Constructor
        Parameters:
        ctx - Context
        AD_PrintPaper_UU - UUID key
        trxName - Transaction
      • MPrintPaper

        public MPrintPaper(Properties ctx, int AD_PrintPaper_ID, String trxName)
        Create or load existing record.
        New record default to A4 (Code="iso-a4")
        Parameters:
        ctx - context
        AD_PrintPaper_ID -
        trxName - transaction
      • MPrintPaper

        public MPrintPaper(Properties ctx, ResultSet rs, String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - trx
      • MPrintPaper

        public MPrintPaper(MPrintPaper copy)
        Copy constructor
        Parameters:
        copy -
      • MPrintPaper

        public MPrintPaper(Properties ctx, MPrintPaper copy)
        Copy constructor
        Parameters:
        ctx -
        copy -
      • MPrintPaper

        public MPrintPaper(Properties ctx, MPrintPaper copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Details

      • get

        public static MPrintPaper get(int AD_PrintPaper_ID)
        Get MPrintPaper from cache (immutable)
        Parameters:
        AD_PrintPaper_ID - id
        Returns:
        MPrintPaper
      • getMediaSize

        public MediaSize getMediaSize()
        Get Media Size.
        The search is hard coded as the javax.print.MediaSize* info is private.
        Returns:
        MediaSize from Code
      • getMediaSizeDefault

        public MediaSize getMediaSizeDefault()
        Get Default Media Size
        Returns:
        Default Media Size based on Language
      • getUnitsInt

        public int getUnitsInt()
        Get Dimension Units
        Returns:
        dimension units (Size2DSyntax.MM or Size2DSyntax.INCH)
      • getCPaper

        public CPaper getCPaper()
        Get CPaper
        Returns:
        CPaper
      • 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 class PO
        Parameters:
        newRecord - true if it is a new record
        Returns:
        true if record can be saved
      • markImmutable

        public MPrintPaper markImmutable()
        Description copied from interface: ImmutablePOSupport
        mark PO as immutable
        Specified by:
        markImmutable in interface ImmutablePOSupport
        Returns:
        PO