Class Command
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.common.model.BaseCommand<CommandMenuContentModel>
-
- org.pushingpixels.radiance.component.api.common.model.Command
-
- All Implemented Interfaces:
ChangeAware
,ContentModel
,PropertyChangeAware
public class Command extends BaseCommand<CommandMenuContentModel>
Encapsulates metadata for a single command. Use a new instance ofCommand.Builder
to configure a new command, andCommand.Builder.build()
to build a command.A command can be projected to screen (creating a visual representation of that command) using
CommandButtonPresentationModel
andCommandButtonProjection
. Useproject()
for default presentation settings orproject(CommandButtonPresentationModel)
to customize presentation settings. Then useBaseProjection.buildComponent()
to get an instance ofJCommandButton
that can be added to the component hierarchy. Note that you can - and should - use the sameCommand
instance and one or moreCommandButtonPresentationModel
s if you need to have multiple instances (or projections) of the same command in your app UI. That way, changes in the command are propagated and synced across all those projections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Command.Builder
-
Nested classes/interfaces inherited from class org.pushingpixels.radiance.component.api.common.model.BaseCommand
BaseCommand.BaseBuilder<T extends BaseCommand<MCM>,MCM extends BaseCommandMenuContentModel,B extends BaseCommand.BaseBuilder<T,MCM,B>>, BaseCommand.CommandActionPreview, BaseCommand.SecondaryLifecycle
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Command()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Command.Builder
builder()
CommandButtonProjection<Command>
project()
CommandButtonProjection<Command>
project(CommandButtonPresentationModel commandPresentation)
java.lang.String
toString()
-
Methods inherited from class org.pushingpixels.radiance.component.api.common.model.BaseCommand
addChangeListener, addPropertyChangeListener, checkConsistency, getAction, getActionPreview, getActionRichTooltip, getExtraText, getIconFactory, getSecondaryContentModel, getSecondaryLifecycle, getSecondaryRichTooltip, getTag, getText, getToggleGroupModel, hasSecondaryContent, isActionEnabled, isSecondaryEnabled, isToggle, isToggleSelected, removeChangeListener, removePropertyChangeListener, setAction, setActionEnabled, setActionPreview, setActionRichTooltip, setExtraText, setIconFactory, setSecondaryEnabled, setSecondaryRichTooltip, setTag, setText, setToggleSelected
-
-
-
-
Method Detail
-
builder
public static Command.Builder builder()
-
project
public CommandButtonProjection<Command> project()
-
project
public CommandButtonProjection<Command> project(CommandButtonPresentationModel commandPresentation)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-