private void saveFields() throws Exception { nodePropertyParameters.name = name.getText(); nodePropertyParameters.propertyType = PropertyType.valueFromName((String) type.getSelectedValue()); nodePropertyParameters.value = valueCardPanel.getValueFromField(nodePropertyParameters.propertyType); }
@Override public void valueChanged(ListSelectionEvent e) { if (e.getSource() instanceof JList) { JList list = (JList) e.getSource(); String typeName = (String) list.getSelectedValue(); nodePropertyParameters.propertyType = PropertyType.valueFromName(typeName); valueCardPanel.show(typeName); } }
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() instanceof JRadioButton) { JRadioButton button = (JRadioButton) e.getSource(); String typeName = button.getText(); nodePropertyParameters.propertyType = PropertyType.valueFromName(typeName); valueCardPanel.show(typeName); } }