Class CommandMenuContentModel
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.common.model.CommandMenuContentModel
-
- All Implemented Interfaces:
BaseCommandMenuContentModel
,ChangeAware
,ContentModel
- Direct Known Subclasses:
RibbonApplicationMenu
public class CommandMenuContentModel extends java.lang.Object implements BaseCommandMenuContentModel, ChangeAware
-
-
Field Summary
Fields Modifier and Type Field Description private CommandGroup.CommandGroupListener
commandGroupListener
private java.util.List<CommandGroup>
commandGroups
private Command
highlightedCommand
private javax.swing.event.ChangeListener
panelContentChangeListener
private CommandPanelContentModel
panelContentModel
private WeakChangeSupport
weakChangeSupport
Stores 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 void
addChangeListener(javax.swing.event.ChangeListener l)
Adds the specified change listener to track changes to the underlying source.void
addCommandGroup(CommandGroup commandGroupModel)
private void
fireStateChanged()
java.util.List<CommandGroup>
getCommandGroups()
Command
getHighlightedCommand()
CommandPanelContentModel
getPanelContentModel()
boolean
isEmpty()
void
removeAllCommandGroups()
void
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the specified change listener from tracking changes to the underlying source.void
removeCommandGroup(CommandGroup commandGroupModel)
void
setHighlightedCommand(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:
isEmpty
in interfaceBaseCommandMenuContentModel
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
Description copied from interface:ChangeAware
Adds the specified change listener to track changes to the underlying source.- Specified by:
addChangeListener
in 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:ChangeAware
Removes the specified change listener from tracking changes to the underlying source.- Specified by:
removeChangeListener
in interfaceChangeAware
- Parameters:
l
- Change listener to remove.- See Also:
ChangeAware.removeChangeListener(ChangeListener)
-
fireStateChanged
private void fireStateChanged()
-
-