|
|
@ -104,14 +104,7 @@ public abstract class ItemEditableComboBoxPanel extends JPanel { |
|
|
|
// 存在两种场景之前只考虑了填充场景 有populate会填充下 把这边的填充逻辑删了 所以没有问题
|
|
|
|
// 存在两种场景之前只考虑了填充场景 有populate会填充下 把这边的填充逻辑删了 所以没有问题
|
|
|
|
// 如果是纯通过刷新按钮 没有populate 需要手动设置下上次选中的内容
|
|
|
|
// 如果是纯通过刷新按钮 没有populate 需要手动设置下上次选中的内容
|
|
|
|
if (lastSelectedItem != null) { |
|
|
|
if (lastSelectedItem != null) { |
|
|
|
ActionListener[] actionListeners = itemComboBox.getActionListeners(); |
|
|
|
|
|
|
|
for (ActionListener actionListener : actionListeners) { |
|
|
|
|
|
|
|
itemComboBox.removeActionListener(actionListener); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
model.setSelectedItem(lastSelectedItem); |
|
|
|
model.setSelectedItem(lastSelectedItem); |
|
|
|
for (ActionListener actionListener : actionListeners) { |
|
|
|
|
|
|
|
itemComboBox.addActionListener(actionListener); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
refreshWorker = new SwingWorker<Iterator<String>, Void>() { |
|
|
|
refreshWorker = new SwingWorker<Iterator<String>, Void>() { |
|
|
|