Class LXScheduler

java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.scheduler.LXScheduler
All Implemented Interfaces:
LXLoopTask, LXPath, LXSerializable, LXParameterListener

public class LXScheduler extends LXComponent implements LXLoopTask
  • Field Details

  • Constructor Details

    • LXScheduler

      public LXScheduler(LX lx)
  • Method Details

    • onParameterChanged

      public void onParameterChanged(LXParameter p)
      Description copied from class: LXComponent
      Subclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.
      Specified by:
      onParameterChanged in interface LXParameterListener
      Overrides:
      onParameterChanged in class LXComponent
      Parameters:
      p - Parameter that has a value change
    • addListener

      public LXScheduler addListener(LXScheduler.Listener listener)
    • removeListener

      public LXScheduler removeListener(LXScheduler.Listener listener)
    • addEntry

      public LXScheduledProject addEntry()
    • addEntry

      public LXScheduledProject addEntry(File projectFile)
    • removeEntry

      public LXScheduler removeEntry(LXScheduledProject entry)
    • moveEntry

      public LXScheduler moveEntry(LXScheduledProject entry, int index)
    • isInTransition

      public boolean isInTransition()
    • getTransitionProgress

      public double getTransitionProgress()
    • loop

      public void loop(double deltaMs)
      Specified by:
      loop in interface LXLoopTask
    • openEntry

      protected void openEntry(LXScheduledProject entry)
    • setSchedule

      protected void setSchedule(File file, LXScheduler.Listener.Change change)
    • newSchedule

      public void newSchedule()
    • openSchedule

      public void openSchedule(File file)
    • openSchedule

      public void openSchedule(File file, boolean openInitialProject)
    • saveSchedule

      public void saveSchedule()
    • saveSchedule

      public void saveSchedule(File file)
    • load

      public void load(LX lx, JsonObject obj)
      Description copied from class: LXComponent
      Loads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.
      Specified by:
      load in interface LXSerializable
      Overrides:
      load in class LXComponent
      Parameters:
      lx - LX instance
      obj - Object to deserialize
    • save

      public void save(LX lx, JsonObject obj)
      Description copied from class: LXComponent
      Serializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to call super.save(lx, obj) at the appropriate time.
      Specified by:
      save in interface LXSerializable
      Overrides:
      save in class LXComponent
      Parameters:
      lx - LX instance
      obj - Object to serialize into