|
|
|
@ -14,7 +14,6 @@ import com.fr.design.gui.ilist.TableViewList;
|
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -58,7 +57,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
protected void refreshItems() { |
|
|
|
|
super.refreshItems(); |
|
|
|
|
if (tableViewList != null) { |
|
|
|
|
searchForRefresh(); |
|
|
|
|
search(true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -155,17 +154,17 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void removeUpdate(DocumentEvent e) { |
|
|
|
|
search(); |
|
|
|
|
search(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void insertUpdate(DocumentEvent e) { |
|
|
|
|
search(); |
|
|
|
|
search(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void changedUpdate(DocumentEvent e) { |
|
|
|
|
search(); |
|
|
|
|
search(false); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -173,14 +172,14 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
search(); |
|
|
|
|
search(false); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 选项改变,需要重新刷新下拉列表里面的项 |
|
|
|
|
*/ |
|
|
|
|
protected void search() { |
|
|
|
|
protected void search(boolean refresh) { |
|
|
|
|
String selectedObj = connectionComboBox.getSelectedItem(); |
|
|
|
|
|
|
|
|
|
String[] types = ArrayUtils.EMPTY_STRING_ARRAY; |
|
|
|
@ -194,17 +193,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
} else { |
|
|
|
|
types = (String[]) ArrayUtils.add(types, TableProcedure.PROCEDURE); |
|
|
|
|
} |
|
|
|
|
tableViewList.populate(selectedObj, searchField.getText().trim(), types); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void searchForRefresh() { |
|
|
|
|
String databaseName = connectionComboBox.getSelectedItem(); |
|
|
|
|
if (databaseName != null) { |
|
|
|
|
tableViewList.clearCache(databaseName); |
|
|
|
|
} else { |
|
|
|
|
FineLoggerFactory.getLogger().warn("database name is null"); |
|
|
|
|
} |
|
|
|
|
search(); |
|
|
|
|
tableViewList.populate(selectedObj, searchField.getText().trim(), refresh, types); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|