Class ProfilingAttributeStylePO

java.lang.Object
ro.sync.ecss.conditions.ProfilingAttributeStylePO
All Implemented Interfaces:
Serializable, Cloneable, PersistentObject

@API(type=EXTENDABLE, src=PRIVATE) public class ProfilingAttributeStylePO extends Object implements PersistentObject
Contains information about a profiling attribute value and associated profiling styles.
See Also:
  • Field Details

  • Constructor Details

    • ProfilingAttributeStylePO

      public ProfilingAttributeStylePO()
      Constructor.
    • ProfilingAttributeStylePO

      public ProfilingAttributeStylePO(String framework, String attributeName, String attributeValue, int foreground, int background, String textDecoration, boolean bold, boolean italic)
      Constructor.
      Parameters:
      framework - The name of the document type.
      attributeName - The attribute name.
      attributeValue - The attribute value.
      foreground - Foreground color to be applied on the content profiled by using this condition value.
      background - Background color to be applied on the content profiled by using this condition value.
      textDecoration - Text decoration to be applied on the content profiled by using this condition value.
      bold - true if the bold style should be applied on the content profiled by using this condition value.
      italic - true if the italic style should be applied on the content profiled by using this condition value.
    • ProfilingAttributeStylePO

      public ProfilingAttributeStylePO(String framework, String attributeName, String attributGroupName, String attributeValue, int foreground, int background, String textDecoration, boolean bold, boolean italic)
      Constructor.
      Parameters:
      framework - The name of the document type.
      attributeName - The attribute name.
      attributGroupName - The attribute group name.
      attributeValue - The attribute value.
      foreground - Foreground color to be applied on the content profiled by using this condition value.
      background - Background color to be applied on the content profiled by using this condition value.
      textDecoration - Text decoration to be applied on the content profiled by using this condition value.
      bold - true if the bold style should be applied on the content profiled by using this condition value.
      italic - true if the italic style should be applied on the content profiled by using this condition value.
  • Method Details

    • setDocTypePattern

      public void setDocTypePattern(String docTypePattern)
      Set the document type pattern.
      Parameters:
      docTypePattern - The document type pattern.
    • setAttributeName

      public void setAttributeName(String attributeName)
      Set the profiling attribute name.
      Parameters:
      attributeName - The profiling attribute name.
    • setAttributeGroupName

      public void setAttributeGroupName(String attributeGroupName)
      Set the attribute group name.
      Parameters:
      attributeGroupName - The attributeGroupName to set.
    • setAttributeValue

      public void setAttributeValue(String attributeValue)
      Set the profiling attribute value.
      Parameters:
      attributeValue - The profiling attribute value.
    • setForegroundColor

      public void setForegroundColor(int foregroundColor)
      Set the foreground color to be applied on the content profiled by using this condition value.
      Parameters:
      foregroundColor - The foreground color.
    • getForegroundColor

      public int getForegroundColor()
      Returns:
      Returns the foreground color to be applied on the content profiled by using this condition value.
    • setBackgroundColor

      public void setBackgroundColor(int backgroundColor)
      Set the background color to be applied on the content profiled by using this condition value.
      Parameters:
      backgroundColor - The background color.
    • getBackgroundColor

      public int getBackgroundColor()
      Returns:
      Returns the background color to be applied on the content profiled by using this condition value.
    • checkValid

      public void checkValid() throws InvalidPersistentObjException
      Description copied from interface: PersistentObject
      Check if object is valid to be used. Method is called after it is deserialized from options. If not then throw an InvalidPersistentObjException exception.
      Specified by:
      checkValid in interface PersistentObject
      Throws:
      InvalidPersistentObjException - Thrown when instance is not valid.
      See Also:
    • getNotPersistentFieldNames

      public String[] getNotPersistentFieldNames()
      Specified by:
      getNotPersistentFieldNames in interface PersistentObject
      Returns:
      The names of the field from this object which should not be serialized.
      See Also:
    • clone

      public Object clone()
      Description copied from interface: PersistentObject
      Forces all the persistent objects to be cloneable.
      Specified by:
      clone in interface PersistentObject
      Overrides:
      clone in class Object
      Returns:
      A clone of this object. The clone and the original are disjunct. They share only immutable objects, like Strings, Integers, etc.
      See Also:
    • getDocumentTypePattern

      public String getDocumentTypePattern()
      Returns:
      The document type pattern
    • getAttributeName

      public String getAttributeName()
      Returns:
      The attribute name.
    • getAttributeGroupName

      public String getAttributeGroupName()
      Returns:
      The attribute group name.
    • getAttributeValue

      public String getAttributeValue()
      Returns:
      The attribute value
    • setTextDecoration

      public void setTextDecoration(String textDecoration)
      Parameters:
      textDecoration - Text decoration to be applied on the content profiled by using this condition value.
    • getTextDecoration

      public String getTextDecoration()
      Get the text decoration to be applied on the content profiled by using this condition value.
      Example values: "underline", "overline", "double_underline".
      Returns:
      Returns the text decoration.
    • setBold

      public void setBold(boolean bold)
      Parameters:
      bold - true if the bold style should be applied on the content profiled by using this condition value.
    • isBold

      public boolean isBold()
      Returns:
      Returns true if the bold style should be applied on the content profiled by using this condition value.
    • setItalic

      public void setItalic(boolean italic)
      Parameters:
      italic - true if the italic style should be applied on the content profiled by using this condition value.
    • isItalic

      public boolean isItalic()
      Returns:
      Returns true if the italic style should be applied on the content profiled by using this condition value.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if the profiling style is empty, meaning no text style, decoration and colors have been set.
    • getDisplayedValue

      public String getDisplayedValue()
      Get the display value. If the attribute group is defined, will be contains by the displayed value.
      Returns:
      The displayed value.