Browse Source

修改pmd问题

master
mengao 8 years ago
parent
commit
c5536e6d61
  1. 5
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

5
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -37,7 +37,9 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem(); TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem();
if (tableDataWrapper != null) { if (tableDataWrapper == null) {
return;
}
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。 //这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList(); List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList();
columnNames = new String[nameList.size()]; columnNames = new String[nameList.size()];
@ -48,7 +50,6 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
} }
columnNameComboBox.validate(); columnNameComboBox.validate();
} }
}
}); });
columnNameComboBox = new UIComboBox(); columnNameComboBox = new UIComboBox();
tableDataComboBox.setPreferredSize(new Dimension(82, 20)); tableDataComboBox.setPreferredSize(new Dimension(82, 20));

Loading…
Cancel
Save