/** * Updates the shared value instance if updateValue is true. Always forces the redraw of * everything. */ protected void doValueUpdate(FilterBypass fb) throws BadLocationException { Document doc = fb.getDocument(); String text = doc.getText(0, doc.getLength()); if (text.isEmpty()) { text = "0"; } if (updateValue == true) { try { Double value = new Double(text); double newValue = multiplier.getValueToBeSet(value.doubleValue()); cValue.setValue(newValue); } catch (NumberFormatException e) { // do nothing, since we allow '-' } } topContainer.forceRedraw(); }