@SuppressWarnings({"unused", "UnusedParameters"}) private void documentChanged(DocumentEvent e) { if (isUserAction && !getConnectedJComponent().getEditorPane().hasFocus()) { fireConnectorValueChange(); } } });
/** * {@inheritDoc} */ @Override protected void protectedWritabilityChange() { super.protectedWritabilityChange(); getConnectedJComponent().setEditable(isWritable()); } }
/** * Gets the value out of the connector. * <p> * {@inheritDoc} */ @Override protected Object protectedGetConnecteeValue() { return getConnectedJComponent().getText(); }
/** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } });
} else { JHTMLEditor htmlEditor = createJHTMLEditor(propertyViewDescriptor, locale); JHTMLEditorConnector htmlEditorConnector = new JHTMLEditorConnector(propertyDescriptor.getName(), htmlEditor); if (propertyViewDescriptor instanceof IScrollableViewDescriptor) { if (((IScrollableViewDescriptor) propertyViewDescriptor).isHorizontallyScrollable()) {
/** * Sets the value to the connector text. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { boolean wasUserAction = isUserAction; try { isUserAction = false; if (aValue == null) { getConnectedJComponent().setText(null); } else { getConnectedJComponent().setText(aValue.toString()); } } finally { isUserAction = wasUserAction; } }
/** * {@inheritDoc} */ @Override public void focusLost(FocusEvent e) { if (!e.isTemporary()) { fireConnectorValueChange(); } } });
getConnectedJComponent().getEditorPane().addFocusListener( new FocusAdapter() { getConnectedJComponent().addFocusListener(new FocusAdapter() { getConnectedJComponent().getEditorPane().getDocument() .addDocumentListener(new DocumentListener() {