Package heronarts.lx.command
Class LXCommand
java.lang.Object
heronarts.lx.command.LXCommand
- Direct Known Subclasses:
LXCommand.Channel.AddEffect,LXCommand.Channel.AddPattern,LXCommand.Channel.GoPattern,LXCommand.Channel.MoveEffect,LXCommand.Channel.MovePattern,LXCommand.Channel.PatternCycle,LXCommand.Channel.SetFader,LXCommand.Clip.Add,LXCommand.Clip.Event.Midi.EditNote,LXCommand.Clip.Event.Midi.RemoveNote,LXCommand.Clip.Event.Midi.SetChannel,LXCommand.Clip.Event.Midi.SetVelocity,LXCommand.Clip.Event.Parameter.InsertEvent,LXCommand.Clip.Event.Parameter.MoveEvent,LXCommand.Clip.Event.Parameter.SetValues,LXCommand.Clip.Event.Pattern.Increment,LXCommand.Clip.Event.Pattern.MoveEvent,LXCommand.Clip.Event.Pattern.RemoveReferences,LXCommand.Clip.Event.Remove,LXCommand.Clip.Event.RemoveRange,LXCommand.Clip.Event.SetCursors,LXCommand.Clip.MoveLane,LXCommand.Clip.Record,LXCommand.Clip.Remove,LXCommand.Clip.SetMarker,LXCommand.Device.ClearRemoteControls,LXCommand.Device.LoadPreset,LXCommand.Device.SetRemoteControls,LXCommand.Midi.AddMapping,LXCommand.Midi.AddTemplate,LXCommand.Midi.MoveTemplate,LXCommand.Midi.RemoveMapping,LXCommand.Mixer.AddChannel,LXCommand.Mixer.DropChannel,LXCommand.Mixer.GroupSelectedChannels,LXCommand.Mixer.MoveChannel,LXCommand.Mixer.RemoveSelectedChannels,LXCommand.Mixer.Ungroup,LXCommand.Mixer.UngroupChannel,LXCommand.Modulation.AddModulation,LXCommand.Modulation.AddModulator,LXCommand.Modulation.AddTrigger,LXCommand.Modulation.MoveModulator,LXCommand.Modulation.Remove,LXCommand.Modulation.RemoveModulations,LXCommand.Osc.AddInput,LXCommand.Osc.AddOutput,LXCommand.Palette.AddColor,LXCommand.Palette.ImportSwatches,LXCommand.Palette.MoveSwatch,LXCommand.Palette.SaveSwatch,LXCommand.Palette.SetSwatch,LXCommand.Parameter.Decrement,LXCommand.Parameter.Increment,LXCommand.Parameter.Reset,LXCommand.Parameter.SetColor,LXCommand.Parameter.SetNormalized,LXCommand.Parameter.SetString,LXCommand.Parameter.SetValue,LXCommand.Parameter.Toggle,LXCommand.RemoveComponent,LXCommand.Snapshots.AddSnapshot,LXCommand.Snapshots.MoveSnapshot,LXCommand.Snapshots.Recall,LXCommand.Snapshots.RecallImmediate,LXCommand.Snapshots.Update,LXCommand.Structure.AddFixture,LXCommand.Structure.AddView,LXCommand.Structure.ImportViews,LXCommand.Structure.ModifyFixturePositions,LXCommand.Structure.MoveFixture,LXCommand.Structure.MoveView,LXCommand.Structure.NewModel,LXCommand.Structure.RemoveSelectedFixtures
An LXCommand is an operation that may be performed by the engine, potentially
in two directions, supporting and Undo operation. If you are working directly
with the LX API, you are free to ignore this interface. However, if you are
building a higher-level UI that you would like to integrate with the undo
system, it is best to invoke operations via calls to lx.command.perform().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classLXCommand.ComponentReference<T extends LXComponent>This reference class is used because the LXCommand engine might have actions in it that refer to components which have been deleted by subsequent operations.static classstatic classstatic classstatic classstatic classstatic classstatic classstatic className space for parameter commandsstatic classLXCommand.ParameterReference<T extends LXParameter>static classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringShort description of a command, to explain it to the userbooleanMay return true if a command should be ignore for the purposes of undoabstract voidPerform the given commandabstract voidUndo the command, after it has been performed
-
Constructor Details
-
LXCommand
public LXCommand()
-
-
Method Details
-
getDescription
Short description of a command, to explain it to the user- Returns:
- short description of command
-
perform
Perform the given command- Parameters:
lx- LX instance- Throws:
LXCommand.InvalidCommandException- if the command is invalid
-
undo
Undo the command, after it has been performed- Parameters:
lx- LX instance- Throws:
LXCommand.InvalidCommandException- if the command is invalid
-
isIgnored
public boolean isIgnored()May return true if a command should be ignore for the purposes of undo- Returns:
- Whether to ignore command for purposes of undo
-