Class TranslatedTextFileEntry

java.lang.Object
gg.xp.xivsupport.timelines.TranslatedTextFileEntry
All Implemented Interfaces:
TimelineEntry, Comparable<TimelineEntry>

public class TranslatedTextFileEntry extends Object implements TimelineEntry
  • Constructor Details

  • Method Details

    • getMinTime

      public double getMinTime()
      Specified by:
      getMinTime in interface TimelineEntry
      Returns:
      The earliest possible sync time
    • getMaxTime

      public double getMaxTime()
      Specified by:
      getMaxTime in interface TimelineEntry
      Returns:
      The latest possible sync time
    • eventSyncController

      @Nullable public @Nullable EventSyncController eventSyncController()
      Specified by:
      eventSyncController in interface TimelineEntry
    • getSyncToTime

      public Double getSyncToTime(LabelResolver resolver)
      Specified by:
      getSyncToTime in interface TimelineEntry
      Returns:
      The time to sync to, or null in the case of a resolution error (error should be logged elsewhere)
    • jumpLabel

      @Nullable public @Nullable String jumpLabel()
      Description copied from interface: TimelineEntry
      Same as TimelineEntry.jump(), but takes a 'label' to jump to instead of a raw time.
      Specified by:
      jumpLabel in interface TimelineEntry
      Returns:
      The jump label
      See Also:
    • forceJump

      public boolean forceJump()
      Description copied from interface: TimelineEntry
      Affects the behavior of TimelineEntry.jump() and TimelineEntry.jumpLabel(). If true, then the jump will occur unconditionally when the current timeline time hits the time of this entry (i.e. when we are T-0 from hitting this entry). If false, jumps will only occur when this entry is synced to.
      Specified by:
      forceJump in interface TimelineEntry
      Returns:
      whether to force jumps even without a sync
      See Also:
    • toString

      public String toString()
      Specified by:
      toString in interface TimelineEntry
      Overrides:
      toString in class Object
    • time

      public double time()
      Description copied from interface: TimelineEntry
      The time of this timeline entry
      Specified by:
      time in interface TimelineEntry
      Returns:
      The timeline entry's time
    • name

      @Nullable public @Nullable String name()
      Description copied from interface: TimelineEntry
      The name of this timeline entry.

      For most entries, this is the displayed name. For labels, it is the label name. For triggers, it is the text that will be displayed on-screen.

      Specified by:
      name in interface TimelineEntry
      Returns:
      The name
    • sync

      @Nullable public @Nullable Pattern sync()
      Description copied from interface: TimelineEntry
      ACT parsed line regex to sync to
      Specified by:
      sync in interface TimelineEntry
      Returns:
      The sync pattern
    • duration

      @Nullable public @Nullable Double duration()
      Description copied from interface: TimelineEntry
      An optional duration for the bar to be in "active" state as opposed to immediately becoming "in the past" when its time arrives.
      Specified by:
      duration in interface TimelineEntry
      Returns:
      The optional duration
    • timelineWindow

      @NotNull public @NotNull TimelineWindow timelineWindow()
      Description copied from interface: TimelineEntry
      The relative window in which this entry can be synced to
      Specified by:
      timelineWindow in interface TimelineEntry
      Returns:
      The sync window
    • jump

      @Nullable public @Nullable Double jump()
      Description copied from interface: TimelineEntry
      An optional time to jump to. If TimelineEntry.forceJump() is false, this line must have its sync conditions hit (i.e. we are syncing onto this line). If forceJump is true, then the jump will also happen if this timeline entry's time is hit.
      Specified by:
      jump in interface TimelineEntry
      Returns:
      The jump time.
      See Also:
    • enabled

      public boolean enabled()
      Specified by:
      enabled in interface TimelineEntry
      Returns:
      Whether this entry is enabled
    • compareTo

      public int compareTo(@NotNull @NotNull TimelineEntry o)
      Description copied from interface: TimelineEntry
      Compare the times of this timeline entry vs another entry
      Specified by:
      compareTo in interface Comparable<TimelineEntry>
      Specified by:
      compareTo in interface TimelineEntry
      Parameters:
      o - the timeline entry to which we are comparing
      Returns:
      The same as Double.compare(this.time(), o.time())
    • icon

      @Nullable public @Nullable URL icon()
      Specified by:
      icon in interface TimelineEntry
      Returns:
      An optional icon to display for the entry on the timeline bar and trigger (if it has one)
    • replaces

      @Nullable public @Nullable TimelineReference replaces()
      Specified by:
      replaces in interface TimelineEntry
      Returns:
      If this entry overrides another entry, return a reference to the entry it overrides. Otherwise, return null.
      See Also:
    • shouldSupersede

      public boolean shouldSupersede(TimelineEntry that)
      Description copied from interface: TimelineEntry
      Determine if another timeline entry should be replaced by this one. Always returns null if TimelineEntry.replaces() is null.
      Specified by:
      shouldSupersede in interface TimelineEntry
      Parameters:
      that - The entry to check if we are replacing.
      Returns:
      true if it should be superseded/replaced by this entry, false otherwise.
    • callout

      public boolean callout()
      Specified by:
      callout in interface TimelineEntry
      Returns:
      True if this entry is also a timeline trigger.
    • calloutPreTime

      public double calloutPreTime()
      Specified by:
      calloutPreTime in interface TimelineEntry
      Returns:
      The amount of time before this entry's TimelineEntry.time() that the trigger should fire
    • effectiveCalloutTime

      public double effectiveCalloutTime()
      Specified by:
      effectiveCalloutTime in interface TimelineEntry
      Returns:
      The effective time at which the trigger would fire
    • enabledForJob

      public boolean enabledForJob(Job job)
      Description copied from interface: TimelineEntry
      Whether the entry is enabled for a certain job
      Specified by:
      enabledForJob in interface TimelineEntry
      Parameters:
      job - The job
      Returns:
      true if enabled for that job
    • untranslated

      public TimelineEntry untranslated()
      Description copied from interface: TimelineEntry
      The untranslated version of this entry.
      Specified by:
      untranslated in interface TimelineEntry
      Returns:
      The untranslated version. Returns 'this' if it is already untranslated.