Package gg.xp.xivsupport.timelines
Class TranslatedTextFileEntry
java.lang.Object
gg.xp.xivsupport.timelines.TranslatedTextFileEntry
- All Implemented Interfaces:
TimelineEntry,Comparable<TimelineEntry>
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatedTextFileEntry(TimelineEntry untranslated, @Nullable String nameOverride, @Nullable Pattern syncOverride, @Nullable EventSyncController esc) -
Method Summary
Modifier and TypeMethodDescriptionbooleancallout()doubleintcompareTo(@NotNull TimelineEntry o) Compare the times of this timeline entry vs another entry@Nullable Doubleduration()An optional duration for the bar to be in "active" state as opposed to immediately becoming "in the past" when its time arrives.doublebooleanenabled()booleanenabledForJob(Job job) Whether the entry is enabled for a certain job@Nullable EventSyncControllerbooleanAffects the behavior ofTimelineEntry.jump()andTimelineEntry.jumpLabel().doubledoublegetSyncToTime(LabelResolver resolver) @Nullable URLicon()@Nullable Doublejump()An optional time to jump to.@Nullable StringSame asTimelineEntry.jump(), but takes a 'label' to jump to instead of a raw time.@Nullable Stringname()The name of this timeline entry.@Nullable TimelineReferencereplaces()booleanshouldSupersede(TimelineEntry that) Determine if another timeline entry should be replaced by this one.@Nullable Patternsync()ACT parsed line regex to sync todoubletime()The time of this timeline entry@NotNull TimelineWindowThe relative window in which this entry can be synced totoString()The untranslated version of this entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gg.xp.xivsupport.timelines.TimelineEntry
canSync, eventSyncType, getAllTextEntries, getImportSource, hasEventSync, isImported, isLabel, makeTriggerJs, makeTriggerTimelineEntries, shouldSync, shouldSync, toTextFormat
-
Constructor Details
-
TranslatedTextFileEntry
public TranslatedTextFileEntry(TimelineEntry untranslated, @Nullable @Nullable String nameOverride, @Nullable @Nullable Pattern syncOverride, @Nullable @Nullable EventSyncController esc)
-
-
Method Details
-
getMinTime
public double getMinTime()- Specified by:
getMinTimein interfaceTimelineEntry- Returns:
- The earliest possible sync time
-
getMaxTime
public double getMaxTime()- Specified by:
getMaxTimein interfaceTimelineEntry- Returns:
- The latest possible sync time
-
eventSyncController
- Specified by:
eventSyncControllerin interfaceTimelineEntry
-
getSyncToTime
- Specified by:
getSyncToTimein interfaceTimelineEntry- Returns:
- The time to sync to, or null in the case of a resolution error (error should be logged elsewhere)
-
jumpLabel
Description copied from interface:TimelineEntrySame asTimelineEntry.jump(), but takes a 'label' to jump to instead of a raw time.- Specified by:
jumpLabelin interfaceTimelineEntry- Returns:
- The jump label
- See Also:
-
forceJump
public boolean forceJump()Description copied from interface:TimelineEntryAffects the behavior ofTimelineEntry.jump()andTimelineEntry.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:
forceJumpin interfaceTimelineEntry- Returns:
- whether to force jumps even without a sync
- See Also:
-
toString
- Specified by:
toStringin interfaceTimelineEntry- Overrides:
toStringin classObject
-
time
public double time()Description copied from interface:TimelineEntryThe time of this timeline entry- Specified by:
timein interfaceTimelineEntry- Returns:
- The timeline entry's time
-
name
Description copied from interface:TimelineEntryThe 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:
namein interfaceTimelineEntry- Returns:
- The name
-
sync
Description copied from interface:TimelineEntryACT parsed line regex to sync to- Specified by:
syncin interfaceTimelineEntry- Returns:
- The sync pattern
-
duration
Description copied from interface:TimelineEntryAn optional duration for the bar to be in "active" state as opposed to immediately becoming "in the past" when its time arrives.- Specified by:
durationin interfaceTimelineEntry- Returns:
- The optional duration
-
timelineWindow
Description copied from interface:TimelineEntryThe relative window in which this entry can be synced to- Specified by:
timelineWindowin interfaceTimelineEntry- Returns:
- The sync window
-
jump
Description copied from interface:TimelineEntryAn optional time to jump to. IfTimelineEntry.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:
jumpin interfaceTimelineEntry- Returns:
- The jump time.
- See Also:
-
enabled
public boolean enabled()- Specified by:
enabledin interfaceTimelineEntry- Returns:
- Whether this entry is enabled
-
compareTo
Description copied from interface:TimelineEntryCompare the times of this timeline entry vs another entry- Specified by:
compareToin interfaceComparable<TimelineEntry>- Specified by:
compareToin interfaceTimelineEntry- Parameters:
o- the timeline entry to which we are comparing- Returns:
- The same as
Double.compare(this.time(), o.time())
-
icon
- Specified by:
iconin interfaceTimelineEntry- Returns:
- An optional icon to display for the entry on the timeline bar and trigger (if it has one)
-
replaces
- Specified by:
replacesin interfaceTimelineEntry- Returns:
- If this entry overrides another entry, return a reference to the entry it overrides. Otherwise, return null.
- See Also:
-
shouldSupersede
Description copied from interface:TimelineEntryDetermine if another timeline entry should be replaced by this one. Always returns null ifTimelineEntry.replaces()is null.- Specified by:
shouldSupersedein interfaceTimelineEntry- 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:
calloutin interfaceTimelineEntry- Returns:
- True if this entry is also a timeline trigger.
-
calloutPreTime
public double calloutPreTime()- Specified by:
calloutPreTimein interfaceTimelineEntry- Returns:
- The amount of time before this entry's
TimelineEntry.time()that the trigger should fire
-
effectiveCalloutTime
public double effectiveCalloutTime()- Specified by:
effectiveCalloutTimein interfaceTimelineEntry- Returns:
- The effective time at which the trigger would fire
-
enabledForJob
Description copied from interface:TimelineEntryWhether the entry is enabled for a certain job- Specified by:
enabledForJobin interfaceTimelineEntry- Parameters:
job- The job- Returns:
- true if enabled for that job
-
untranslated
Description copied from interface:TimelineEntryThe untranslated version of this entry.- Specified by:
untranslatedin interfaceTimelineEntry- Returns:
- The untranslated version. Returns 'this' if it is already untranslated.
-