/** * Gets the value out of the connector. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { String text = getConnectedSComponent().getText(); if (StringUtils.isEmpty(text)) { return null; } return text; }
/** * Gets the value out of the connector. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { String text = getConnectedSComponent().getText(); if (StringUtils.isEmpty(text)) { return null; } return text; }
/** * Sets the value to the connector text. * <p> * {@inheritDoc} */ @Override protected void setConnecteeValue(Object aValue) { if (aValue == null) { getConnectedSComponent().setText(null); } else { getConnectedSComponent().setText(aValue.toString()); } } }
/** * Sets the value to the connector text. * <p> * {@inheritDoc} */ @Override protected void setConnecteeValue(Object aValue) { if (aValue == null) { getConnectedSComponent().setText(null); } else { getConnectedSComponent().setText(aValue.toString()); } } }
/** * {@inheritDoc} */ @Override protected void bindSComponent() { getConnectedSComponent().addDocumentListener(new SDocumentListener() { public void changedUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } public void insertUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } public void removeUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } }); }
/** * {@inheritDoc} */ @Override protected void bindSComponent() { getConnectedSComponent().addDocumentListener(new SDocumentListener() { public void changedUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } public void insertUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } public void removeUpdate(@SuppressWarnings("unused") SDocumentEvent e) { fireConnectorValueChange(); } }); }
/** * {@inheritDoc} */ @Override public void updateState() { super.updateState(); if (isReadable()) { if (savedSelectedTextColor != null) { getConnectedSComponent().setForeground(savedSelectedTextColor); } savedSelectedTextColor = null; } else if (savedSelectedTextColor == null) { savedSelectedTextColor = getConnectedSComponent().getForeground(); getConnectedSComponent().setForeground( getConnectedSComponent().getForeground()); } getConnectedSComponent().setEditable(isWritable()); }
/** * {@inheritDoc} */ @Override public void readabilityChange() { super.readabilityChange(); if (isReadable()) { if (savedSelectedTextColor != null) { getConnectedSComponent().setForeground(savedSelectedTextColor); } savedSelectedTextColor = null; } else if (savedSelectedTextColor == null) { savedSelectedTextColor = getConnectedSComponent().getForeground(); getConnectedSComponent().setForeground( getConnectedSComponent().getForeground()); } }
/** * {@inheritDoc} */ @Override public void writabilityChange() { super.writabilityChange(); getConnectedSComponent().setEditable(isWritable()); }