Class CueList.Entry

  • Enclosing class:
    CueList

    public static class CueList.Entry
    extends Object
    Breaks out information about each entry in the cue list.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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 cue, or null 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 cue will be displayed in rekordbox, if it is a hot cue with a recognized color code, or null 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 entries.
      Entry​(int number, long position, String comment, Color embeddedColor, Color rekordboxColor)
      Constructor for non-loop entries.
    • 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 to cuePosition.
      • 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 to cueTime.
      • 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, or null if 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, or null if 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 identifier
        position - the position of this cue/memory point in half-frame units, which are 1/150 of a second
        comment - the DJ-assigned comment, or an empty string if none was assigned
        embeddedColor - the explicit color embedded in the cue, if any
        rekordboxColor - 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 identifier
        startPosition - the position of the start of this loop in half-frame units, which are 1/150 of a second
        endPosition - the position of the end of this loop in half-frame units
        comment - the DJ-assigned comment, or an empty string if none was assigned
        embeddedColor - the explicit color embedded in the cue, if any
        rekordboxColor - the color that rekordbox will display for this cue, if available
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 to getNexusColor().
        Returns:
        the most suitable available display color for the cue