/** * Sets the value to the connector text after formatting the string * representation. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { getConnectedJComponent().setValue(aValue); } }
/** * Sets the value to the connector text after formatting the string * representation. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { getConnectedJComponent().setValue(aValue); } }
/** * Gets the value out of the connector text after parsing the string * representation. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { // don't call getValue() due to bad focusevent delivery order of // JFormattedTextField. // return getConnectedJComponent().getValue(); try { if (getConnectedJComponent().getText() == null || getConnectedJComponent().getText().length() == 0) { return null; } return getConnectedJComponent().getFormatter().stringToValue( getConnectedJComponent().getText()); } catch (ParseException ex) { throw new ConnectorBindingException(ex); } }
/** * Gets the value out of the connector text after parsing the string * representation. * <p> * {@inheritDoc} */ @Override protected Object protectedGetConnecteeValue() { // don't call getValue() due to bad focus event delivery order of // JFormattedTextField. // return getConnectedJComponent().getValue(); try { if (getConnectedJComponent().getText() == null || getConnectedJComponent().getText().length() == 0) { return null; } return getConnectedJComponent().getFormatter().stringToValue( getConnectedJComponent().getText()); } catch (ParseException ex) { throw new ConnectorBindingException(ex); } }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { super.bindJComponent(); getConnectedJComponent().addActionListener(new ActionListener() { /** * {@inheritDoc} */ public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { fireConnectorValueChange(); } }); getConnectedJComponent().addPropertyChangeListener("value", new PropertyChangeListener() { public void propertyChange(@SuppressWarnings("unused") PropertyChangeEvent evt) { fireConnectorValueChange(); } }); }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { super.bindJComponent(); getConnectedJComponent().addActionListener(new ActionListener() { /** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent e) { fireConnectorValueChange(); } }); getConnectedJComponent().addPropertyChangeListener("value", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { fireConnectorValueChange(); } }); }