Class ChordRenderingInfo

java.lang.Object
org.jjazz.chordleadsheet.api.item.ChordRenderingInfo
All Implemented Interfaces:
Serializable

public class ChordRenderingInfo extends Object implements Serializable
Music rendering info associated to a chord.

This is an immutable class.

See Also:
  • Constructor Details

  • Method Details

    • getFeatures

      public EnumSet<ChordRenderingInfo.Feature> getFeatures()
      Get a copy of the rendering features.

      Default value is an empty EnumSet.

      Returns:
    • getAccentFeature

      public ChordRenderingInfo.Feature getAccentFeature()
      Get the accent feature if it's used.
      Returns:
      Can be null.
    • hasAllFeatures

      public boolean hasAllFeatures(ChordRenderingInfo.Feature f1, ChordRenderingInfo.Feature... fx)
      Test if this object features contains the specified features.

      Convenience method because of EnumSet...

      Parameters:
      f1 -
      fx -
      Returns:
    • hasOneFeature

      public boolean hasOneFeature(ChordRenderingInfo.Feature f1, ChordRenderingInfo.Feature... fx)
      Test if this object features contains one of the specified features.

      Convenience method because of EnumSet...

      Parameters:
      f1 -
      fx -
      Returns:
    • getTransposed

      public ChordRenderingInfo getTransposed(int t)
      Return a new object transposed by the specified semi-tons (StandardScaleInstance startNote is impacted).

      Default value is 0.

      Parameters:
      t - Transposition in semi-tons.
      Returns:
    • getScaleInstance

      public StandardScaleInstance getScaleInstance()
      The standard scale instance that should be used for this chord.

      Default value is null.

      Returns:
      Can be null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUserString

      public String toUserString()
      A string representation for UI.

      Ex: "[CRASH] - Phrygian(C)", or "Phrygian(C)", or "[CRASH]".
      Return an empty string if no features and no scale.

      Returns: