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 interface
CommandGroup.CommandFilter
static interface
CommandGroup.CommandGroupListener
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Command>
commands
private javax.swing.event.EventListenerList
listenerList
Stores the listeners on this model.private java.lang.String
title
private WeakPropertyChangeSupport
weakPropertyChangeSupport
-
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 void
addCommand(Command command)
void
addCommandGroupListener(CommandGroup.CommandGroupListener l)
Adds aCommandGroupListener
to the model.void
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Command
findFirstMatch(CommandGroup.CommandFilter filter)
private void
fireAllCommandsRemoved(java.util.List<Command> commands)
private void
fireCommandAdded(Command command)
private void
fireCommandRemoved(Command command)
java.util.List<Command>
getCommands()
java.lang.String
getTitle()
void
removeAllCommands()
void
removeCommand(Command command)
void
removeCommandGroupListener(CommandGroup.CommandGroupListener l)
Removes aCommandGroupListener
from the model.void
removePropertyChangeListener(java.beans.PropertyChangeListener l)
void
setTitle(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 aCommandGroupListener
to the model.- Parameters:
l
- the listener to add
-
removeCommandGroupListener
public void removeCommandGroupListener(CommandGroup.CommandGroupListener l)
Removes aCommandGroupListener
from 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:
addPropertyChangeListener
in interfacePropertyChangeAware
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
- Specified by:
removePropertyChangeListener
in interfacePropertyChangeAware
-
-