/** * Gets the value out of the connector text after parsing the string * representation. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { if (StringUtils.isEmpty(getConnectedJComponent().getText())) { return null; } if (formatter != null) { try { Object value = formatter .parse(getTextForParser(getConnectedJComponent().getText())); getConnectedJComponent().setText(formatter.format(value)); return value; } catch (ParseException ex) { setConnecteeValue(null); return null; } } return super.getConnecteeValue(); }
/** * Gets the value out of the connector text after parsing the string * representation. * <p> * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected Object protectedGetConnecteeValue() { if (StringUtils.isEmpty(getConnectedJComponent().getText())) { return null; } if (formatter != null) { try { Object value = formatter .parse(getTextForParser(getConnectedJComponent().getText())); getConnectedJComponent().setText( ((IFormatter<Object, String>) formatter).format(value)); return value; } catch (ParseException ex) { setConnecteeValue(null); return null; } } return super.getConnecteeValue(); }