|
|
@ -10,7 +10,10 @@ import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.unit.*; |
|
|
|
import com.fr.stable.unit.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
import java.awt.event.FocusAdapter; |
|
|
|
|
|
|
|
import java.awt.event.FocusEvent; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author richie |
|
|
|
* @author richie |
|
|
@ -30,6 +33,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA |
|
|
|
GUICoreUtils.setColumnForSpinner(spinner, 5); |
|
|
|
GUICoreUtils.setColumnForSpinner(spinner, 5); |
|
|
|
this.spinner.setValue(new Integer(0)); |
|
|
|
this.spinner.setValue(new Integer(0)); |
|
|
|
this.locString = locString; |
|
|
|
this.locString = locString; |
|
|
|
|
|
|
|
final JFormattedTextField textField = ((JSpinner.NumberEditor) this.spinner.getEditor()).getTextField(); |
|
|
|
|
|
|
|
textField.addFocusListener(new FocusAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void focusLost(FocusEvent e) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
textField.commitEdit(); |
|
|
|
|
|
|
|
} catch (ParseException ignore) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|