public void spinnerChangeEvent(javax.swing.event.ChangeEvent ae) { if (ae.getSource() == spinTrainIconX && _tIon != null) { _tIon.setLocation((Integer) spinTrainIconX.getValue(), _tIon.getLocation().y); } if (ae.getSource() == spinTrainIconY && _tIon != null) { _tIon.setLocation(_tIon.getLocation().x, (Integer) spinTrainIconY.getValue()); } }
// 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); } }