Class CommandGroup
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.common.model.CommandGroup
-
- All Implemented Interfaces:
ContentModel,PropertyChangeAware
public class CommandGroup extends java.lang.Object implements ContentModel, PropertyChangeAware
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCommandGroup.CommandFilterstatic interfaceCommandGroup.CommandGroupListener
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Command>commandsprivate javax.swing.event.EventListenerListlistenerListStores the listeners on this model.private java.lang.Stringtitleprivate WeakPropertyChangeSupportweakPropertyChangeSupport
-
Constructor Summary
Constructors Constructor Description CommandGroup(java.lang.String title, java.util.List<Command> commands)CommandGroup(java.lang.String title, Command... commands)CommandGroup(java.util.List<Command> commands)CommandGroup(Command... commands)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommand(Command command)voidaddCommandGroupListener(CommandGroup.CommandGroupListener l)Adds aCommandGroupListenerto the model.voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)CommandfindFirstMatch(CommandGroup.CommandFilter filter)private voidfireAllCommandsRemoved(java.util.List<Command> commands)private voidfireCommandAdded(Command command)private voidfireCommandRemoved(Command command)java.util.List<Command>getCommands()java.lang.StringgetTitle()voidremoveAllCommands()voidremoveCommand(Command command)voidremoveCommandGroupListener(CommandGroup.CommandGroupListener l)Removes aCommandGroupListenerfrom the model.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)voidsetTitle(java.lang.String title)
-
-
-
Field Detail
-
title
private java.lang.String title
-
commands
private java.util.List<Command> commands
-
listenerList
private javax.swing.event.EventListenerList listenerList
Stores the listeners on this model.
-
weakPropertyChangeSupport
private final WeakPropertyChangeSupport weakPropertyChangeSupport
-
-
Constructor Detail
-
CommandGroup
public CommandGroup(Command... commands)
-
CommandGroup
public CommandGroup(java.util.List<Command> commands)
-
CommandGroup
public CommandGroup(java.lang.String title, Command... commands)
-
CommandGroup
public CommandGroup(java.lang.String title, java.util.List<Command> commands)
-
-
Method Detail
-
getTitle
public java.lang.String getTitle()
-
setTitle
public void setTitle(java.lang.String title)
-
getCommands
public java.util.List<Command> getCommands()
-
findFirstMatch
public Command findFirstMatch(CommandGroup.CommandFilter filter)
-
addCommand
public void addCommand(Command command)
-
removeCommand
public void removeCommand(Command command)
-
removeAllCommands
public void removeAllCommands()
-
addCommandGroupListener
public void addCommandGroupListener(CommandGroup.CommandGroupListener l)
Adds aCommandGroupListenerto the model.- Parameters:
l- the listener to add
-
removeCommandGroupListener
public void removeCommandGroupListener(CommandGroup.CommandGroupListener l)
Removes aCommandGroupListenerfrom the model.- Parameters:
l- the listener to remove
-
fireCommandAdded
private void fireCommandAdded(Command command)
-
fireCommandRemoved
private void fireCommandRemoved(Command command)
-
fireAllCommandsRemoved
private void fireAllCommandsRemoved(java.util.List<Command> commands)
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Specified by:
addPropertyChangeListenerin interfacePropertyChangeAware
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
- Specified by:
removePropertyChangeListenerin interfacePropertyChangeAware
-
-