Class LXSnapshot.View

java.lang.Object
heronarts.lx.snapshot.LXSnapshot.View
All Implemented Interfaces:
LXSerializable
Direct Known Subclasses:
LXSnapshot.ActivePatternView, LXSnapshot.ChannelFaderView, LXSnapshot.ParameterView
Enclosing class:
LXSnapshot

public abstract class LXSnapshot.View extends Object implements LXSerializable
A view is a component of a snapshot, it's a single piece of the snapshot that is "looking at" one piece of state.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable

    LXSerializable.Utils
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Whether this view is enabled for recall or not.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
    Subclasses may override, indicates the completion of a transition
    abstract LXCommand
    Gets a command version of this view's operation, needed to make this action undoable.
    Returns the snapshot that this view belongs to
    protected void
    interpolate(double amount)
    Subclasses may override, indicates the progress of a transition
    protected abstract boolean
    Subclasses must implement, determines whether the given view is dependent upon the specified component, and whether this view should be removed if the component is disposed
    void
    load(LX lx, JsonObject obj)
    Restores this instance from a JSON object
    protected abstract void
    Subclasses must implement, should reapply the state of the view immediately
    void
    save(LX lx, JsonObject obj)
    Serializes this instance into the JSON object
    protected void
    Subclasses may override, indicates the beginning of a transition

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getSnapshot

      public LXSnapshot getSnapshot()
      Returns the snapshot that this view belongs to
      Returns:
      Snapshot that this view belongs to
    • getCommand

      public abstract LXCommand getCommand()
      Gets a command version of this view's operation, needed to make this action undoable.
      Returns:
      Command implementation of this view
    • isDependentOf

      protected abstract boolean isDependentOf(LXComponent component)
      Subclasses must implement, determines whether the given view is dependent upon the specified component, and whether this view should be removed if the component is disposed
      Parameters:
      component - Component to test
      Returns:
      true if this view depends upon that component's existence, false otherwise
    • recall

      protected abstract void recall()
      Subclasses must implement, should reapply the state of the view immediately
    • startTransition

      protected void startTransition()
      Subclasses may override, indicates the beginning of a transition
    • interpolate

      protected void interpolate(double amount)
      Subclasses may override, indicates the progress of a transition
      Parameters:
      amount - Amount of interpolation to apply
    • finishTransition

      protected void finishTransition()
      Subclasses may override, indicates the completion of a transition
    • save

      public void save(LX lx, JsonObject obj)
      Description copied from interface: LXSerializable
      Serializes this instance into the JSON object
      Specified by:
      save in interface LXSerializable
      Parameters:
      lx - LX instance
      obj - Object to serialize into
    • load

      public void load(LX lx, JsonObject obj)
      Description copied from interface: LXSerializable
      Restores this instance from a JSON object
      Specified by:
      load in interface LXSerializable
      Parameters:
      lx - LX instance
      obj - Object to deserialize
    • dispose

      public void dispose()