Class CommandMenuContentModel
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.common.model.CommandMenuContentModel
-
- All Implemented Interfaces:
BaseCommandMenuContentModel,ChangeAware,ContentModel
- Direct Known Subclasses:
BasicRibbonBandUI.BandCollapsePopupMenuContentModel,RibbonApplicationMenu
public class CommandMenuContentModel extends java.lang.Object implements BaseCommandMenuContentModel
-
-
Field Summary
Fields Modifier and Type Field Description private CommandGroup.CommandGroupListenercommandGroupListenerprivate java.util.List<CommandGroup>commandGroupsprivate CommandhighlightedCommandprivate javax.swing.event.ChangeListenerpanelContentChangeListenerprivate CommandPanelContentModelpanelContentModelprivate WeakChangeSupportweakChangeSupportStores the listeners on this model.
-
Constructor Summary
Constructors Constructor Description CommandMenuContentModel(java.util.List<CommandGroup> commands)CommandMenuContentModel(CommandGroup commands)CommandMenuContentModel(CommandGroup... commandGroups)CommandMenuContentModel(CommandPanelContentModel panelContentModel, 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)private voidfireStateChanged()java.util.List<CommandGroup>getCommandGroups()CommandgetHighlightedCommand()CommandPanelContentModelgetPanelContentModel()booleanisEmpty()voidremoveAllCommandGroups()voidremoveChangeListener(javax.swing.event.ChangeListener l)Removes the specified change listener from tracking changes to the underlying source.voidremoveCommandGroup(CommandGroup commandGroupModel)voidsetHighlightedCommand(Command highlightedCommand)
-
-
-
Field Detail
-
panelContentModel
private CommandPanelContentModel panelContentModel
-
commandGroups
private java.util.List<CommandGroup> commandGroups
-
highlightedCommand
private Command highlightedCommand
-
weakChangeSupport
private final WeakChangeSupport weakChangeSupport
Stores the listeners on this model.
-
commandGroupListener
private CommandGroup.CommandGroupListener commandGroupListener
-
panelContentChangeListener
private javax.swing.event.ChangeListener panelContentChangeListener
-
-
Constructor Detail
-
CommandMenuContentModel
public CommandMenuContentModel(CommandGroup commands)
-
CommandMenuContentModel
public CommandMenuContentModel(CommandGroup... commandGroups)
-
CommandMenuContentModel
public CommandMenuContentModel(java.util.List<CommandGroup> commands)
-
CommandMenuContentModel
public CommandMenuContentModel(CommandPanelContentModel panelContentModel, java.util.List<CommandGroup> commands)
-
-
Method Detail
-
getPanelContentModel
public CommandPanelContentModel getPanelContentModel()
-
addCommandGroup
public void addCommandGroup(CommandGroup commandGroupModel)
-
removeCommandGroup
public void removeCommandGroup(CommandGroup commandGroupModel)
-
removeAllCommandGroups
public void removeAllCommandGroups()
-
getHighlightedCommand
public Command getHighlightedCommand()
-
setHighlightedCommand
public void setHighlightedCommand(Command highlightedCommand)
-
getCommandGroups
public java.util.List<CommandGroup> getCommandGroups()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceBaseCommandMenuContentModel
-
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)
-
fireStateChanged
private void fireStateChanged()
-
-