Browse Source

报表引擎属性弹窗翻新

newui
张世豪 5 months ago
parent
commit
6963a13080
  1. 2
      build.gradle
  2. 27
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  3. 69
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  4. 85
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  5. 47
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  6. 19
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

2
build.gradle

@ -90,8 +90,8 @@ allprojects {
implementation 'com.github.weisj:jsvg:1.2.0'
implementation 'com.formdev:flatlaf:3.4'
implementation 'com.formdev:flatlaf-extras:3.4'
implementation 'com.fanruan.vito:gui-inspector:1.0.1'
implementation 'com.fine.swing.ui:layout:1.0-SNAPSHOT'
implementation 'com.fanruan.vito:gui-inspector:1.0.2'
testImplementation 'org.easymock:easymock:3.5.1'
testImplementation 'org.powermock:powermock-module-junit4:1.7.1'
testImplementation 'org.powermock:powermock-api-easymock:1.7.1'

27
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -1,5 +1,8 @@
package com.fr.design.data.datapane;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.TableData;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.DBUtils;
@ -11,6 +14,7 @@ import com.fr.data.impl.DBTableData;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignerEnvManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.RefreshLabel.Refreshable;
import com.fr.design.data.datapane.preview.PreviewLabel;
@ -39,6 +43,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.connection.DBConnectAuth;
import groovy.swing.factory.BoxLayoutFactory;
import javax.swing.JList;
import javax.swing.JOptionPane;
@ -54,9 +59,7 @@ import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeCellRenderer;
import javax.swing.tree.TreePath;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.ItemEvent;
@ -68,6 +71,10 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.CancellationException;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.scale;
/**
* @author zhou
* @since 2012-7-11下午4:49:39
@ -133,11 +140,11 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
public ChoosePane(Previewable parent, int labelSize) {
this.initBasicComponet();
this.initBasicComponent();
this.initComponentsLayout(new PreviewLabel(parent == null ? this : parent), labelSize);
}
private void initBasicComponet() {
private void initBasicComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
dsNameComboBox = new StringUIComboBox();
@ -239,7 +246,15 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel northDSPane = TableLayoutHelper.createTableLayoutPane(coms, new double[]{p}, new double[]{p, f, p, f, p, f, COLUMN_SIZE, COLUMN_SIZE});
//JPanel northDSPane = new JPanel(new BorderLayout());
/*northDSPane.add(
row(10,
row(5, cell(l1), cell(dsNameComboBox)),
row(5, cell(l2), cell(schemaBox)),
row(5, cell(l3), cell(tableNameComboBox)),
row(5, cell(new RefreshLabel(this)), cell(previewLabel)))
.getComponent());*/
this.add(northDSPane, BorderLayout.CENTER);
}

69
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -1,8 +1,11 @@
package com.fr.design.write.submit;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.cert.token.lang.Collections;
import com.fr.data.DataConstants;
import com.fr.data.condition.JoinCondition;
import com.fr.data.condition.ListCondition;
@ -25,11 +28,14 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.FRLeftFlowLayout;
import com.fr.design.layout.LeftCenterRightLayout;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
@ -83,9 +89,15 @@ import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.EventObject;
import java.util.List;
import java.util.stream.Collectors;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
//august:这个东西应该分成两类,一类是有单元格的情况,一类是没有单元格的情况
public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@ -140,32 +152,45 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
this.v_Types = v_Types;
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(northPane, BorderLayout.NORTH);
//this.add(northPane, BorderLayout.NORTH);
dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES);
JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox},
FlowLayout.LEFT, 10);
//JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox},
// FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(dmlConfigComboBox)).getComponent(), BorderLayout.WEST);
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
northPane.add(typePane, BorderLayout.NORTH);
//northPane.add(typePane, BorderLayout.NORTH);
chooseTable = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")));
chooseTable.setTableNameComboBoxPopSize(160, 320);
northPane.add(chooseTable, BorderLayout.CENTER);
//northPane.add(chooseTable, BorderLayout.CENTER);
// peter:编辑的TablePane
JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(editTablePane, BorderLayout.CENTER);
editTablePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")));
//this.add(editTablePane, BorderLayout.CENTER);
editTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new JScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER);
editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 180));
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150));
keyColumnValuesTable.setShowHorizontalLines(true);
northPane.add(column(10, true,
cell(typePane),
cell(chooseTable))
.getComponent());
this.add(column(10, true,
cell(northPane),
cell(editTablePane))
.getComponent());
initJTableColumn();
addButtons(editTablePane);
@ -187,15 +212,18 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// alex:添加操作按钮
UpdateAction[] actions = this.getActions();
if (actions != null && actions.length > 0) {
JPanel controlBtnPane = new JPanel(new GridLayout(actions.length + 1, 1, 4, 4));
JPanel controlBtnPane = new JPanel(new BorderLayout());
editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST);
for (UpdateAction action : actions) {
List<Layouts.Cell> buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList());
/*for (UpdateAction action : actions) {
controlBtnPane.add(new UIButton(action));
}
}*/
checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0));
checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20));
controlBtnPane.add(checkBoxUpdatePane);
//buttonGroup.add(cell(checkBoxUpdatePane));
//controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
//controlBtnPane.add(checkBoxUpdatePane);
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON);
@ -211,8 +239,13 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
});
helpButton.set4ToolbarButton();
checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
//checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
//checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
buttonGroup.add(row(5, cell(UpdateCheckBox),
cell(helpButton)));
//checkBoxUpdatePane.add(row(5, cell(UpdateCheckBox),
// cell(helpButton)).getComponent());
controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
}
}

85
designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
@ -47,6 +48,11 @@ import java.util.ArrayList;
import java.util.List;
import com.fr.design.i18n.Toolkit;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
/**
* @author fly.li
* @version 10.0
@ -80,22 +86,18 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
//JPanel outReportEnginePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"));
JPanel outReportEnginePane = new JPanel();
outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outReportEnginePane.setPreferredSize(new Dimension(600, 370));
//this.add(outReportEnginePane, BorderLayout.NORTH);
outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370)));
outReportEnginePane.add(createReportEnginePane());
//JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice"));
//this.add(outAdvicePane, BorderLayout.SOUTH);
JPanel outAdvicePane = new JPanel();
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outAdvicePane.setPreferredSize(new Dimension(600, 160));
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane());
this.add(Layouts.column(20,
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))),
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
this.add(column(20, true,
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))),
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
.getComponent());
}
@ -105,29 +107,24 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false);
reportEnginePane.add(clientPagingPane);
//reportEnginePane.add(Layouts.row(10, Layouts.cell(clientPagingPane)).getComponent());
//outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"));
outPagingEngineSelectPane = new JPanel();
outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout());
//reportEnginePane.add(outPagingEngineSelectPane);
outPagingEngineSelectPane.setVisible(false);
outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300));
outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300)));
outPagingEngineSelectPane.add(createPagingEngineSelectPane());
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane));
clientPagingPane.add(clientPaging);
//reportEnginePane.add(outPagingEngineSelectPane);
//clientPagingPane.add(Layouts.box(Layouts.cell(clientPaging)).getComponent());
reportEnginePane.add(Layouts.column(20,
Layouts.cell(clientPagingPane),
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))))
reportEnginePane.add(column(10, true,
cell(clientPagingPane),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))))
.getComponent());
return reportEnginePane;
}
private JPanel createPagingEngineSelectPane() {
engineSettingPane = new JLayeredPane();
engineSettingPane.setPreferredSize(new Dimension(600, 240));
engineSettingPane.setBounds(0, 0, 600, 240);
engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240)));
engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240));
createEngineXSettingPane();
createLineEngineSettingPane();
outLineEngineSettingPane.setVisible(false);
@ -136,7 +133,6 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
engineSettingPane.moveToFront(outEngineXSettingPane);
engineSettingPane.setVisible(true);
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
//engineSettingPane.add(Layouts.column())
pagingEngineSelectPane.add(createPagingEngineRadioPanel());
pagingEngineSelectPane.add(engineSettingPane);
/*pagingEngineSelectPane.add(Layouts.column(10,
@ -151,32 +147,27 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
*/
private void createEngineXSettingPane() {
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine"));
outEngineXSettingPane.setBounds(0, 0, 700, 200);
outEngineXSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(180));
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
engineXPageQueryBox.setSelected(false);
pageQueryBoxPanel.add(engineXPageQueryBox);
//engineXSettingPane.add(pageQueryBoxPanel);
engineXCountPerPageEditor = new IntegerEditor(new Integer(30));
engineXCountPerPageEditor.setPreferredSize(new Dimension(120, 20));
engineXCountPerPageEditor.setPreferredSize(new Dimension(FineUIScale.scale(120), FineUIScale.scale(20)));
engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor);
engineXPageQueryPane.setVisible(false);
//engineXSettingPane.add(engineXPageQueryPane);
engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane));
JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
rowCountBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Row_Count"));
rowCountBox.setSelected(false);
rowCountPanel.add(rowCountBox);
//engineXSettingPane.add(rowCountPanel);
//engineXSettingPane.add(createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")));
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"));
//engineXSettingPane.add(tip);
engineXSettingPane.add(Layouts.column(10,
Layouts.cell(pageQueryBoxPanel),
Layouts.cell(engineXPageQueryPane),
Layouts.cell(rowCountPanel),
Layouts.cell(tip))
engineXSettingPane.add(column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip))
.getComponent());
outEngineXSettingPane.add(engineXSettingPane);
}
@ -184,13 +175,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
private void createLineEngineSettingPane() {
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine"));
// TODO SCALE动态伸缩大小
outLineEngineSettingPane.setBounds(0, 0, 700, 200);
outLineEngineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(200));
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
lineEnginePageQueryBox.setSelected(false);
pageQueryBoxPanel.add(lineEnginePageQueryBox);
//lineEngineSettingPane.add(pageQueryBoxPanel);
lineEngineCountPerPageEditor = new IntegerEditor(new Integer(30));
lineEngineCountPerPageEditor.setPreferredSize(new Dimension(120, 20));
lineEnginePageQueryPane = createPageQueryPane(lineEngineCountPerPageEditor);
@ -198,11 +188,10 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
lineEngineSettingPane.add(lineEnginePageQueryPane);
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane));
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
//lineEngineSettingPane.add(tipPane);
lineEngineSettingPane.add(Layouts.column(10,
Layouts.cell(pageQueryBoxPanel),
Layouts.cell(lineEnginePageQueryPane),
Layouts.cell(tipPane))
lineEngineSettingPane.add(column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane))
.getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane);
}
@ -230,16 +219,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
// 上侧文字
UILabel topExplainLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Report_Engine_Warnning_Info"), 480);
topExplainLabel.setForeground(new Color(0, 0, 0));
//advicePane.add(topExplainLabel);
// 下侧文字及链接
JPanel adviceDownPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
//advicePane.add(adviceDownPane);
UILabel downExplainLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference"));
//adviceDownPane.add(downExplainLabel);
downExplainLabel.setForeground(new Color(0, 0, 0));
JLabel helper = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Community_Help"));
helper.setForeground(new Color(1, 159, 222));
//adviceDownPane.add(helper);
helper.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -251,13 +236,13 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
}
}
});
adviceDownPane.add(Layouts.row(20,
Layouts.cell(downExplainLabel),
Layouts.cell(helper))
adviceDownPane.add(row(20,
cell(downExplainLabel),
cell(helper))
.getComponent());
advicePane.add(Layouts.column(20,
Layouts.cell(topExplainLabel),
Layouts.cell(adviceDownPane))
advicePane.add(column(20,
cell(topExplainLabel),
cell(adviceDownPane))
.getComponent());
return advicePane;

47
designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

@ -14,15 +14,15 @@ import com.fr.transaction.WorkerAdaptor;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
public class WriteShortCutsPane extends JPanel{
private static final int V_GAP = 20;
@ -51,15 +51,18 @@ public class WriteShortCutsPane extends JPanel{
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
// 纵向布局,横向自适应
contentPane.setLayout(new GridBagLayout());
/*contentPane.setLayout(new GridBagLayout());
GridBagConstraints cons = new GridBagConstraints();
cons.fill = GridBagConstraints.HORIZONTAL;
cons.weightx = 1;
cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);
contentPane.add(getFeatureNamePane(), cons);
contentPane.add(getHintsPane(), cons);
cons.insets = new Insets(20, 0, 0, 0);*/
contentPane.setLayout(new BorderLayout());
contentPane.add(column(10, true,
cell(getFeatureNamePane()),
cell(getHintsPane())).getComponent());
//contentPane.add(getFeatureNamePane());
//contentPane.add(getHintsPane());
return contentPane;
}
@ -77,16 +80,20 @@ public class WriteShortCutsPane extends JPanel{
JPanel switchBtnPane = getSwitchBtnPane();
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0));
JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
centerPane.add(name);
/*centerPane.add(name);
centerPane.add(nextCol);
centerPane.add(new JPanel());
centerPane.add(nextRow);
centerPane.add(shortName);
centerPane.add(nextColHK);
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);
centerPane.add(nextRowHK);*/
centerPane.add(column(20, true,
row(50, cell(name), cell(nextCol), flex(50), cell(nextRow)),
row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK))
).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -116,16 +123,22 @@ public class WriteShortCutsPane extends JPanel{
preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP));
JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100));
centerPane.add(systemDefault);
/*centerPane.add(systemDefault);
centerPane.add(preColText);
centerPane.add(preCol);
centerPane.add(new JPanel());
centerPane.add(preRowText);
centerPane.add(preRow);
centerPane.add(preRow);*/
centerPane.add(row(80,
column(flex(), cell(systemDefault), flex()),
column(20,
row(80, cell(preColText), cell(preCol)),
row(80, cell(preRowText), cell(preRow)))
).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER);

19
designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

@ -33,6 +33,10 @@ import java.awt.event.ItemListener;
import java.util.*;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class SubmitVisitorListPane extends ObjectJControlPane {
public SubmitVisitorListPane(ElementCasePane ePane) {
@ -186,12 +190,19 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
}
csjConfigComboBox = new UIComboBox(configTypes.toArray());
JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), csjConfigComboBox},
FlowLayout.LEFT, 10);
//JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), csjConfigComboBox},
// FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(csjConfigComboBox)).getComponent(), BorderLayout.WEST);
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
this.add(typePane, BorderLayout.NORTH);
/*this.add(typePane, BorderLayout.NORTH);
this.add(customCardPane, BorderLayout.CENTER);
this.add(customCardPane, BorderLayout.CENTER);*/
this.add(column(10,
cell(typePane),
cell(customCardPane)).getComponent());
csjConfigComboBox.addItemListener(new ItemListener() {
@Override

Loading…
Cancel
Save