Class LXSnapshot.ParameterView

java.lang.Object
heronarts.lx.snapshot.LXSnapshot.View
heronarts.lx.snapshot.LXSnapshot.ParameterView
All Implemented Interfaces:
LXSerializable
Enclosing class:
LXSnapshot

public final class LXSnapshot.ParameterView extends LXSnapshot.View
Class for the recall of a simple parameter value
  • Field Details

  • Method Details

    • getParameterValue

      public double getParameterValue()
    • getParameterNormalizedValue

      public double getParameterNormalizedValue()
    • getParameterStringValue

      public String getParameterStringValue()
    • getParameterDiscreteValue

      public int getParameterDiscreteValue()
    • updateNormalized

      public void updateNormalized(double value, double normalizedValue)
    • updateDiscrete

      public void updateDiscrete(int value, double normalizedValue)
    • updateString

      public void updateString(String stringValue)
    • getLabel

      public String getLabel()
      Description copied from class: LXSnapshot.View
      Gets a descriptive label for the parameter or field represented by the view
      Specified by:
      getLabel in class LXSnapshot.View
      Returns:
      Descriptive label for the parameter or field represented by the view
    • getDescription

      public String getDescription()
      Description copied from class: LXSnapshot.View
      Gets a description of the behavior of the parameter or field represented by the view
      Specified by:
      getDescription in class LXSnapshot.View
      Returns:
      Description of the behavior of the parameter or field represented by the view
    • getViewComponent

      public LXComponent getViewComponent()
      Description copied from class: LXSnapshot.View
      Gets the component that owns the parameter/field referenced by the view
      Specified by:
      getViewComponent in class LXSnapshot.View
      Returns:
      Component that owns the parameter/field referenced by the view
    • getViewPath

      public String getViewPath()
      Description copied from class: LXSnapshot.View
      Gets a unique path identifier for this view in the context of its snapshot
      Specified by:
      getViewPath in class LXSnapshot.View
      Returns:
      Unique path identifier for this view in the context of its snapshot
    • getValueLabel

      public String getValueLabel()
    • getCommand

      public LXCommand getCommand()
      Description copied from class: LXSnapshot.View
      Gets a command version of this view's operation, needed to make this action undoable.
      Specified by:
      getCommand in class LXSnapshot.View
      Returns:
      Command implementation of this view
    • getParameter

      public LXParameter getParameter()
    • isDependentOf

      protected boolean isDependentOf(LXComponent component)
      Description copied from class: LXSnapshot.View
      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
      Specified by:
      isDependentOf in class LXSnapshot.View
      Parameters:
      component - Component to test
      Returns:
      true if this view depends upon that component's existence, false otherwise
    • recall

      protected void recall()
      Description copied from class: LXSnapshot.View
      Subclasses must implement, should reapply the state of the view immediately
      Specified by:
      recall in class LXSnapshot.View
    • startTransition

      protected void startTransition()
      Description copied from class: LXSnapshot.View
      Subclasses may override, indicates the beginning of a transition
      Overrides:
      startTransition in class LXSnapshot.View
    • interpolate

      protected void interpolate(double amount)
      Description copied from class: LXSnapshot.View
      Subclasses may override, indicates the progress of a transition
      Overrides:
      interpolate in class LXSnapshot.View
      Parameters:
      amount - Amount of interpolation to apply
    • finishTransition

      protected void finishTransition()
      Description copied from class: LXSnapshot.View
      Subclasses may override, indicates the completion of a transition
      Overrides:
      finishTransition in class LXSnapshot.View
    • 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
      Overrides:
      save in class LXSnapshot.View
      Parameters:
      lx - LX instance
      obj - Object to serialize into