Class CommandPanelContentModel
- java.lang.Object
-
- org.pushingpixels.flamingo.api.common.model.CommandPanelContentModel
-
- All Implemented Interfaces:
ChangeAware,ContentModel
public class CommandPanelContentModel extends java.lang.Object implements ContentModel, ChangeAware
-
-
Constructor Summary
Constructors Constructor Description CommandPanelContentModel(java.util.List<CommandGroup> commands)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChangeListener(javax.swing.event.ChangeListener l)Adds the specified change listener to track changes to the underlying source.voidaddCommandGroup(CommandGroup commandGroupModel)CommandfindFirstMatch(CommandGroup.CommandFilter commandFilter)intgetCommandCount()java.util.List<CommandGroup>getCommandGroups()Command.CommandActionPreviewgetCommandPreviewListener()booleanisSingleSelectionMode()voidremoveAllCommandGroups()voidremoveChangeListener(javax.swing.event.ChangeListener l)Removes the specified change listener from tracking changes to the underlying source.voidremoveCommandGroup(CommandGroup commandGroupModel)voidsetCommandPreviewListener(Command.CommandActionPreview commandPreviewListener)voidsetSingleSelectionMode(boolean isSingleSelectionMode)Sets the selection mode for this model.
-
-
-
Constructor Detail
-
CommandPanelContentModel
public CommandPanelContentModel(java.util.List<CommandGroup> commands)
-
-
Method Detail
-
addCommandGroup
public void addCommandGroup(CommandGroup commandGroupModel)
-
removeCommandGroup
public void removeCommandGroup(CommandGroup commandGroupModel)
-
removeAllCommandGroups
public void removeAllCommandGroups()
-
getCommandGroups
public java.util.List<CommandGroup> getCommandGroups()
-
getCommandCount
public int getCommandCount()
-
findFirstMatch
public Command findFirstMatch(CommandGroup.CommandFilter commandFilter)
-
setSingleSelectionMode
public void setSingleSelectionMode(boolean isSingleSelectionMode)
Sets the selection mode for this model. Iftrueis passed as the parameter, all toggle commands in this model are set to belong to the same toggle group.- Parameters:
isSingleSelectionMode- Iftrue, all toggle commands in this model are set to belong to the same toggle group.
-
isSingleSelectionMode
public boolean isSingleSelectionMode()
-
setCommandPreviewListener
public void setCommandPreviewListener(Command.CommandActionPreview commandPreviewListener)
-
getCommandPreviewListener
public Command.CommandActionPreview getCommandPreviewListener()
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
Description copied from interface:ChangeAwareAdds the specified change listener to track changes to the underlying source.- Specified by:
addChangeListenerin interfaceChangeAware- Parameters:
l- Change listener to add.- See Also:
ChangeAware.removeChangeListener(ChangeListener)
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
Description copied from interface:ChangeAwareRemoves the specified change listener from tracking changes to the underlying source.- Specified by:
removeChangeListenerin interfaceChangeAware- Parameters:
l- Change listener to remove.- See Also:
ChangeAware.removeChangeListener(ChangeListener)
-
-