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