Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
alex.sung 5 years ago
parent
commit
66f1821234
  1. 7
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  2. 26
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  3. 18
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  4. 12
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  5. 2
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

7
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 ConnectionComboBoxPanel connectionComboBox;
private UICheckBox tableCheckBox; private UICheckBox tableCheckBox;
private UICheckBox viewCheckBox; private UICheckBox viewCheckBox;
private UITextField searchField; protected UITextField searchField;
private TableViewList tableViewList; private TableViewList tableViewList;
private java.util.List<DoubleClickSelectedNodeOnTreeListener> listeners = new java.util.ArrayList<DoubleClickSelectedNodeOnTreeListener>(); private java.util.List<DoubleClickSelectedNodeOnTreeListener> listeners = new java.util.ArrayList<DoubleClickSelectedNodeOnTreeListener>();
@ -90,12 +90,17 @@ public class ConnectionTableProcedurePane extends BasicPane {
this.add(tableViewListPane, BorderLayout.CENTER); this.add(tableViewListPane, BorderLayout.CENTER);
this.add(filterPane, BorderLayout.SOUTH); this.add(filterPane, BorderLayout.SOUTH);
this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height)); this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height));
addKeyMonitor();
} }
protected void filter(Connection connection, String conName, List<String> nameList) { protected void filter(Connection connection, String conName, List<String> nameList) {
connection.addConnection(nameList, conName, new Class[]{AbstractDatabaseConnection.class}); connection.addConnection(nameList, conName, new Class[]{AbstractDatabaseConnection.class});
} }
protected void addKeyMonitor() {
}
protected JPanel createCheckBoxgroupPane() { protected JPanel createCheckBoxgroupPane() {
JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();

26
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.ActionEvent;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.awt.event.FocusListener; import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -95,6 +97,30 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
connection.addConnection(nameList, conName, new Class[]{JDBCDatabaseConnection.class, JNDIDatabaseConnection.class}); connection.addConnection(nameList, conName, new Class[]{JDBCDatabaseConnection.class, JNDIDatabaseConnection.class});
} }
@Override
protected void addKeyMonitor() {
searchField.addKeyListener(new KeyListener() {
@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() { connectionTableProcedurePane.addDoubleClickListener(new DoubleClickSelectedNodeOnTreeListener() {

18
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -24,6 +24,7 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.design.widget.ui.designer.component.UIBoundSpinner;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background; import com.fr.general.Background;
@ -61,7 +62,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
public void initComponent() { public void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
designerWidth = new UISpinner(1, Integer.MAX_VALUE, 1); designerWidth = new UIBoundSpinner(1, Integer.MAX_VALUE, 1);
JPanel advancePane = createAdvancePane(); JPanel advancePane = createAdvancePane();
UIExpandablePane advanceExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, advancePane); UIExpandablePane advanceExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, advancePane);
this.add(advanceExpandablePane, BorderLayout.NORTH); this.add(advanceExpandablePane, BorderLayout.NORTH);
@ -162,16 +163,29 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
public WParameterLayout updateBean() { public WParameterLayout updateBean() {
WParameterLayout wParameterLayout = (WParameterLayout) creator.toData(); WParameterLayout wParameterLayout = (WParameterLayout) creator.toData();
wParameterLayout.setLabelName(labelNameTextField.getText()); wParameterLayout.setLabelName(labelNameTextField.getText());
if (isCompsOutOfDesignerWidth((int) designerWidth.getValue())) {
designerWidth.setValue(wParameterLayout.getDesignWidth());
} else {
wParameterLayout.setDesignWidth((int) designerWidth.getValue()); wParameterLayout.setDesignWidth((int) designerWidth.getValue());
}
wParameterLayout.setDelayDisplayContent(displayReport.isSelected()); wParameterLayout.setDelayDisplayContent(displayReport.isSelected());
wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected()); wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected());
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected());
wParameterLayout.setBackground((Background) background.getValue()); wParameterLayout.setBackground((Background) background.getValue());
wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem()); wParameterLayout.setPosition((int) hAlignmentPane.getSelectedItem());
return wParameterLayout; return wParameterLayout;
} }
private boolean isCompsOutOfDesignerWidth(int designerWidth){
for(int i=0; i<root.getComponentCount(); i++){
Component comp = root.getComponent(i);
if(comp.getX() + comp.getWidth() > designerWidth){
return true;
}
}
return false;
}
@Override @Override
public DataCreatorUI dataUI() { public DataCreatorUI dataUI() {
return null; return null;

12
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -27,6 +27,7 @@ import com.fr.design.selection.SelectionListener;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.report.cell.TemplateCellElement;
import com.fr.stable.ColumnRow; import com.fr.stable.ColumnRow;
import com.fr.stable.ColumnRowGroup; import com.fr.stable.ColumnRowGroup;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -454,6 +455,16 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
newAdd.clear(); newAdd.clear();
for (int i = 0; i < cs; i++) { for (int i = 0; i < cs; i++) {
for (int j = 0; j < rs; j++) { for (int j = 0; j < rs; j++) {
TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j );
if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) {
String value = cellElement.toString();
if (!newAdd.contains(value) && !allColumnRow.contains(value)) {
add.addColumnRow(ColumnRow.valueOf(value));
}
newAdd.add(value);
}
if (cellElement == null) {
ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j); ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j);
if (!allColumnRow.contains(columnRow.toString())) { if (!allColumnRow.contains(columnRow.toString())) {
add.addColumnRow(columnRow); add.addColumnRow(columnRow);
@ -461,6 +472,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
newAdd.add(columnRow.toString()); newAdd.add(columnRow.toString());
} }
} }
}
int oldSize = oldAdd.size(); int oldSize = oldAdd.size();
int newSize = newAdd.size(); int newSize = newAdd.size();
if (oldSize > newSize && oldAdd.containsAll(newAdd)) { if (oldSize > newSize && oldAdd.containsAll(newAdd)) {

2
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

@ -103,7 +103,7 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
formulaButton.addActionListener(new ActionListener() { formulaButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
String text = formulaTextField.getText(); String text = formulaTextField.getText();
final UIFormula formulaPane = FormulaFactory.createFormulaPane(); final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula();
formulaPane.populate(BaseFormula.createFormulaBuilder().build(text)); formulaPane.populate(BaseFormula.createFormulaBuilder().build(text));
formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override

Loading…
Cancel
Save