Search in sources :

Example 11 with SignalMastLogic

use of jmri.SignalMastLogic in project JMRI by JMRI.

the class SignallingSourcePanel method updateDetails.

/**
     * Refresh the list of destination Signal Masts available for edit in the current SML.
     */
private void updateDetails() {
    SignalMastLogic old = sml;
    sml = jmri.InstanceManager.getDefault(jmri.SignalMastLogicManager.class).getSignalMastLogic(sourceMast);
    if (sml != null) {
        _signalMastList = sml.getDestinationList();
        _AppearanceModel.updateSignalMastLogic(old, sml);
    }
}
Also used : SignalMastLogic(jmri.SignalMastLogic)

Example 12 with SignalMastLogic

use of jmri.SignalMastLogic in project JMRI by JMRI.

the class DefaultSignalMastLogicManager method newSignalMastLogic.

@Override
public SignalMastLogic newSignalMastLogic(SignalMast source) {
    for (int i = 0; i < signalMastLogic.size(); i++) {
        if (signalMastLogic.get(i).getSourceMast() == source) {
            return signalMastLogic.get(i);
        }
    }
    SignalMastLogic logic = new DefaultSignalMastLogic(source);
    signalMastLogic.add(logic);
    firePropertyChange("length", null, Integer.valueOf(signalMastLogic.size()));
    return logic;
}
Also used : SignalMastLogic(jmri.SignalMastLogic) DefaultSignalMastLogic(jmri.implementation.DefaultSignalMastLogic) DefaultSignalMastLogic(jmri.implementation.DefaultSignalMastLogic)

Aggregations

SignalMastLogic (jmri.SignalMastLogic)12 SignalMast (jmri.SignalMast)7 DefaultSignalMastLogic (jmri.implementation.DefaultSignalMastLogic)6 Hashtable (java.util.Hashtable)4 NamedBean (jmri.NamedBean)4 ArrayList (java.util.ArrayList)3 NamedBeanHandle (jmri.NamedBeanHandle)3 Sensor (jmri.Sensor)3 SignalMastLogicManager (jmri.SignalMastLogicManager)3 Block (jmri.Block)2 JmriException (jmri.JmriException)2 Section (jmri.Section)2 Turnout (jmri.Turnout)2 Element (org.jdom2.Element)2 MouseEvent (java.awt.event.MouseEvent)1 PropertyChangeEvent (java.beans.PropertyChangeEvent)1 Enumeration (java.util.Enumeration)1 List (java.util.List)1 JButton (javax.swing.JButton)1 JTable (javax.swing.JTable)1