if (labelField.getText().equals(port.getDisplayLabel())) return;
nodeAttributesDialog.setPortLabel(portName, labelField.getText());
} else if (e.getSource() == descriptionField) {
nodeAttributesDialog.setPortDescription(portName, descriptionField.getText());
} else if (e.getSource() == widgetBox) {
HumanizedObject newWidget = (HumanizedObject) widgetBox.getSelectedItem();
if (port.getWidget() == newWidget.getObject()) return;
nodeAttributesDialog.setPortWidget(portName, (Port.Widget) newWidget.getObject());
} else if (e.getSource() == rangeBox) {
HumanizedObject newRange = (HumanizedObject) rangeBox.getSelectedItem();
if (port.getRange() == newRange.getObject()) return;
nodeAttributesDialog.setPortRange(portName, (Port.Range) newRange.getObject());
} else if (e.getSource() == valueField) {
String newValue = valueField.getText();
if (port.getValue() != null && port.getValue().toString().equals(newValue)) return;
try {
nodeAttributesDialog.setPortValue(portName, Port.parseValue(port.getType(), valueField.getText()));