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.Builderto 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
CommandButtonPresentationModelandCommandButtonProjection. Useproject()for default presentation settings orproject(CommandButtonPresentationModel)to customize presentation settings. Then useBaseProjection.buildComponent()to get an instance ofJCommandButtonthat can be added to the component hierarchy. Note that you can - and should - use the sameCommandinstance and one or moreCommandButtonPresentationModels 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 classCommand.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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Command.Builderbuilder()CommandButtonProjection<Command>project()CommandButtonProjection<Command>project(CommandButtonPresentationModel commandPresentation)java.lang.StringtoString()-
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:
toStringin classjava.lang.Object
-
-