protected SensorIcon putSensor(){
  SensorIcon l=new SensorIcon(new NamedIcon("resources/icons/smallschematics/tracksegments/circuit-error.gif","resources/icons/smallschematics/tracksegments/circuit-error.gif"),this);
  IconAdder editor=getIconEditor("Sensor");
  Hashtable<String,NamedIcon> map=editor.getIconMap();
  Enumeration<String> e=map.keys();
  while (e.hasMoreElements()) {
    String key=e.nextElement();
    l.setIcon(key,map.get(key));
  }
  jmri.NamedBean b=editor.getTableSelection();
  if (b != null) {
    l.setSensor(b.getDisplayName());
  }
  l.setDisplayLevel(SENSORS);
  setNextLocation(l);
  putItem(l);
  return l;
}

protected SensorIcon putSensor ( ) { SensorIcon l = new SensorIcon ( new NamedIcon ( "resources/icons/smallschematics/tracksegments/circuit-error.gif" , "resources/icons/smallschematics/tracksegments/circuit-error.gif" ) , this ) ; IconAdder editor = getIconEditor ( "Sensor" ) ; Hashtable < String , NamedIcon > map = editor . getIconMap ( ) ; Enumeration < String > e = map . keys ( ) ; while ( e . hasMoreElements ( ) ) { String key = e . nextElement ( ) ; l . setIcon ( key , map . get ( key ) ) ; } jmri . NamedBean b = editor . getTableSelection ( ) ; if ( b != null ) { l . setSensor ( b . getDisplayName ( ) ) ; } l . setDisplayLevel ( SENSORS ) ; setNextLocation ( l ) ; putItem ( l ) ; return l ; }
add a sensor indicator to the target .
