/** * Sets the value to the connector text. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { if (aValue == null) { getConnectedJComponent().setText(null); } else { getConnectedJComponent().setText(aValue.toString()); } }
/** * Sets the value to the connector text. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { if (aValue == null) { getConnectedJComponent().setText(null); } else { getConnectedJComponent().setText(aValue.toString()); } }
/** * Gets the value out of the connector. * <p> * {@inheritDoc} */ @Override protected Object protectedGetConnecteeValue() { String text = getConnectedJComponent().getText(); if (StringUtils.isEmpty(text)) { return null; } return text; }
/** * Gets the value out of the connector. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { String text = getConnectedJComponent().getText(); if (StringUtils.isEmpty(text)) { return null; } return text; }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { getConnectedJComponent().addFocusListener(new FocusAdapter() { /** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } }); }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { getConnectedJComponent().addFocusListener(new FocusAdapter() { /** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } }); }
/** * {@inheritDoc} */ @Override protected void protectedReadabilityChange() { super.protectedReadabilityChange(); if (isReadable()) { if (savedSelectedTextColor != null) { getConnectedJComponent().setSelectedTextColor(savedSelectedTextColor); } savedSelectedTextColor = null; } else if (savedSelectedTextColor == null) { savedSelectedTextColor = getConnectedJComponent().getSelectedTextColor(); getConnectedJComponent().setSelectedTextColor( getConnectedJComponent().getSelectionColor()); } }
/** * {@inheritDoc} */ @Override protected void protectedUpdateState() { super.protectedUpdateState(); if (isReadable()) { if (savedSelectedTextColor != null) { getConnectedJComponent().setSelectedTextColor(savedSelectedTextColor); } savedSelectedTextColor = null; } else if (savedSelectedTextColor == null) { savedSelectedTextColor = getConnectedJComponent().getSelectedTextColor(); getConnectedJComponent().setSelectedTextColor( getConnectedJComponent().getSelectionColor()); } getConnectedJComponent().setEditable(isWritable()); } }
/** * {@inheritDoc} */ @Override protected void protectedWritabilityChange() { super.protectedWritabilityChange(); getConnectedJComponent().setEditable(isWritable()); } }