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
Encapsulates metadata for a single command. Use a new instance of
Command.Builder to configure a new command, and Command.Builder.build() to build a command.
A command can be projected to screen (creating a visual representation of that command)
using CommandButtonPresentationModel and CommandButtonProjection. Use
project() for default presentation settings or
project(CommandButtonPresentationModel) to customize presentation settings. Then use
BaseProjection.buildComponent() to get an instance of
JCommandButton that can be added to the component hierarchy.
Note that you can - and should - use the same Command instance and one or more
CommandButtonPresentationModels 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.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class BaseCommand
BaseCommand.BaseBuilder<T,MCM, B>, BaseCommand.CommandActionPreview, BaseCommand.SecondaryLifecycle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Command.Builderbuilder()project()project(CommandButtonPresentationModel commandPresentation) toString()Methods inherited from class 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
-
Constructor Details
-
Command
private Command()
-
-
Method Details
-
builder
-
project
-
project
-
toString
-