Package org.deepsymmetry.beatlink.data
Class CueList.Entry
- java.lang.Object
-
- org.deepsymmetry.beatlink.data.CueList.Entry
-
-
Field Summary
Fields Modifier and Type Field Description int
colorId
The color table ID identifying the color assigned to a memory point or loop.String
comment
If the entry was constructed from an extended nxs2-style commented cue tag, and the DJ assigned a comment to the cue, this will contain the comment text.long
cuePosition
Indicates the location of the cue in half-frame units, which are 1/150 of a second.long
cueTime
Indicates the location of the cue in milliseconds.Color
embeddedColor
The explicit color embedded into the hot cue, ornull
if there was none.int
hotCueNumber
If this has a non-zero value, this entry is a hot cue with that identifier.boolean
isLoop
Indicates whether this entry represents a loop, as opposed to a simple cue point.long
loopPosition
If the entry represents a loop, indicates the loop point in half-frame units, which are 1/150 of a second.long
loopTime
If the entry represents a loop, indicates the loop point in milliseconds.Color
rekordboxColor
The color with which this hot cue will be displayed in rekordbox, if it is a hot cue with a recognized color code, ornull
if that does not apply.
-
Constructor Summary
Constructors Constructor Description Entry(int number, long startPosition, long endPosition, String comment, Color embeddedColor, Color rekordboxColor)
Constructor for loop hot cue entries.Entry(int number, long position, String comment, Color embeddedColor, Color rekordboxColor)
Constructor for non-loop hot cue entries.Entry(long startPosition, long endPosition, String comment, int colorId)
Constructor for loop hot cue entries.Entry(long position, String comment, int colorId)
Constructor for non-loop memory point entries.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Color
getColor()
Determine the best color to be used to display this cue.String
getDescription()
Provides a brief description of the cue, suitable for a tool tip explaining its marker on a waveform preview.Color
getNexusColor()
Determine the color that an original Nexus series player would use to display this cue.int
hashCode()
String
toString()
-
-
-
Field Detail
-
hotCueNumber
public final int hotCueNumber
If this has a non-zero value, this entry is a hot cue with that identifier.
-
isLoop
public final boolean isLoop
Indicates whether this entry represents a loop, as opposed to a simple cue point.
-
cuePosition
public final long cuePosition
Indicates the location of the cue in half-frame units, which are 1/150 of a second. If the cue is a loop, this is the start of the loop.
-
cueTime
public final long cueTime
Indicates the location of the cue in milliseconds. If the cue is a loop, this is the start of the loop.
-
loopPosition
public final long loopPosition
If the entry represents a loop, indicates the loop point in half-frame units, which are 1/150 of a second. The loop point is the end of the loop, at which point playback jumps back tocuePosition
.
-
loopTime
public final long loopTime
If the entry represents a loop, indicates the loop point in milliseconds. The loop point is the end of the loop, at which point playback jumps back tocueTime
.
-
comment
public final String comment
If the entry was constructed from an extended nxs2-style commented cue tag, and the DJ assigned a comment to the cue, this will contain the comment text. Otherwise it will be an empty string.
-
colorId
public final int colorId
The color table ID identifying the color assigned to a memory point or loop.
-
embeddedColor
public final Color embeddedColor
The explicit color embedded into the hot cue, ornull
if there was none.
-
rekordboxColor
public final Color rekordboxColor
The color with which this hot cue will be displayed in rekordbox, if it is a hot cue with a recognized color code, ornull
if that does not apply.
-
-
Constructor Detail
-
Entry
public Entry(long position, String comment, int colorId)
Constructor for non-loop memory point entries.- Parameters:
position
- the position of this cue/memory point in half-frame units, which are 1/150 of a secondcomment
- the DJ-assigned comment, or an empty string if none was assignedcolorId
- the row in the color table representing the color assigned this cue, or zero if none
-
Entry
public Entry(long startPosition, long endPosition, String comment, int colorId)
Constructor for loop hot cue entries.- Parameters:
startPosition
- the position of the start of this loop in half-frame units, which are 1/150 of a secondendPosition
- the position of the end of this loop in half-frame unitscomment
- the DJ-assigned comment, or an empty string if none was assignedcolorId
- the row in the color table representing the color assigned this loop, or zero if none
-
Entry
public Entry(int number, long position, String comment, Color embeddedColor, Color rekordboxColor)
Constructor for non-loop hot cue entries.- Parameters:
number
- the non-zero hot cue identifierposition
- the position of this cue/memory point in half-frame units, which are 1/150 of a secondcomment
- the DJ-assigned comment, or an empty string if none was assignedembeddedColor
- the explicit color embedded in the hot cue, if anyrekordboxColor
- the color that rekordbox will display for this hot cue, if available
-
Entry
public Entry(int number, long startPosition, long endPosition, String comment, Color embeddedColor, Color rekordboxColor)
Constructor for loop hot cue entries.- Parameters:
number
- the non-zero hot cue identifierstartPosition
- the position of the start of this loop in half-frame units, which are 1/150 of a secondendPosition
- the position of the end of this loop in half-frame unitscomment
- the DJ-assigned comment, or an empty string if none was assignedembeddedColor
- the explicit color embedded in the cue, if anyrekordboxColor
- the color that rekordbox will display for this cue, if available
-
-
Method Detail
-
getNexusColor
public Color getNexusColor()
Determine the color that an original Nexus series player would use to display this cue. Hot cues are green, loops are orange, and ordinary memory points are red.- Returns:
- the color that represents this cue on players that don't support nxs2 colored cues.
-
getColor
public Color getColor()
Determine the best color to be used to display this cue. If it is a memory point, its color will be a reference to the standard colors table, as implemented by
ColorItem.colorForId(int)
.If it is a hot cue, things are more complex: If there is an indexed rekordbox color in the cue, use that; otherwise, if there is an explicit color embedded, use that, and if neither of those is available, delegate to
getNexusColor()
.- Returns:
- the most suitable available display color for the cue
-
getDescription
public String getDescription()
Provides a brief description of the cue, suitable for a tool tip explaining its marker on a waveform preview.- Returns:
- a terse label summarizing the cue's nature
-
-