From af9e946b5b5f6f05c63fea0256fbabb4712de48a Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 Sep 2019 17:30:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-20769=20=20=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=95=B0=E6=8D=AE=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E6=9F=A5=E8=AF=A2=E4=BA=A4=E4=BA=92=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E6=94=B9=E8=BF=9B=20&&=20REPORT-14560=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=88=B010.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connect/ConnectionTableProcedurePane.java | 7 ++++- .../tabledatapane/DBTableDataPane.java | 26 +++++++++++++++++++ .../cellquick/CellFormulaQuickEditor.java | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java index ed09c87a88..f6f258285d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java @@ -35,7 +35,7 @@ public class ConnectionTableProcedurePane extends BasicPane { private ConnectionComboBoxPanel connectionComboBox; private UICheckBox tableCheckBox; private UICheckBox viewCheckBox; - private UITextField searchField; + protected UITextField searchField; private TableViewList tableViewList; private java.util.List listeners = new java.util.ArrayList(); @@ -90,12 +90,17 @@ public class ConnectionTableProcedurePane extends BasicPane { this.add(tableViewListPane, BorderLayout.CENTER); this.add(filterPane, BorderLayout.SOUTH); this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height)); + addKeyMonitor(); } protected void filter(Connection connection, String conName, List nameList) { connection.addConnection(nameList, conName, new Class[]{AbstractDatabaseConnection.class}); } + protected void addKeyMonitor() { + + } + protected JPanel createCheckBoxgroupPane() { JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 85b8fbd7d3..0eaf130325 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -57,6 +57,8 @@ import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; import java.util.ArrayList; import java.util.List; @@ -95,6 +97,30 @@ public class DBTableDataPane extends AbstractTableDataPane { connection.addConnection(nameList, conName, new Class[]{JDBCDatabaseConnection.class, JNDIDatabaseConnection.class}); } + + @Override + protected void addKeyMonitor() { + searchField.addKeyListener(new KeyListener() { + boolean first = true; + @Override + public void keyTyped(KeyEvent e) { + + } + + @Override + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + e.setKeyCode(KeyEvent.VK_UP); + DBTableDataPane.this.connectionTableProcedurePane.requestFocus(); + } + } + + @Override + public void keyReleased(KeyEvent e) { + + } + }); + } }; connectionTableProcedurePane.addDoubleClickListener(new DoubleClickSelectedNodeOnTreeListener() { diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java index 713f9ac3d0..ff8a74e57e 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -103,7 +103,7 @@ public class CellFormulaQuickEditor extends CellQuickEditor { formulaButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { String text = formulaTextField.getText(); - final UIFormula formulaPane = FormulaFactory.createFormulaPane(); + final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula(); formulaPane.populate(BaseFormula.createFormulaBuilder().build(text)); formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override From 65d699bbb880d7099e0ef2fce6323a354b1b6f45 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 Sep 2019 17:32:28 +0800 Subject: [PATCH 2/2] update --- .../fr/design/data/tabledata/tabledatapane/DBTableDataPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 0eaf130325..44b87cad60 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -101,7 +101,7 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override protected void addKeyMonitor() { searchField.addKeyListener(new KeyListener() { - boolean first = true; + @Override public void keyTyped(KeyEvent e) {