예제 #1
0
 @Override
 protected void entityChanged() {
   Urgency f = (Urgency) curEntity.getEntity();
   oldName = String.valueOf(f.getTerm());
   urg.setText(String.valueOf(f.getTerm()));
   factor.setText(String.valueOf(f.getFactor()));
 }
예제 #2
0
 @Override
 protected Transmittable createEntity() throws ValidationException {
   try {
     return new Urgency(Integer.valueOf(urg.getText()), Float.valueOf(factor.getText()));
   } catch (NumberFormatException ex) {
     throw new ValidationException("Все поля должны быть числами");
   }
 }
예제 #3
0
 @Override
 protected void setDefault() {
   oldName = null;
   urg.setText("1");
   factor.setText("0");
 }