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 StringcommentIf 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.longcuePositionIndicates the location of the cue in half-frame units, which are 1/150 of a second.longcueTimeIndicates the location of the cue in milliseconds.ColorembeddedColorThe explicit color embedded into the cue, ornullif there was none.inthotCueNumberIf this has a non-zero value, this entry is a hot cue with that identifier.booleanisLoopIndicates whether this entry represents a loop, as opposed to a simple cue point.longloopPositionIf the entry represents a loop, indicates the loop point in half-frame units, which are 1/150 of a second.longloopTimeIf the entry represents a loop, indicates the loop point in milliseconds.ColorrekordboxColorThe color with which this cue will be displayed in rekordbox, if it is a hot cue with a recognized color code, ornullif 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 entries.Entry(int number, long position, String comment, Color embeddedColor, Color rekordboxColor)Constructor for non-loop entries.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ColorgetColor()Determine the best color to be used to display this cue.ColorgetNexusColor()Determine the color that an original Nexus series player would use to display this cue.inthashCode()StringtoString()
-
-
-
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.
-
embeddedColor
public final Color embeddedColor
The explicit color embedded into the cue, ornullif there was none.
-
rekordboxColor
public final Color rekordboxColor
The color with which this cue will be displayed in rekordbox, if it is a hot cue with a recognized color code, ornullif that does not apply.
-
-
Constructor Detail
-
Entry
public Entry(int number, long position, String comment, Color embeddedColor, Color rekordboxColor)Constructor for non-loop entries.- Parameters:
number- if non-zero, this is a hot cue, with the specified 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 cue, if anyrekordboxColor- the color that rekordbox will display for this cue, if available
-
Entry
public Entry(int number, long startPosition, long endPosition, String comment, Color embeddedColor, Color rekordboxColor)Constructor for loop entries.- Parameters:
number- if non-zero, this is a hot cue, with the specified 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 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 togetNexusColor().- Returns:
- the most suitable available display color for the cue
-
-