@Override public void focusLost(FocusEvent e) { super.focusLost(e); if (e.getSource() == ntDt) { try { sidebar.config.setParameter(StandardParameter.DT, ntDt.getDoubleValue()); } catch (ParseException ex) { ntDt.setValue( sidebar.config.getParameter(StandardParameter.DT, StandardParameter.DEFAULT_DT)); } } }
@Override public void propertyChanged(String property, double newValue) { super.propertyChanged(property, newValue); if (StandardParameter.DT.equals(property)) { ntDt.setValue(newValue); } }
@Override public void addToSidebar() { super.addToSidebar(); sidebar.add(lblDt); sidebar.add(ntDt); ntDt.addFocusListener(this); }
@Override public void removeFromSidebar() { sidebar.remove(lblDt); sidebar.remove(ntDt); ntDt.removeFocusListener(this); super.removeFromSidebar(); }
@Override public void loadDataFromModel() { super.loadDataFromModel(); ntDt.setValue(sidebar.config.getParameter(StandardParameter.DT, StandardParameter.DEFAULT_DT)); }