Class ChordRenderingInfo
java.lang.Object
org.jjazz.chordleadsheet.api.item.ChordRenderingInfo
- All Implemented Interfaces:
Serializable
Music rendering info associated to a chord.
This is an immutable class.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Change the way music is rendered for a chord symbol. -
Constructor Summary
ConstructorDescriptionCreate an object with default values.ChordRenderingInfo
(EnumSet<ChordRenderingInfo.Feature> features) Create an object with specified Features and default values.ChordRenderingInfo
(EnumSet<ChordRenderingInfo.Feature> features, StandardScaleInstance scale) Create a new object with the specified parameters.ChordRenderingInfo
(ChordRenderingInfo cri, EnumSet<ChordRenderingInfo.Feature> features) Create an object with specified scale and default values. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the accent feature if it's used.Get a copy of the rendering features.The standard scale instance that should be used for this chord.getTransposed
(int t) Return a new object transposed by the specified semi-tons (StandardScaleInstance startNote is impacted).boolean
Test if this object features contains the specified features.int
hashCode()
boolean
Test if this object features contains one of the specified features.toString()
A string representation for UI.
-
Constructor Details
-
ChordRenderingInfo
public ChordRenderingInfo()Create an object with default values. -
ChordRenderingInfo
Create an object with specified Features and default values.- Parameters:
features
- If null use the default value.
-
ChordRenderingInfo
Create an object with specified scale and default values.- Parameters:
scale
- If null use the default value.
-
ChordRenderingInfo
public ChordRenderingInfo(EnumSet<ChordRenderingInfo.Feature> features, StandardScaleInstance scale) Create a new object with the specified parameters.- Parameters:
features
- If null use the default value.scale
- Can be null if no scale defined.- Throws:
IllegalArgumentException
- If the features object is not consistent, e.g. SHOT and HOLD can't both be used.
-
ChordRenderingInfo
-
ChordRenderingInfo
-
-
Method Details
-
getFeatures
Get a copy of the rendering features.Default value is an empty EnumSet.
- Returns:
-
getAccentFeature
Get the accent feature if it's used.- Returns:
- Can be null.
-
hasAllFeatures
Test if this object features contains the specified features.Convenience method because of EnumSet...
- Parameters:
f1
-fx
-- Returns:
-
hasOneFeature
Test if this object features contains one of the specified features.Convenience method because of EnumSet...
- Parameters:
f1
-fx
-- Returns:
-
getTransposed
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
The standard scale instance that should be used for this chord.Default value is null.
- Returns:
- Can be null
-
hashCode
public int hashCode() -
equals
-
toString
-
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:
-