Class MColorSchema

    • Constructor Detail

      • MColorSchema

        public MColorSchema​(Properties ctx,
                            int PA_ColorSchema_ID,
                            String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        PA_ColorSchema_ID - id
        trxName - trx
      • MColorSchema

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

        public MColorSchema​(MColorSchema copy)
        Parameters:
        copy -
    • Method Detail

      • getColor

        public static Color getColor​(Properties ctx,
                                     int PA_ColorSchema_ID,
                                     BigDecimal target,
                                     BigDecimal actual)
        Get Color
        Parameters:
        ctx - context
        PA_ColorSchema_ID - id
        target - target value
        actual - actual value
        Returns:
        color
      • getColor

        public static Color getColor​(Properties ctx,
                                     int PA_ColorSchema_ID,
                                     int percent)
        Get Color
        Parameters:
        ctx - context
        PA_ColorSchema_ID - id
        percent - percent
        Returns:
        color
      • get

        public static MColorSchema get​(int PA_ColorSchema_ID)
        Get MColorSchema from Cache
        Parameters:
        PA_ColorSchema_ID - id
        Returns:
        MColorSchema
      • get

        public static MColorSchema get​(Properties ctx,
                                       int PA_ColorSchema_ID)
        Get MColorSchema from Cache
        Parameters:
        ctx - context
        PA_ColorSchema_ID - id
        Returns:
        MColorSchema
      • getCopy

        public static MColorSchema getCopy​(Properties ctx,
                                           int PA_ColorSchema_ID,
                                           String trxName)
        Get updateable copy of MColorSchema from cache
        Parameters:
        ctx -
        PA_ColorSchema_ID -
        trxName -
        Returns:
        MColorSchema
      • setDefault

        public void setDefault()
        Set Default. Red (50) - Yellow (100) - Green
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • getColor

        public Color getColor​(int percent)
        Get Color
        Parameters:
        percent - percent
        Returns:
        color