this.dataSourceManagerBtn.setPreferredSize(new Dimension(30, 30));
this.dataSourceManagerBtn.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "add.gif"));
this.dataSourceManagerBtn.setActionCommand(DataSourceAdapter.MANAGER_DATASOURCES_COMMAND);
northPanel.add(this.dataSourceManagerBtn);
this.dataSourceComboBox = new JComboBox(new DatasourceComboBoxModel());
this.dataSourceComboBox.setPreferredSize(new Dimension(150, 29));
this.dataSourceComboBox.addPopupMenuListener(new PopupMenuListener() {// 界面初始化时列表为空,触发下拉列表时,加载数据
public void popupMenuCanceled(PopupMenuEvent e) {
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
DatasourceComboBoxModel datasourceComboBoxModel = (DatasourceComboBoxModel) dataSourceComboBox.getModel();
datasourceComboBoxModel.loadData();
}
});
/*
this.datasourceComboBox.addItemListener(new ItemListener() {