コード例 #1
0
 // place test markers on panel
 private void placeTestIcons() {
   Editor editor = PanelMenu.instance().getEditorByName(Setup.getPanelName());
   if (editor == null) {
     JOptionPane.showMessageDialog(
         this,
         MessageFormat.format(Bundle.getMessage("LoadPanel"), new Object[] {Setup.getPanelName()}),
         Bundle.getMessage("PanelNotFound"),
         JOptionPane.ERROR_MESSAGE);
   } else {
     if (_tIon != null) {
       _tIon.remove();
     }
     // icon
     _tIon = editor.addTrainIcon(_rl.getName());
     _tIon.getTooltip().setText(_route.getName());
     _tIon.getTooltip().setBackgroundColor(Color.white);
     _tIon.setLocation(_rl.getTrainIconX(), _rl.getTrainIconY());
     setTrainIconNameAndColor();
     addIconListener(_tIon);
   }
 }
コード例 #2
0
 private void loadSpinners(RouteLocation rl) {
   log.debug("Load spinners route location {}", rl.getName());
   spinTrainIconX.setValue(rl.getTrainIconX());
   spinTrainIconY.setValue(rl.getTrainIconY());
 }