From af9e946b5b5f6f05c63fea0256fbabb4712de48a Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 10 Sep 2019 17:30:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-20769=20=20=E6=A8=A1=E7=89=88=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=95=B0=E6=8D=AE=E5=BA=93=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BA=A4=E4=BA=92=E4=BA=A7=E5=93=81=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=20&&=20REPORT-14560=20=E5=90=8C=E6=AD=A5=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