Search in sources :

Example 11 with SignalGroup

use of jmri.SignalGroup in project JMRI by JMRI.

the class DefaultSignalGroupManager method provideSignalGroup.

@Override
public SignalGroup provideSignalGroup(String systemName, String userName) {
    SignalGroup r;
    r = getByUserName(systemName);
    if (r != null) {
        return r;
    }
    r = getBySystemName(systemName);
    if (r != null) {
        return r;
    }
    // Group does not exist, create a new group
    r = new DefaultSignalGroup(systemName, userName);
    // save in the maps
    register(r);
    return r;
}
Also used : DefaultSignalGroup(jmri.implementation.DefaultSignalGroup) SignalGroup(jmri.SignalGroup) DefaultSignalGroup(jmri.implementation.DefaultSignalGroup)

Aggregations

SignalGroup (jmri.SignalGroup)11 SignalHead (jmri.SignalHead)3 SignalMast (jmri.SignalMast)3 SignalGroupManager (jmri.SignalGroupManager)2 Turnout (jmri.Turnout)2 DefaultSignalGroup (jmri.implementation.DefaultSignalGroup)2 Element (org.jdom2.Element)2 Test (org.junit.Test)2 JButton (javax.swing.JButton)1 JComboBox (javax.swing.JComboBox)1 JFrame (javax.swing.JFrame)1 JTable (javax.swing.JTable)1 JTextField (javax.swing.JTextField)1 InstanceManager (jmri.InstanceManager)1 Manager (jmri.Manager)1 NamedBean (jmri.NamedBean)1