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.SetFader
,LXCommand.Clip.Add
,LXCommand.Clip.Record
,LXCommand.Clip.Remove
,LXCommand.Clip.Trigger
,LXCommand.Device.ClearRemoteControls
,LXCommand.Device.LoadPreset
,LXCommand.Device.SetRemoteControls
,LXCommand.Midi.AddMapping
,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.RemoveModulation
,LXCommand.Modulation.RemoveModulations
,LXCommand.Modulation.RemoveTrigger
,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.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
Modifier and TypeClassDescriptionstatic class
static class
static class
LXCommand.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 class
static class
static class
static class
static class
static class
static class
Name space for parameter commandsstatic class
LXCommand.ParameterReference<T extends LXParameter>
static class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
Short description of a command, to explain it to the userboolean
May return true if a command should be ignore for the purposes of undoabstract void
Perform the given commandabstract void
Undo 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
-