Package org.jjazz.cl_editor.api
Class SelectedBar
java.lang.Object
org.jjazz.cl_editor.api.SelectedBar
- All Implemented Interfaces:
Comparable<SelectedBar>
A class to represent a selected bar in the chordleadsheet editor.
This is an immutable class.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The modelBarIndex to use for a selectedBar after the end of the leadsheet. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Comparison based on barBoxIndex, ignore container.boolean
Relies on container and barBoxIndex.int
int
Return getBarBoxIndex() if it is less than container's size, otherwise return POST_END_BAR_MODEL_BAR_INDEX.int
hashCode()
Relies on container and barBoxIndex.toString()
-
Field Details
-
POST_END_BAR_MODEL_BAR_INDEX
public static final int POST_END_BAR_MODEL_BAR_INDEXThe modelBarIndex to use for a selectedBar after the end of the leadsheet.- See Also:
-
-
Constructor Details
-
SelectedBar
-
-
Method Details
-
getBarBoxIndex
public int getBarBoxIndex()- Returns:
-
getModelBarIndex
public int getModelBarIndex()Return getBarBoxIndex() if it is less than container's size, otherwise return POST_END_BAR_MODEL_BAR_INDEX.- Returns:
-
getContainer
-
equals
Relies on container and barBoxIndex. -
hashCode
public int hashCode()Relies on container and barBoxIndex. -
toString
-
compareTo
Comparison based on barBoxIndex, ignore container.- Specified by:
compareTo
in interfaceComparable<SelectedBar>
- Parameters:
t
-- Returns:
-