Browse Source

报表引擎属性弹窗翻新

newui
renekton 4 months ago
parent
commit
e3b9ac78c6
  1. 4
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java
  3. 33
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  4. 60
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  5. 2
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  6. 2
      designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java
  7. 4
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

4
designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java

@ -51,7 +51,9 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
JScrollPane selectedItemScrollPane = new JScrollPane();
selectedItemScrollPane.setViewportView(northPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.add(selectedItemScrollPane, BorderLayout.CENTER);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.add(selectedItemScrollPane);
this.add(centerPane, BorderLayout.CENTER);
}
@Override

5
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java

@ -3,6 +3,7 @@ package com.fr.design.gui.itableeditorpane;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class UIArrayTableModel extends UITableModelAdapter<Object[]> implements ActionStyle {
@ -67,7 +68,9 @@ public class UIArrayTableModel extends UITableModelAdapter<Object[]> implements
@Override
public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
addRow(new Object[getColumnCount()]);
Object[] values = new Object[getColumnCount()];
Arrays.fill(values, "=");
addRow(values);
fireTableDataChanged();
}
}

33
designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java

@ -22,6 +22,10 @@ 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.row;
/**
* Author : Shockway
* Date: 13-7-29
@ -36,7 +40,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
//reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(
@ -48,8 +52,9 @@ public abstract class CustomJobPane extends BasicBeanPane {
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
reportletNamePane.add(editButton);
/*reportletNamePane.add(browserButton);
reportletNamePane.add(editButton);*/
UITextArea area = new UITextArea(2, 1);
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -60,6 +65,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(bPane.getClassPath());
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
checkAddButtonEnable();
}
}).setVisible(true);
@ -73,6 +79,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(javaEditorPane.getClassText());
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
checkAddButtonEnable();
}
});
@ -87,18 +94,28 @@ public abstract class CustomJobPane extends BasicBeanPane {
});
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null));
this.add(reportletNamePane, BorderLayout.NORTH);
reportletNamePane.add(row(10,
cell(classNameTextField).weight(1.0),
cell(browserButton),
cell(editButton)
).getComponent());
//this.add(reportletNamePane, BorderLayout.NORTH);
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null));
this.add(objectProperiesPane, BorderLayout.CENTER);
//this.add(objectProperiesPane, BorderLayout.CENTER);
UITextArea area = new UITextArea(2, 1);
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
//UITextArea area = new UITextArea(2, 1);
//area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.add(area);
dsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"), null));
this.add(dsPane, BorderLayout.SOUTH);
//this.add(dsPane, BorderLayout.SOUTH);
this.add(column(
cell(reportletNamePane),
cell(objectProperiesPane).weight(1.0),
cell(dsPane)
).getComponent());
checkAddButtonEnable();
}

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

@ -51,7 +51,9 @@ 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.swing.ui.layout.Layouts.box;
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author fly.li
@ -61,7 +63,7 @@ import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
private static final int LABEL_HEIGHT = 55;
private JPanel outLineEngineSettingPane;
private JLayeredPane engineSettingPane;
private JPanel engineSettingPane;
private UICheckBox clientPaging;
private UICheckBox lineEnginePageQueryBox;
private UICheckBox engineXPageQueryBox;
@ -86,51 +88,54 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel outReportEnginePane = new JPanel();
outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370)));
JPanel outReportEnginePane = new JPanel(new BorderLayout());
createOutPagingEngineSelectPane();
outReportEnginePane.add(createReportEnginePane());
JPanel outAdvicePane = new JPanel();
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane());
this.add(column(20, true,
this.add(column(10,
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0),
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
.getComponent());
}
private void createOutPagingEngineSelectPane() {
outPagingEngineSelectPane = new JPanel(new BorderLayout());
outPagingEngineSelectPane.setVisible(false);
outPagingEngineSelectPane.add(createPagingEngineSelectPane());
}
private JPanel createReportEnginePane() {
JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel reportEnginePane = new JPanel(new BorderLayout());
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false);
reportEnginePane.add(clientPagingPane);
outPagingEngineSelectPane = new JPanel();
/*outPagingEngineSelectPane = new JPanel();
outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout());
outPagingEngineSelectPane.setVisible(false);
outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300)));
outPagingEngineSelectPane.add(createPagingEngineSelectPane());
outPagingEngineSelectPane.add(createPagingEngineSelectPane());*/
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane));
clientPagingPane.add(clientPaging);
reportEnginePane.add(column(10, true,
cell(clientPagingPane),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))))
.getComponent());
reportEnginePane.add(clientPaging);
return reportEnginePane;
}
private JPanel createPagingEngineSelectPane() {
engineSettingPane = new JLayeredPane();
engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240)));
engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240));
engineSettingPane = new JPanel(new BorderLayout());
createEngineXSettingPane();
createLineEngineSettingPane();
outLineEngineSettingPane.setVisible(false);
engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER);
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);
engineSettingPane.moveToFront(outEngineXSettingPane);
outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220)));
outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220)));
engineSettingPane.add(box(cell(outEngineXSettingPane),
cell(outLineEngineSettingPane)).getComponent()
, BorderLayout.WEST);
/*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER);
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/
//engineSettingPane.moveToFront(outEngineXSettingPane);
engineSettingPane.setVisible(true);
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
pagingEngineSelectPane.add(createPagingEngineRadioPanel());
@ -147,7 +152,6 @@ 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, 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"));
@ -174,8 +178,6 @@ 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, 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"));
@ -288,14 +290,14 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X);
radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE);
if (ob.getEngineState() == LayerReportAttr.ENGINE_X) {
engineSettingPane.moveToFront(outEngineXSettingPane);
//engineSettingPane.moveToFront(outEngineXSettingPane);
outEngineXSettingPane.setVisible(true);
outLineEngineSettingPane.setVisible(false);
engineXCountPerPageEditor.setValue(new Integer(ob.getCountPerPage()));
engineXPageQueryBox.setSelected(ob.isPageQuery());
engineXPageQueryPane.setVisible(ob.isPageQuery());
} else {
engineSettingPane.moveToFront(outLineEngineSettingPane);
//engineSettingPane.moveToFront(outLineEngineSettingPane);
outEngineXSettingPane.setVisible(false);
outLineEngineSettingPane.setVisible(true);
lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage()));
@ -369,11 +371,11 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
private class EngineSelectActionListener implements ActionListener {
private AbstractButton source;
private JLayeredPane target;
private JPanel target;
private JPanel showTarget;
private JPanel notShowTarget;
private EngineSelectActionListener(AbstractButton source, JLayeredPane target, JPanel showTarget, JPanel notShowTarget) {
private EngineSelectActionListener(AbstractButton source, JPanel target, JPanel showTarget, JPanel notShowTarget) {
this.source = source;
this.target = target;
this.showTarget = showTarget;
@ -390,7 +392,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
target.setVisible(true);
showTarget.setVisible(true);
notShowTarget.setVisible(false);
target.moveToFront(showTarget);
//target.moveToFront(showTarget);
} else {
target.setVisible(false);
}

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

@ -91,7 +91,7 @@ public class WriteShortCutsPane extends JPanel{
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);*/
centerPane.add(column(20, true,
row(50, cell(name), cell(nextCol), flex(50), cell(nextRow)),
row(50, cell(name), cell(nextCol), flex(), cell(nextRow)),
row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK))
).getComponent());

2
designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java

@ -40,7 +40,7 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
@Override
protected synchronized void initComponents(JPanel container) {
container.setLayout(FRGUIPaneFactory.createBorderLayout());
final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
container.add(tabbedPane, BorderLayout.CENTER);
// peter: writeSQLAttrList的编辑.

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

@ -200,9 +200,9 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
/*this.add(typePane, BorderLayout.NORTH);
this.add(customCardPane, BorderLayout.CENTER);*/
this.add(column(10,
this.add(column(
cell(typePane),
cell(customCardPane)).getComponent());
cell(customCardPane).weight(1.0)).getComponent());
csjConfigComboBox.addItemListener(new ItemListener() {
@Override

Loading…
Cancel
Save