/** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent e) { fireConnectorValueChange(); } });
/** * Returns the selected object in the combo box. * <p> * {@inheritDoc} */ @Override protected Object protectedGetConnecteeValue() { return getConnectedJComponent().getSelectedItem(); }
/** * {@inheritDoc} */ @Override protected void protectedUpdateState() { super.protectedUpdateState(); getConnectedJComponent().setEnabled(isWritable()); } }
private IView<JComponent> createEnumerationPropertyView( IEnumerationPropertyDescriptor propertyDescriptor, IActionHandler actionHandler, Locale locale) { JComboBox viewComponent = createJComboBox(); if (!propertyDescriptor.isMandatory()) { viewComponent.addItem(null); } for (Object enumElement : propertyDescriptor.getEnumerationValues()) { viewComponent.addItem(enumElement); } viewComponent.setRenderer(new TranslatedEnumerationListCellRenderer( propertyDescriptor, locale)); adjustSizes(viewComponent, null, getEnumerationTemplateValue( propertyDescriptor, locale), Toolkit.getDefaultToolkit() .getScreenResolution() * 2 / 6); JComboBoxConnector connector = new JComboBoxConnector(propertyDescriptor .getName(), viewComponent); connector.setExceptionHandler(actionHandler); return constructView(viewComponent, null, connector); }
IValueConnector connector = new JComboBoxConnector(propertyDescriptor.getName(), viewComponent); connector.setExceptionHandler(actionHandler); view = constructView(viewComponent, propertyViewDescriptor, connector);
/** * {@inheritDoc} */ @Override protected void protectedWritabilityChange() { super.protectedWritabilityChange(); getConnectedJComponent().setEnabled(isWritable()); } }
/** * Sets the selected item in the combo box to be the connector value to set. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { getConnectedJComponent().setSelectedItem(aValue); }
/** * {@inheritDoc} */ public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { fireConnectorValueChange(); } });
/** * Returns the selected object in the combobox. * <p> * {@inheritDoc} */ @Override protected Object getConnecteeValue() { return getConnectedJComponent().getSelectedItem(); }
/** * Sets the selected item in the combobox to be the connector value to set. * <p> * {@inheritDoc} */ @Override protected void protectedSetConnecteeValue(Object aValue) { getConnectedJComponent().setSelectedItem(aValue); }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { getConnectedJComponent().addActionListener(new ActionListener() { /** * {@inheritDoc} */ public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) { fireConnectorValueChange(); } }); }
/** * {@inheritDoc} */ @Override protected void bindJComponent() { getConnectedJComponent().addActionListener(new ActionListener() { /** * {@inheritDoc} */ @Override public void actionPerformed(ActionEvent e) { fireConnectorValueChange(); } }); }