Class MLabel

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

public class MLabel extends X_AD_Label
Record Label Model
See Also:
  • Constructor Details

    • MLabel

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

      public MLabel(Properties ctx, int AD_Label_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      AD_Label_ID - id
      trxName - transaction
    • MLabel

      public MLabel(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - transaction
  • Method Details

    • buildStyle

      public String buildStyle()
       Calculates the label css style based on priorities:
       1- Label style;
       2- Category style;
       3- Label Hash to Hex
       
      Returns:
      css style
    • calculateHexColor

      public static String calculateHexColor(String text)
      Calculates a color for a given text
      Parameters:
      text -
      Returns:
      hex color
    • getByName

      public static MLabel getByName(Properties ctx, String name, String trxName)
      Get Label record by name
      Parameters:
      ctx -
      name -
      trxName -
      Returns:
      MLabel