Package jmri.jmrit.roster.rostergroup
Class RosterGroup
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrit.roster.rostergroup.RosterGroup
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,RosterObject
public class RosterGroup extends Bean implements RosterObject
A RosterGroup object contains information about groupings of entries within theRoster
. This object allows groups to be manipulated as Java beans.
-
-
Field Summary
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description RosterGroup(java.lang.String name)
Create a roster group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canChangeContents()
Flag indicating that the contents of this RosterGroup can be changed by the user.boolean
canCopy()
Flag indicating that this RosterGroup can be duplicated by the user.boolean
canDelete()
Flag indicating that this RosterGroup can be deleted by the user.boolean
canEdit()
Flag indicating that this RosterGroup can be edited by the user.java.lang.String
getDisplayName()
Get the formatted single-line String for displaying the object.java.util.List<RosterEntry>
getEntries()
Get the list of entries associated with this group.java.lang.String
getName()
Get the RosterGroup's name.void
setName(java.lang.String newName)
Set the RosterGroup's name, changing it in every entry associated with the roster.-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.beans.BeanInterface
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Constructor Detail
-
RosterGroup
public RosterGroup(java.lang.String name)
Create a roster group. This sets the name without callingsetName(java.lang.String)
.- Parameters:
name
- roster group name.
-
-
Method Detail
-
getEntries
public java.util.List<RosterEntry> getEntries()
Get the list of entries associated with this group.- Returns:
- the list of entries or an empty list.
-
getName
public java.lang.String getName()
Get the RosterGroup's name. UsegetDisplayName()
to get the name to be displayed to a user.- Returns:
- the name
- See Also:
getDisplayName()
-
setName
public void setName(java.lang.String newName)
Set the RosterGroup's name, changing it in every entry associated with the roster.- Parameters:
newName
- the new name
-
getDisplayName
public java.lang.String getDisplayName()
Description copied from interface:RosterObject
Get the formatted single-line String for displaying the object.- Specified by:
getDisplayName
in interfaceRosterObject
- Returns:
- a formatted name
-
canEdit
public boolean canEdit()
Flag indicating that this RosterGroup can be edited by the user. The default implementation always returns true.- Returns:
- true if the group can be edited.
-
canDelete
public boolean canDelete()
Flag indicating that this RosterGroup can be deleted by the user. The default implementation always returns true.- Returns:
- true if the group can be deleted.
-
canCopy
public boolean canCopy()
Flag indicating that this RosterGroup can be duplicated by the user. The default implementation always returns true.- Returns:
- true if the group can be copied.
-
canChangeContents
public boolean canChangeContents()
Flag indicating that the contents of this RosterGroup can be changed by the user. The default implementation always returns true.- Returns:
- true if entries in this group can be changed.
-
-