|
|
|
@ -1,27 +1,32 @@
|
|
|
|
|
package com.fr.design.data.datapane.connect; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.data.core.db.TableProcedure; |
|
|
|
|
import com.fr.data.impl.AbstractDatabaseConnection; |
|
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.data.core.db.TableProcedure; |
|
|
|
|
import com.fr.design.border.UIRoundedBorder; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.gui.ilist.TableViewList; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
|
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.ToolTipManager; |
|
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.*; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.ItemListener; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -48,10 +53,11 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
filter(connection, conName, nameList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void refreshItems() { |
|
|
|
|
super.refreshItems(); |
|
|
|
|
if (tableViewList != null) { |
|
|
|
|
search(); |
|
|
|
|
search(true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -148,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); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -166,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; |
|
|
|
@ -187,7 +193,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
} else { |
|
|
|
|
types = (String[]) ArrayUtils.add(types, TableProcedure.PROCEDURE); |
|
|
|
|
} |
|
|
|
|
tableViewList.populate(selectedObj, searchField.getText().trim(), types); |
|
|
|
|
tableViewList.populate(selectedObj, searchField.getText().trim(), refresh, types); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -196,7 +202,6 @@ public class ConnectionTableProcedurePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @param l |
|
|
|
|
*/ |
|
|
|
|
public void addDoubleClickListener(DoubleClickSelectedNodeOnTreeListener l) { |
|
|
|
|