Class RibbonGalleryContentModel
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.ribbon.model.RibbonGalleryContentModel
-
- All Implemented Interfaces:
ChangeAware
,ContentModel
public class RibbonGalleryContentModel extends java.lang.Object implements ContentModel, ChangeAware
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RibbonGalleryContentModel.GalleryCommandAction
Listener for tracking command activation events.static interface
RibbonGalleryContentModel.GalleryCommandActionPreview
Listener for tracking command preview events.
-
Field Summary
Fields Modifier and Type Field Description private CommandGroup.CommandGroupListener
commandGroupListener
private java.util.List<CommandGroup>
commandGroups
private java.util.List<CommandGroup>
extraPopupCommandGroups
private RadianceIcon.Factory
iconFactory
private javax.swing.event.EventListenerList
listenerList
private Command
selectedCommand
private WeakChangeSupport
weakChangeSupport
Stores the listeners on this model.
-
Constructor Summary
Constructors Constructor Description RibbonGalleryContentModel(RadianceIcon.Factory iconFactory, java.util.List<CommandGroup> commands)
-
Method Summary
-
-
-
Field Detail
-
commandGroups
private java.util.List<CommandGroup> commandGroups
-
extraPopupCommandGroups
private java.util.List<CommandGroup> extraPopupCommandGroups
-
selectedCommand
private Command selectedCommand
-
iconFactory
private RadianceIcon.Factory iconFactory
-
weakChangeSupport
private final WeakChangeSupport weakChangeSupport
Stores the listeners on this model.
-
listenerList
private javax.swing.event.EventListenerList listenerList
-
commandGroupListener
private CommandGroup.CommandGroupListener commandGroupListener
-
-
Constructor Detail
-
RibbonGalleryContentModel
public RibbonGalleryContentModel(RadianceIcon.Factory iconFactory, java.util.List<CommandGroup> commands)
-
-
Method Detail
-
getIconFactory
public RadianceIcon.Factory getIconFactory()
-
getCommandGroups
public java.util.List<CommandGroup> getCommandGroups()
-
getCommandGroupByTitle
public CommandGroup getCommandGroupByTitle(java.lang.String commandGroupTitle)
-
addCommandGroup
public void addCommandGroup(CommandGroup commandGroupModel)
-
removeCommandGroup
public void removeCommandGroup(CommandGroup commandGroupModel)
-
addExtraPopupCommandGroup
public void addExtraPopupCommandGroup(CommandGroup commandGroupModel)
-
removeExtraPopupCommandGroup
public void removeExtraPopupCommandGroup(CommandGroup commandGroupModel)
-
getExtraPopupCommandGroups
public java.util.List<CommandGroup> getExtraPopupCommandGroups()
-
addCommandPreviewListener
public void addCommandPreviewListener(RibbonGalleryContentModel.GalleryCommandActionPreview l)
Adds aRibbonGalleryContentModel.GalleryCommandActionPreview
to the model.- Parameters:
l
- the listener to add
-
removeCommandPreviewListener
public void removeCommandPreviewListener(RibbonGalleryContentModel.GalleryCommandActionPreview l)
Removes aRibbonGalleryContentModel.GalleryCommandActionPreview
from the model.- Parameters:
l
- the listener to remove
-
addCommandActivationListener
public void addCommandActivationListener(RibbonGalleryContentModel.GalleryCommandAction l)
Adds aRibbonGalleryContentModel.GalleryCommandAction
to the model.- Parameters:
l
- the listener to add
-
removeCommandActivationListener
public void removeCommandActivationListener(RibbonGalleryContentModel.GalleryCommandAction l)
Removes aRibbonGalleryContentModel.GalleryCommandAction
from the model.- Parameters:
l
- the listener to remove
-
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()
-
setSelectedCommand
public void setSelectedCommand(Command command)
-
getSelectedCommand
public Command getSelectedCommand()
-
activatePreview
public void activatePreview(BaseCommand<?> command)
-
cancelPreview
public void cancelPreview(BaseCommand<?> command)
-
fireCommandPreviewActivated
private void fireCommandPreviewActivated(BaseCommand<?> command)
-
fireCommandPreviewCanceled
private void fireCommandPreviewCanceled(BaseCommand<?> command)
-
fireCommandSelected
private void fireCommandSelected(BaseCommand<?> command)
-
-