Browse Source

Pull request #14326: REPORT-127438 设计器样式翻新组件翻新

Merge in DESIGN/design from ~RENEKTON/design:newui to newui

* commit '877289dbb63173c0ac3de4e7db961c37578087cc':
  控件管理/报表填报属性/超级链接/服务器参数
  控件管理/报表填报属性/超级链接/服务器参数
  控件管理/报表填报属性/超级链接/服务器参数
  控件管理/报表填报属性/超级链接/服务器参数
  控件管理/报表填报属性/超级链接/服务器参数
  控件管理/报表填报属性/超级链接/服务器参数
  报表引擎属性弹窗翻新
  报表引擎属性弹窗翻新
  报表引擎属性弹窗翻新
  报表引擎属性弹窗翻新
newui
Renekton-张世豪 4 months ago
parent
commit
5f68d7096e
  1. 2
      build.gradle
  2. 11
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  3. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  4. 64
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  5. 3
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  6. 21
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  7. 1
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  8. 4
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  9. 27
      designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
  10. 2
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java
  11. 5
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java
  12. 18
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  13. 79
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  14. 74
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  15. 23
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  16. 24
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  17. 23
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  18. 73
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  19. 20
      designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java
  20. 10
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupPane.java
  21. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  22. 32
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  23. 89
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  24. 51
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  25. 20
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  26. 21
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java
  27. 4
      designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java
  28. 6
      designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java
  29. 2
      designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java
  30. 6
      designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java
  31. 38
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  32. 66
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  33. BIN
      designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png
  34. 11
      designer-base/src/main/resources/com/fr/design/images/data/hyperlink.svg
  35. BIN
      designer-base/src/main/resources/com/fr/design/images/data/user_widget.png
  36. 10
      designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg
  37. 12
      designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg
  38. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg
  39. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg
  40. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png
  41. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png
  42. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png
  43. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg
  44. BIN
      designer-base/src/main/resources/com/fr/design/images/server/global_param.png
  45. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  46. 9
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  47. 7
      designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java
  48. 6
      designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java
  49. 6
      designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java
  50. 3
      designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java
  51. 119
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  52. 3
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  53. 15
      designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java
  54. 43
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  55. 4
      designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java
  56. 33
      designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java
  57. 2
      designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java
  58. 8
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  59. 14
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  60. 39
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java
  61. 14
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  62. 21
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java
  63. 13
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.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.2'
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'

11
designer-base/src/main/java/com/fr/design/actions/UpdateAction.java

@ -10,7 +10,6 @@ import com.fr.base.Style;
import com.fr.base.svg.SVGIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem;
@ -91,16 +90,6 @@ public abstract class UpdateAction extends ShortCut implements Action {
*/
public static final String DISABLED_ICON = "disabledIcon";
/**
* Constructor
*/
public UpdateAction() {
//设置默认的small icon,必须有一个默认的图片,这样菜单整体美观.
this.putValue(Action.SMALL_ICON, UIConstants.BLACK_ICON);
}
/**
* Returns true if the action is enabled.
*

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

@ -133,11 +133,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();

64
designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java

@ -1,5 +1,6 @@
package com.fr.design.formula;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.dialog.BasicDialog;
@ -31,6 +32,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
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.flex;
import static com.fine.swing.ui.layout.Layouts.column;
public class FunctionManagerPane extends BasicPane {
private FunctionControlPane functionControlPane;
@ -94,7 +100,9 @@ public class FunctionManagerPane extends BasicPane {
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), FunctionDef.class,
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"),
IconUtils.readIcon("com/fr/design/images/server/global_param.png"),
FunctionDef.class,
FunctionContentPane.class);
return new NameableCreator[]{funcDef};
}
@ -119,15 +127,10 @@ public class FunctionManagerPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(northPane, BorderLayout.NORTH);
JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(25);
reportletNamePane.add(classNameTextField);
JPanel reportletNamePane = new JPanel(new BorderLayout());
classNameTextField = new UITextField();
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
browserButton.addActionListener(evt -> {
final ClassNameSelectPane bPane = new ClassNameSelectPane();
bPane.setClassPath(classNameTextField.getText());
bPane.showWindow( (Dialog) SwingUtilities.getWindowAncestor(FunctionContentPane.this),
@ -136,31 +139,46 @@ public class FunctionManagerPane extends BasicPane {
classNameTextField.setText(bPane.getClassPath());
}
}).setVisible(true);
}
});
UIButton editorButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editorButton.setPreferredSize(new Dimension(editorButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(editorButton);
editorButton.addActionListener(createEditorButtonActionListener());
JPanel classNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
classNamePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), BorderLayout.NORTH);
classNamePane.add(reportletNamePane, BorderLayout.CENTER);
northPane.add(classNamePane);
reportletNamePane.add(row(10,
cell(classNameTextField).weight(0.7),
cell(browserButton).weight(0.15),
cell(editorButton).weight(0.15)
).getComponent());
JPanel classNamePane = new JPanel(new BorderLayout());
classNamePane.add(column(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name"))),
cell(reportletNamePane)
).getComponent());
DescriptionTextArea descriptionArea = new DescriptionTextArea();
descriptionArea.setWrapStyleWord(true);
descriptionArea.setLineWrap(true);
northPane.add(descriptionArea);
descriptionArea.setForeground(Color.GRAY);
descriptionArea.setBorder(null);
northPane.add(column(10,
cell(classNamePane),
cell(descriptionArea)
).getComponent());
String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME);
String path2 = getEscapePath(WorkContext.getCurrent().getPath() + File.separator + ProjectConstants.CLASSES_NAME);
descriptionArea.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Description_Area_Text", path1, path2));
JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane
this.add(descriptionPane, BorderLayout.SOUTH);
descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description") + ":"), BorderLayout.NORTH);
this.descriptionTextArea = new UITextArea(6, 24);
descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER);
JPanel descriptionPane = new JPanel(new BorderLayout()); //Description Pane
this.descriptionTextArea = new UITextArea();
descriptionPane.add(column(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description"))),
cell(new JScrollPane(this.descriptionTextArea)).weight(0.9)
).getComponent());
this.add(column(10,
cell(northPane).weight(0.35),
cell(descriptionPane).weight(0.65)
).getComponent());
}
private String getEscapePath(String path) {

3
designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java

@ -1,5 +1,6 @@
package com.fr.design.fun.impl;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
@ -25,7 +26,7 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme
@Override
public NameableCreator createHyperlinkCreator() {
return new NameObjectCreator(text(), target(), appearance());
return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), target(), appearance());
}
@Override

21
designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java

@ -7,7 +7,10 @@ import javax.swing.JPanel;
import com.fr.design.layout.FRGUIPaneFactory;
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;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
@ -24,19 +27,17 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
this.add(pane, BorderLayout.NORTH);
JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":"));
pane.add(colPane);
UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
initColSpinner();
colPane.add(columnSpinner);
JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
pane.add(rowPane);
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
UILabel rowLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row"));
initRowSpinner();
rowPane.add(rowSpinner);
pane.add(column(10,
row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)),
row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8))
).getComponent());
this.addDocumentListener(d);
}

1
designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java

@ -371,6 +371,7 @@ public abstract class JListControlPane extends JControlPane implements ListContr
this.textLabel = new JLabel();
this.iconLabel = new JLabel();
this.textLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
add(this.textLabel, BorderLayout.CENTER);
add(this.iconLabel, BorderLayout.WEST);
this.iconLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE));

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

27
designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java

@ -16,6 +16,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import javax.swing.JPanel;
import javax.swing.event.TableModelListener;
import java.awt.*;
import java.util.List;
@ -41,15 +42,26 @@ public class ReportletParameterViewPane extends BasicPane {
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) {
this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType),
ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType));
ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), null);
}
public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
this(null, useParaType, valueEditorPane, valueRenderPane);
this(null, useParaType, valueEditorPane, valueRenderPane, null);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane);
public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane,
JPanel otherPane) {
this(null, useParaType, valueEditorPane, valueRenderPane, otherPane);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane,
ValueEditorPane valueRenderPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, null);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane,
ValueEditorPane valueRenderPane, JPanel otherPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, otherPane);
}
/**
@ -58,7 +70,8 @@ public class ReportletParameterViewPane extends BasicPane {
* @param actions Chart的热点链接actions
* @param useParaType 类型
*/
public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane,
JPanel otherPanel) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
if (useParaType != ParameterTableModel.NO_CHART_USE) {
@ -70,14 +83,14 @@ public class ReportletParameterViewPane extends BasicPane {
return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions);
}
};
editorPane = new UITableEditorPane<ParameterProvider>(model);
editorPane = new UITableEditorPane<ParameterProvider>(model, otherPanel);
} else {
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel() {
@Override
public UITableEditAction[] createAction() {
return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions);
}
});
}, otherPanel);
}
this.add(editorPane, BorderLayout.CENTER);

2
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java

@ -241,7 +241,7 @@ public class ParameterTableModel extends UITableModelAdapter<ParameterProvider>
public ParameterValueRenderer(ValueEditorPane valueEditorPane) {
disableLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Paramete_Name"));
disableLable.setForeground(Color.pink);
disableLable.setHorizontalAlignment(SwingConstants.CENTER);
disableLable.setHorizontalAlignment(SwingConstants.LEFT);
editor = valueEditorPane;
}

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();
}
}

18
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -39,17 +39,25 @@ public class UITableEditorPane<T> extends BasicPane {
public UITableEditorPane(UITableModelAdapter<T> model) {
this.tableModel = model;
this.initComponent(model.createAction());
this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer());
}
public UITableEditorPane(UITableModelAdapter<T> model, JPanel panel) {
this.tableModel = model;
this.initComponent(model.createAction(), panel);
}
public UITableEditorPane(UITableModelAdapter<T> model, String s) {
leftLabelName = s;
this.tableModel = model;
this.initComponent(model.createAction());
this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer());
}
protected void initComponent(UITableEditAction[] action) {
this.initComponent(action, null);
}
protected void initComponent(UITableEditAction[] action, JPanel content) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = new JPanel(new BorderLayout(4, 4));
this.add(pane, BorderLayout.CENTER);
@ -63,9 +71,13 @@ public class UITableEditorPane<T> extends BasicPane {
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(l, BorderLayout.WEST);
controlPane.add(content == null ? l : content, BorderLayout.WEST);
pane.add(controlPane, BorderLayout.NORTH);
this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer());
}
public UITableModelAdapter<T> getTableModel() {

79
designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -4,6 +4,7 @@ import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.js.Hyperlink;
@ -17,6 +18,12 @@ import java.awt.Dimension;
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.row;
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.fix;
public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1;
@ -31,11 +38,11 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
/**
* 对话框高度输入框
*/
private UINumberField heightTextFiled;
private UISpinner heightTextFiled;
/**
* 对话框宽度输入框
*/
private UINumberField widthTextFiled;
private UISpinner widthTextFiled;
public AbstractHyperNorthPane() {
@ -46,8 +53,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -55,38 +61,37 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
return this;
}
});
JPanel targetFramePanel = new JPanel();
targetFramePanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")));
targetFramePanel.add(targetFrameComboBox);
UILabel targetFrameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In"));
targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel();
newWindowConfPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ": "));
heightTextFiled = new UINumberField();
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(heightTextFiled);
newWindowConfPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ": "));
widthTextFiled = new UINumberField();
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
final JPanel newWindowConfPane = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height"));
heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
newWindowConfPane.add(column(10,
row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)),
row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87))
).getComponent());
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
centerPanel.add(column(
10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)),
cell(newWindowConfPane)
).getComponent());
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex());
}
});
targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()));
this.add(this.setFootPanel(), BorderLayout.SOUTH);
this.add(column(
cell(headerPane),
cell(centerPane),
cell(this.setFootPanel())
).getComponent());
}
protected String[] getTargetFrames() {
@ -107,19 +112,19 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.targetFrameComboBox = targetFrameComboBox;
}
public UINumberField getHeightTextFiled() {
public UISpinner getHeightTextFiled() {
return heightTextFiled;
}
public void setHeightTextFiled(UINumberField heightTextFiled) {
public void setHeightTextFiled(UISpinner heightTextFiled) {
this.heightTextFiled = heightTextFiled;
}
public UINumberField getWidthTextFiled() {
public UISpinner getWidthTextFiled() {
return widthTextFiled;
}
public void setWidthTextFiled(UINumberField widthTextFiled) {
public void setWidthTextFiled(UISpinner widthTextFiled) {
this.widthTextFiled = widthTextFiled;
}
@ -127,8 +132,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void populateBean(T link) {
String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight());
widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth());
populateSubHyperlinkBean(link);
}
@ -148,8 +153,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getValue(), false).intValue());
}
}

74
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane;
@ -39,6 +40,10 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
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.cell;
/**
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面.
*
@ -143,12 +148,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
JPanel reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框
reportPathTextField = new UITextField(20);
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER);
// 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST);
browserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -165,6 +169,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
reportletDialog.setVisible(true);
}
});
reportletNamePane.add(row(10,
cell(reportPathTextField).weight(0.85),
cell(browserButton).weight(0.15)
).getComponent());
return reportletNamePane;
}
@ -274,19 +283,19 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
*/
@Override
protected JPanel setFootPanel() {
JPanel content = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel content = new JPanel(new BorderLayout());
// 参数传递方式下拉框
postComboBox = new UIComboBox(new String[]{"GET", "POST"});
postComboBox.setPreferredSize(new Dimension(60, 20));
postComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
content.add(postComboBox);
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
content.add(showParameterInterface);
content.add(row(10,
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)
).getComponent());
return content;
}
@ -324,7 +333,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 是否有重命名属性
if (this.needRenamePane) {
itemNameTextField = new UITextField();
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name") + ":"), itemNameTextField};
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name")), itemNameTextField};
dialogComponents.add(renameComponents);
othersComponents.add(renameComponents);
}
@ -333,7 +342,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
private void initHeaderPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) {
//最上方位置的面板
JPanel headerPane = this.setHeaderPanel();
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet") + ":"), headerPane};
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet")), headerPane};
dialogComponents.add(headerComponents);
othersComponents.add(headerComponents);
}
@ -343,10 +352,9 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
UIComboBox targetFrameComboBox = new UIComboBox(getTargetFrames());
this.setTargetFrameComboBox(targetFrameComboBox);
targetFrameComboBox.setEditable(false);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel targetFramePanel = new JPanel(new BorderLayout());
targetFramePanel.add(targetFrameComboBox);
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In") + ":"), targetFramePanel};
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")), targetFramePanel};
dialogComponents.add(targetComponents);
othersComponents.add(targetComponents);
}
@ -355,36 +363,26 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 对话框标题
titleFiled = new TinyFormulaPane();
titleFiled.getUITextField().setColumns(15);
final JPanel titlePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
final JPanel titlePanel = new JPanel(new BorderLayout());
titlePanel.add(titleFiled);
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title") + ":"), titlePanel};
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title")), titlePanel};
dialogComponents.add(titleComponents);
}
private void initDialogSizePanel(List<Component[]> dialogComponents) {// 对话框大小
final JPanel sizeJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height") + ":");
heightLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
sizeJPanel.add(heightLabel);
UINumberField heightTextFiled = new UINumberField();
heightTextFiled.setMinValue(0);
heightTextFiled.canFillNegativeNumber(false);
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(heightTextFiled);
final JPanel sizePane = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height"));
UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
this.setHeightTextFiled(heightTextFiled);
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":");
widthLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
sizeJPanel.add(widthLabel);
UINumberField widthTextFiled = new UINumberField();
widthTextFiled.setMinValue(0);
widthTextFiled.canFillNegativeNumber(false);
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(widthTextFiled);
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
this.setWidthTextFiled(widthTextFiled);
sizeJPanel.setVisible(true);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size") + ":"), sizeJPanel});
sizePane.add(column(8,
row(10, cell(heightLabel).weight(0.15), cell(heightTextFiled).weight(0.85)),
row(10, cell(widthLabel).weight(0.15), cell(widthTextFiled).weight(0.85))
).getComponent());
sizePane.setVisible(true);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizePane});
}
private void initDialogLocationPanel(List<Component[]> dialogComponents) {
@ -408,13 +406,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10));
leftLocation = new UINumberField();
leftLocation.setMinValue(0);
leftLocation.setPreferredSize(new Dimension(40, 20));
// 位置 距上
final UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Top"));
topLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
topLocation = new UINumberField();
topLocation.setMinValue(0);
topLocation.setPreferredSize(new Dimension(40, 20));
locationPanel.add(leftLabel);
locationPanel.add(leftLocation);
@ -439,13 +435,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
center.addChangeListener(actionListener);
custom.addChangeListener(actionListener);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position") + ":"), locationPanel});
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position")), locationPanel});
}
private void initFooterPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) {
// 最下方的配置面板
// 参数传递方式
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type") + ":"), this.setFootPanel()};
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type")), this.setFootPanel()};
dialogComponents.add(footerComponents);
othersComponents.add(footerComponents);
}

23
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java

@ -17,12 +17,14 @@ import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JPanel;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyperlink> {
/**
* 超链配置面板
@ -47,23 +49,26 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
this.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane = new ReportletHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{
new HyperlinkParametersAction()
},
getChartParaType(),
getValueEditorPane(),
getValueEditorPane()
getValueEditorPane(),
extendPane
);
this.add(parameterViewPane, BorderLayout.CENTER);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
).getComponent());
}
@Override

24
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -3,6 +3,7 @@ package com.fr.design.hyperlink;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -13,7 +14,10 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
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.flex;
import static com.fine.swing.ui.layout.Layouts.fix;
/**
* chart 网页链接 定义属性 target url 特征的 界面
@ -45,20 +49,26 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
@Override
protected JPanel setHeaderPanel() {
JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = new JPanel(new BorderLayout());
urlTextField = new UITextField(headerPane.getWidth());
urlTextField = new UITextField();
urlTextField.setText(ProductConstants.WEBSITE_URL);
JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:");
UILabel urlLabel = new UILabel("URL");
JPanel urlWithHelp = new JPanel(new BorderLayout());
urlWithHelp.add(row(
flex(0.018),
cell(urlLabel).weight(0.125),
cell(urlTextField).weight(0.85),
flex(0.015)
).getComponent());
if (this.needRenamePane) {
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL));
itemNameTextField = new UITextField();
headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH);
headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")), BorderLayout.NORTH);
headerPane.add(urlWithHelp, BorderLayout.CENTER);
} else {
headerPane.add(urlWithHelp, BorderLayout.NORTH);
headerPane.add(urlWithHelp);
}
return headerPane;

23
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java

@ -11,12 +11,14 @@ import com.fr.js.WebHyperlink;
import com.fr.stable.ParameterProvider;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import javax.swing.JPanel;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private static final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane;
@ -38,14 +40,17 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
this.add(parameterViewPane, BorderLayout.CENTER);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(),
getValueEditorPane(), extendPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
).getComponent());
}
@Override

73
designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
@ -10,6 +11,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane;
@ -31,6 +33,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
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 ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperlink> {
private JPanel popupTargetPane;
private UIRadioButton templatePopupButton;
@ -47,7 +53,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
public ContentSettingPane() {
super();
this.initCompoennt();
this.initComponent();
}
public void addTargetRadioActionListener(ActionListener listener) {
@ -64,10 +70,8 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
}
private void initCompoennt() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content")));
private void initComponent() {
this.setLayout(new BorderLayout(10, 10));
popupTargetPane = this.createPopupTargetPane();
this.add(popupTargetPane, BorderLayout.NORTH);
@ -87,10 +91,17 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
popupTargetButtons.add(textPopupButton);
JPanel popupButtonsPanel = new JPanel();
popupButtonsPanel.setLayout( new FlowLayout(FlowLayout.LEFT, 10, 0));
popupButtonsPanel.setLayout(new BorderLayout());
popupButtonsPanel.add(templatePopupButton);
popupButtonsPanel.add(textPopupButton);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"), popupButtonsPanel);
UILabel popupLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"));
popupButtonsPanel.add(row(40,
cell(popupLabel),
row(20, cell(templatePopupButton),
cell(textPopupButton))
).getComponent());
return popupButtonsPanel;
}
private ActionListener radioActionListener = new ActionListener() {
@ -111,15 +122,15 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
private JPanel createTemplateContentPane() {
JPanel templateContentPane = new JPanel();
templateContentPane.setLayout(new BorderLayout(0,8));
templateContentPane.add(this.createTemplateSelectPanel(), BorderLayout.NORTH);
parameterViewPane = this.createReportletParameterViewPane();
templateContentPane.add(parameterViewPane, BorderLayout.CENTER);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
templateContentPane.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = this.createReportletParameterViewPane(extendPane);
templateContentPane.add(column(10,
cell(this.createTemplateSelectPanel()),
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Parameter")))
).getComponent());
return templateContentPane;
}
@ -127,12 +138,10 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
JPanel templatePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框
templatePathTextField = new UITextField(20);
templatePanel.add(templatePathTextField, BorderLayout.CENTER);
// 选择路径按钮
UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select"));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20));
templatePanel.add(templateSelectButton, BorderLayout.EAST);
templateSelectButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -149,19 +158,26 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
reportletDialog.setVisible(true);
}
});
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Template"), templatePanel);
UILabel templateLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Template"));
templatePanel.add(row(40,
cell(templateLabel),
row(
cell(templatePathTextField),
cell(templateSelectButton))
).getComponent());
return templatePanel;
}
private ReportletParameterViewPane createReportletParameterViewPane() {
private ReportletParameterViewPane createReportletParameterViewPane(JPanel extendPane) {
ReportletParameterViewPane templateParameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{
new HyperlinkParametersAction()
},
getChartParaType(),
getValueEditorPane(),
getValueEditorPane()
getValueEditorPane(),
extendPane
);
templateParameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Parameter"), null));
templateParameterViewPane.setPreferredSize(new Dimension(this.getWidth(), 200));
return templateParameterViewPane;
}
@ -172,15 +188,16 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
textContentPane = new TinyFormulaPane();
textContentPane.getUITextField().setColumns(20);
textSettingPanel.add(
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"), textContentPane),
BorderLayout.CENTER);
fontPane = new CustomFontPane();
textSettingPanel.add(
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"), fontPane),
BorderLayout.SOUTH);
return MobilePopupUIUtils.createTitleSplitLineContentPane("", textSettingPanel);
textSettingPanel.add(column(10,
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
cell(textContentPane)),
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
cell(fontPane))
).getComponent());
return textSettingPanel;
}
private String getReportletName() {

20
designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java

@ -14,6 +14,9 @@ import javax.swing.*;
import java.awt.*;
import java.util.Vector;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class CustomFontPane extends JPanel {
private static final int MAX_FONT_SIZE = 100;
private static final Dimension BUTTON_SIZE = new Dimension(20, 18);
@ -43,19 +46,22 @@ public class CustomFontPane extends JPanel {
fontSizeComboBox.setEditable(true);
colorSelectPane = new UIColorButton();
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"));
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.svg"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.svg"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.svg"));
this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE);
Component[] components_font = new Component[]{
fontSizeComboBox, colorSelectPane, bold, underline, italic
};
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(GUICoreUtils.createFlowPane(components_font, FlowLayout.LEFT, LayoutConstants.HGAP_SMALL));
buttonPane.add(row(10,
cell(fontSizeComboBox).weight(0.6),
cell(colorSelectPane).weight(0.1),
cell(bold).weight(0.1),
cell(italic).weight(0.1),
cell(underline).weight(0.1)
).getComponent());
this.setLayout(new BorderLayout(0,0));
this.add(buttonPane, BorderLayout.CENTER);

10
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.i18n.Toolkit;
@ -10,6 +11,9 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink> {
private ContentSettingPane contentSettingPane;
private StyleSettingPane styleSettingPane;
@ -26,9 +30,11 @@ public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink>
JPanel scrollContent = new JPanel();
scrollContent.setLayout(new BorderLayout(10, 10));
contentSettingPane = new ContentSettingPane();
scrollContent.add(contentSettingPane, BorderLayout.NORTH);
styleSettingPane = new StyleSettingPane();
scrollContent.add(styleSettingPane, BorderLayout.CENTER);
scrollContent.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(contentSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content"))),
cell(FineUIUtils.wrapComponentWithTitle(styleSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style")))
).getComponent());
contentSettingPane.addTargetRadioActionListener(radioActionListener);

2
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java

@ -55,7 +55,7 @@ public class MobilePopupRegularPane extends BasicPane {
radiosPane.add(customRadio);
radiosPane.add(autoRadio);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY);
}
private ActionListener radioActionListener = new ActionListener() {

32
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java

@ -2,24 +2,42 @@ package com.fr.design.hyperlink.popup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.widget.UITitleSplitLine;
import sun.awt.windows.WComponentPeer;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class MobilePopupUIUtils {
static public int Line_Height = 20;
static public int SplitLineWidth = 520;
static public int Left_Title_width = 80;
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel) {
return createLeftTileRightContentPanel(title, contentPanel, null);
}
/**
* 创建子标题和组件行布局
* @param title 子标题
* @param contentPanel 组件
* @param color 子标题颜色默认黑色
* @return JPanel
*/
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel, Color color) {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0,0,0, 30));
jp.setLayout(new BorderLayout(10,0));
UILabel titleLabel = new UILabel(title + ":");
titleLabel.setPreferredSize(new Dimension(MobilePopupUIUtils.Left_Title_width, Line_Height));
titleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
jp.add(titleLabel, BorderLayout.WEST);
jp.add(contentPanel, BorderLayout.CENTER);
jp.setLayout(new BorderLayout());
UILabel titleLabel = new UILabel(title);
if (color != null) {
titleLabel.setForeground(color);
}
titleLabel.setForeground(color);
jp.add(row(10,
cell(titleLabel),
cell(contentPanel)
).getComponent());
return jp;
}

89
designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java

@ -7,15 +7,18 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.js.MobilePopupHyperlink;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
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;
import static com.fine.swing.ui.layout.Layouts.flex;
public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
private double maxNumber = 100;
private double maxBorderRadius = 24;
@ -40,65 +43,78 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
}
private void initComponent() {
this.setLayout(new BorderLayout(0, 10));
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style")));
this.setLayout(new BorderLayout());
typePane = this.createTypePane();
this.add(typePane, BorderLayout.NORTH);
stylePane = this.createStylePane();
this.add(stylePane, BorderLayout.CENTER);
this.add(column(10,
cell(typePane),
cell(stylePane)
).getComponent());
}
private JPanel createTypePane() {
JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
popupTypeLabel = new UILabel("");
typePane.add(popupTypeLabel, BorderLayout.CENTER);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane);
UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"));
typePane.add(row(40,
cell(typeLabel),
cell(popupTypeLabel)
).getComponent());
return typePane;
}
private JPanel createStylePane() {
JPanel stylePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
stylePane.add(this.createBorderSettingPane(), BorderLayout.NORTH);
stylePane.add(this.createBackgroundSettingPane(), BorderLayout.CENTER);
stylePane.add(this.createPopupSizePane(), BorderLayout.SOUTH);
stylePane.add(column(10,
cell(this.createBorderSettingPane()),
cell(this.createBackgroundSettingPane()),
cell(this.createPopupSizePane())
).getComponent());
return stylePane;
}
private JPanel createBorderSettingPane() {
JPanel borderPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10);
layout.setAlignLeft(true);
borderPane.setLayout(layout);
borderPane.setLayout(new BorderLayout());
borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY);
borderType.setPreferredSize(new Dimension(115, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType));
borderColor = new NewColorSelectBox(100);
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor));
borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20);
borderRadiusSpinner.setPreferredSize(new Dimension(120, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"), borderPane);
UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"));
borderPane.add(row(40,
column(10,
cell(borderLabel).weight(0.3),
flex().weight(0.7)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY)))
).getComponent());
return borderPane;
}
private JPanel createBackgroundSettingPane() {
JPanel bgPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10);
layout.setAlignLeft(true);
bgPane.setLayout(layout);
bgPane.setLayout(new BorderLayout());
JPanel colorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,0));
bgColor = new NewColorSelectBox(100);
colorPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor));
bgPane.add(colorPane);
JPanel transparencyPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.numberDragPane = new UINumberDragPane(0,100);
this.numberDragPane.setPreferredSize(new Dimension(140, 20));
transparencyPane.add(numberDragPane, BorderLayout.CENTER);
transparencyPane.add(new UILabel(" %"), BorderLayout.EAST);
bgPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"), bgPane);
JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"));
bgPane.add(row(40,
column(10,
cell(bgLabel).weight(0.6),
flex().weight(0.4)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY))
)
).getComponent());
return bgPane;
}
private JPanel createPopupSizePane() {
@ -107,10 +123,17 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
mobileRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Mobile_Rules"));
padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules"));
sizePane.add(mobileRegularPane, BorderLayout.NORTH);
sizePane.add(padRegularPane, BorderLayout.CENTER);
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"), sizePane);
JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"));
sizePane.add(row(14,
column(10,
cell(sizeLabel).weight(0.16),
flex().weight(0.84)),
column(10,
cell(mobileRegularPane),
cell(padRegularPane)
)
).getComponent());
return sizePane;
}
@Override

51
designer-base/src/main/java/com/fr/design/javascript/EmailPane.java

@ -8,14 +8,25 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.js.EmailJavaScript;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
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.flex;
import static com.fine.swing.ui.layout.Layouts.row;
public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
@ -37,12 +48,12 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));
tipsPane1 = new UILabel();
tipsPane1.setHorizontalAlignment(SwingConstants.RIGHT);
tipsPane1.setForeground(Color.pink);
tipsPane1.setHorizontalAlignment(SwingConstants.LEFT);
tipsPane1.setForeground(Color.gray);
tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips"));
UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content") + ":");
mainTextLabel.setHorizontalAlignment(SwingConstants.RIGHT);
UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content"));
mainTextLabel.setHorizontalAlignment(SwingConstants.LEFT);
mainTextLabel.setVerticalAlignment(SwingConstants.TOP);
JScrollPane scrollPane = new JScrollPane(mainTextEditor = new JTextArea());
scrollPane.setBorder(null);
@ -62,21 +73,23 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
double[] rowSize = { preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred, preferred };
double[] columnSize = { preferred, fill};
showTplContent = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email_Can_Preview_Report_Content"));
centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
{new UILabel(), tipsPane1},
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"), maitoEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"), ccEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"), bccEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"), titleEditor = new UITextField()),
{mainTextLabel, scrollPane},
{new UILabel(), showTplContent},
{new UILabel(), tipsPane2}},rowSize, columnSize, 8);
centerPane = new JPanel(new BorderLayout());
centerPane.add(column(10,
row(cell(tipsPane1), cell(new UILabel())),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"))).weight(0.1), flex(0.04), cell(maitoEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"))).weight(0.1), flex(0.04), cell(ccEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"))).weight(0.1), flex(0.04), cell(bccEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"))).weight(0.1), flex(0.04), cell(titleEditor = new UITextField()).weight(0.86)),
row(cell(mainTextLabel).weight(0.1), flex(0.04), cell(scrollPane).weight(0.86)).weight(1.0),
row(cell(new UILabel()).weight(0.1), flex(0.04), cell(showTplContent).weight(0.86)),
row(cell(new UILabel()).weight(0.14), cell(tipsPane2).weight(0.86))
).getComponent());
}
protected JComponent[] createLinePane(String string, JTextComponent textComp) {
UILabel label = new UILabel(string + ":");
label.setPreferredSize(new Dimension(70, label.getPreferredSize().height));
label.setHorizontalAlignment(SwingConstants.RIGHT);
UILabel label = new UILabel(string);
label.setHorizontalAlignment(SwingConstants.LEFT);
return new JComponent[] { label, textComp };
}

20
designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java

@ -26,6 +26,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.general.IOUtils;
import com.fr.js.JavaScriptImpl;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.SwingConstants;
@ -40,6 +41,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class JSContentPane extends BasicPane {
protected RSyntaxTextArea contentTextArea;
private UILabel funNameLabel = new UILabel();
@ -47,7 +51,7 @@ public class JSContentPane extends BasicPane {
private static final Dimension FUNCTION_NAME_LABEL_SIZE = new Dimension(300, 80);
private String[] defaultArgs;
private int titleWidth = 180;
private JPanel labelPane = new JPanel(new BorderLayout(6, 4));;
private JPanel labelPane = new JPanel();
private NewJavaScriptImplPane newJavaScriptImplPane = null;
private JavaScriptImpl javaScript;
private JSImplUpdateAction jsImplUpdateAction;
@ -97,7 +101,6 @@ public class JSContentPane extends BasicPane {
private void addNewPaneLabel(){
UILabel advancedEditorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Advanced_Editor"), IconUtils.readIcon("com/fr/design/images/edit/advancedEditor.svg"), SwingConstants.LEFT);
advancedEditorLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
advancedEditorLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -183,15 +186,16 @@ public class JSContentPane extends BasicPane {
}.execute();
}
});
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
labelPane.add(label,BorderLayout.CENTER);
JPanel jsParaPane = new JPanel(new BorderLayout(4, 4));
jsParaPane.setPreferredSize(new Dimension(300, 80));
JPanel jsParaPane = new JPanel(new BorderLayout());
UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setPreferredSize(FUNCTION_NAME_LABEL_SIZE);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(scrollPane, BorderLayout.WEST);
jsParaPane.add(labelPane, BorderLayout.EAST);
jsParaPane.add(row(10,
cell(scrollPane).weight(0.6),
cell(labelPane).weight(0.4)
).getComponent());
return jsParaPane;
}

21
designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java

@ -25,11 +25,14 @@ import javax.swing.event.TableModelListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridLayout;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
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.cell;
public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
private static final int BOTTOM_BORDER = 12;
private UITextField itemNameTextField;
@ -64,21 +67,23 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
protected void initComponents() {
parameterPane = createParameterViewPane();
importedJsPane = createImportedJsPane();
importedJsPane.setPreferredSize(new Dimension(265, 150));
jsPane = createJSContentPane(defaultArgs);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript")));
parameterPane.setPreferredSize(new Dimension(265, 150));
JPanel topPane = new JPanel(new GridLayout(1,2));
topPane.add(importedJsPane);
topPane.add(parameterPane);
JPanel topPane = new JPanel(new BorderLayout());
topPane.add(row(10,
cell(importedJsPane).weight(0.5),
cell(parameterPane).weight(0.5)
).getComponent());
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0));
this.setLayout(new BorderLayout());
this.add(topPane, BorderLayout.NORTH);
this.add(jsPane, BorderLayout.CENTER);
this.add(column(10,
cell(topPane).weight(0.5),
cell(jsPane).weight(0.5)
).getComponent());
this.reLayoutForChart();
}

4
designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java

@ -12,8 +12,8 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.editor.editor.Editor;
import com.fr.form.data.DataTableConfig;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

6
designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java

@ -2,6 +2,7 @@ package com.fr.design.parameter;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.svg.IconUtils;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.NameableSelfCreator;
@ -57,7 +58,10 @@ public class ParameterArrayPane extends JListControlPane {
*/
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) {
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"),
"com/fr/design/images/server/global_param.png",
Parameter.class,
ParameterPane.class) {
public Parameter createNameable(UnrepeatedNameHelper helper) {
// 返回参数设置面板.
return new Parameter(helper.createUnrepeatedName(DEFAULT_PARAMETER_NAME_PREFIX));

2
designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java

@ -63,7 +63,7 @@ public class DateValuePane extends Column {
});
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(3)
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(1.6), flex(1.4)
),
cell(customRow)
);

6
designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java

@ -70,10 +70,12 @@ public class NumberEditorValidatePane extends JPanel {
this.allowNegativeCheckBox.addActionListener(allowNegativeListener);
this.setMaxValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Max_Value"), false);
this.maxValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.maxValueSpinner.setSize(this.decimalLength.getSize());
this.setMaxValueCheckBox.addActionListener(setMaxListener);
this.maxValueSpinner.addChangeListener(maxValueChangeListener);
this.setMinValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Min_Value"), false);
this.minValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.minValueSpinner.setSize(this.decimalLength.getSize());
this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener);
initErrorMsgPane();
@ -91,10 +93,10 @@ public class NumberEditorValidatePane extends JPanel {
cell(limitNumberPane),
cell(allowNegativeCheckBox),
row(
cell(setMaxValueCheckBox).weight(1), cell(maxValueSpinner).weight(1.5)
cell(setMaxValueCheckBox).weight(1.2), cell(maxValueSpinner).weight(3)
),
row(
cell(setMinValueCheckBox).weight(1), cell(minValueSpinner).weight(1.5)
cell(setMinValueCheckBox).weight(1.2), cell(minValueSpinner).weight(3)
),
cell(errorMsgBorderPane)
).getComponent());

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

@ -1,5 +1,6 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -22,6 +23,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
@ -30,26 +35,24 @@ import java.awt.event.ActionListener;
public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane;
private static final int DEFAULT_LENGTH = 25;
private static final int DEFAULT_LENGTH = 33;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
classNameTextField = new UITextField();
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
reportletNamePane.add(editButton);
UITextArea area = new UITextArea(2, 1);
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -60,6 +63,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 +77,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,23 +92,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.setLayout(new BorderLayout());
reportletNamePane.add(row(10,
cell(classNameTextField).weight(0.8),
cell(browserButton).weight(0.1),
cell(editButton).weight(0.1)
).getComponent());
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null));
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"));
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(column(
cell(reportletNamePane),
cell(objectProperiesPane).weight(1.0),
cell(dsPane)
).getComponent());
checkAddButtonEnable();
}
public int getLengthOfTextField() {
return DEFAULT_LENGTH;
return FineUIScale.scale(DEFAULT_LENGTH);
}
protected String title4PopupWindow() {

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

@ -1,5 +1,7 @@
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;
@ -25,6 +27,7 @@ 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;
@ -47,6 +50,7 @@ import com.fr.write.config.DeleteConfig;
import com.fr.write.config.InsertConfig;
import com.fr.write.config.IntelliDMLConfig;
import com.fr.write.config.UpdateConfig;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
@ -60,6 +64,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTree;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableCellRenderer;
@ -83,9 +88,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,31 +151,40 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
this.v_Types = v_Types;
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
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 = 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());
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);
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);
// 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")));
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);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true,
cell(typePane),
cell(chooseTable))
.getComponent());
this.add(column(10, true,
cell(northPane),
cell(editTablePane))
.getComponent());
initJTableColumn();
@ -187,15 +207,12 @@ 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);
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);
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON);
@ -211,8 +228,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
});
helpButton.set4ToolbarButton();
checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
buttonGroup.add(row(5, cell(UpdateCheckBox),
cell(helpButton)));
controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
}
}
@ -290,7 +308,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree);
addComponent(conditionPane, jp);
UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"));
addSubmitConditionButton.addActionListener(new ActionListener() {
@ -322,8 +339,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
conditionPane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), setControlBtnPanePosition());
controlBtnPane.add(addSubmitConditionButton);
conditionPane.add(row(
cell(jp).weight(0.74),
column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26)
).getComponent());
return conditionPane;
}
@ -665,6 +685,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private void initJTableColumn() {
TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0);
column0.setMaxWidth(50);
column0.setCellRenderer(new ColumnNameTableCellRenderer());
TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1);
column1.setCellRenderer(new ColumnNameTableCellRenderer());
@ -1154,7 +1175,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnName) {
this.setText(((ColumnName) value).name);
}
@ -1170,6 +1191,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnValue) {
if (((ColumnValue) value).obj != null) {

BIN
designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

11
designer-base/src/main/resources/com/fr/design/images/data/hyperlink.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5338_73074)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5064 9.60648C19.8969 9.21596 19.8969 8.58279 19.5064 8.19227L15.9708 4.65673C12.8466 1.53254 7.7813 1.53254 4.65711 4.65673C1.53292 7.78093 1.53292 12.8462 4.65711 15.9704L8.19264 19.506C8.58317 19.8965 9.21633 19.8965 9.60686 19.506C9.99738 19.1154 9.99738 18.4823 9.60686 18.0918L6.07132 14.5562C3.72818 12.2131 3.72818 8.41409 6.07132 6.07095C8.41447 3.7278 12.2135 3.7278 14.5566 6.07095L18.0921 9.60648C18.4827 9.997 19.1158 9.997 19.5064 9.60648ZM12.4353 22.3344C12.8258 21.9439 13.459 21.9439 13.8495 22.3344L17.385 25.8699C19.7282 28.2131 23.5272 28.2131 25.8703 25.8699C28.2135 23.5268 28.2135 19.7278 25.8703 17.3847L22.3348 13.8491C21.9443 13.4586 21.9443 12.8254 22.3348 12.4349C22.7253 12.0444 23.3585 12.0444 23.749 12.4349L27.2845 15.9704C30.4087 19.0946 30.4087 24.16 27.2845 27.2841C24.1603 30.4083 19.095 30.4083 15.9708 27.2841L12.4353 23.7486C12.0448 23.3581 12.0448 22.7249 12.4353 22.3344Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M10.3432 10.3432C10.7337 9.95263 11.3669 9.95263 11.7574 10.3432L21.6569 20.2426C22.0474 20.6332 22.0474 21.2663 21.6569 21.6569C21.2664 22.0474 20.6332 22.0474 20.2427 21.6569L10.3432 11.7574C9.95266 11.3668 9.95266 10.7337 10.3432 10.3432Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
<defs>
<clipPath id="clip0_5338_73074">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/data/user_widget.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 774 B

10
designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg

@ -0,0 +1,10 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5516_63505)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2C23.732 2 30 8.26801 30 16ZM32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM8 24.3492C8 24.6254 8.22386 24.8492 8.5 24.8492H10.8284L22.412 13.2657L19.5836 10.4372L8 22.0208V24.3492ZM24.2635 11.4142L23.8262 11.8514L20.9978 9.02302L21.435 8.58579C22.2161 7.80474 23.4824 7.80474 24.2635 8.58579C25.0445 9.36684 25.0445 10.6332 24.2635 11.4142Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
<defs>
<clipPath id="clip0_5516_63505">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 826 B

12
designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg

@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15px" height="15px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>高级编辑</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="高级编辑" fill-rule="nonzero">
<path d="M13.8797,5.91875 C13.5781,5.91875 13.3328,6.16406 13.3328,6.46562 L13.3328,10.6375 L3.87502,10.6375 L3.87502,2.17188 L7.23596,2.17188 C7.53752,2.17188 7.78284,1.92656 7.78284,1.625 C7.78284,1.32344 7.53752,1.07812 7.23596,1.07812 L3.32815,1.07812 C3.02659,1.07812 2.78127,1.32344 2.78127,1.625 L2.78127,3.73594 L1.50159,3.73594 C1.20002,3.73594 0.954712,3.98125 0.954712,4.28281 L0.954712,13.5031 C0.954712,13.8047 1.20002,14.05 1.50159,14.05 L12.0547,14.05 C12.3563,14.05 12.6016,13.8047 12.6016,13.5031 L12.6016,11.7312 L13.8813,11.7312 C14.1828,11.7312 14.4282,11.4859 14.4282,11.1844 L14.4282,6.46562 C14.4266,6.16406 14.1813,5.91875 13.8797,5.91875 Z M11.5063,12.9578 L2.04846,12.9578 L2.04846,4.83125 L2.78127,4.83125 L2.78127,11.1844 C2.78127,11.4859 3.02659,11.7312 3.32815,11.7312 L11.5063,11.7312 L11.5063,12.9578 Z" id="形状" fill="#333334"></path>
<path d="M6.35444,5.79122 C6.34516,5.80296 6.33589,5.81533 6.33172,5.83022 L5.61566,8.44127 C5.57391,8.59329 5.61668,8.7571 5.72983,8.87257 C5.81446,8.9548 5.92597,9 6.04474,9 C6.08396,9 6.12326,8.99533 6.16194,8.98511 L8.76858,8.27801 C8.77277,8.27801 8.77479,8.28165 8.77794,8.28165 C8.80789,8.28165 8.83731,8.27081 8.85952,8.24823 L14.2794,2.80158 C14.4864,2.59539 14.6,2.31452 14.6,2.00894 C14.6,1.66268 14.4523,1.31656 14.1937,1.06006 L13.5355,0.40431 C13.2773,0.14713 12.9288,0 12.5808,0 C12.2736,0 11.9912,0.11295 11.7837,0.31861 L6.36482,5.76711 C6.35758,5.77373 6.35961,5.78352 6.35444,5.79122 Z M13.5974,2.12274 L12.905,2.81081 L11.7827,1.67681 L12.4652,0.99796 C12.573,0.89011 12.7822,0.90584 12.9061,1.02954 L13.5648,1.68529 C13.6335,1.75355 13.6727,1.84442 13.6727,1.93427 C13.6723,2.00792 13.6459,2.07475 13.5974,2.12274 Z M7.59405,5.90013 L11.0733,2.38229 L12.1962,3.51705 L8.72632,7.02506 L7.59405,5.90013 Z M6.67769,7.92832 L7.04115,6.60144 L8.01068,7.56581 L6.67769,7.92832 Z" id="形状" fill="#2F8EF1"></path>
</g>
</g>
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M29.0353 2.70388C28.429 2.09756 27.446 2.09757 26.8397 2.70389L14.4417 15.1019L13.2902 18.449L16.6374 17.2975L29.0353 4.89956C29.6417 4.29324 29.6417 3.3102 29.0353 2.70388Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M6 2.99997H22.1733L20.1733 4.99997H6L6 28H26V11.8899L28 9.88986V28C28 29.1045 27.1046 30 26 30H6C4.89543 30 4 29.1045 4 28V4.99997C4 3.8954 4.89543 2.99997 6 2.99997Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 536 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.7 14.8828V6.2H15.9561C18.3552 6.2 20.3 8.14483 20.3 10.5439C20.3 12.872 18.4685 14.7724 16.1677 14.8828H8.7ZM6.5 14.8828V5.03226C6.5 4.46216 6.96216 4 7.53226 4H15.9561C19.5702 4 22.5 6.92981 22.5 10.5439C22.5 12.3184 21.7937 13.9279 20.6469 15.1067C23.4422 15.8574 25.5 18.4091 25.5 21.4414C25.5 25.0636 22.5636 28 18.9414 28H7.61765C7.00039 28 6.5 27.4996 6.5 26.8823V17.0878V14.8828ZM8.7 17.0878V25.8H18.9414C21.3486 25.8 23.3 23.8486 23.3 21.4414C23.3 19.0342 21.3486 17.0828 18.9414 17.0828H16.2159C16.1297 17.0861 16.0431 17.0878 15.9561 17.0878H8.7Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 749 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 6.1C13 5.49249 13.4925 5 14.1 5H24.9C25.5075 5 26 5.49249 26 6.1C26 6.70751 25.5075 7.2 24.9 7.2H20.7248L14.1248 24.8001H17.9C18.5075 24.8001 19 25.2925 19 25.9001C19 26.5076 18.5075 27.0001 17.9 27.0001H7.1C6.49249 27.0001 6 26.5076 6 25.9001C6 25.2925 6.49249 24.8001 7.1 24.8001H11.7752L18.3752 7.2H14.1C13.4925 7.2 13 6.70751 13 6.1Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 531 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 4C9.5 3.44772 9.05228 3 8.5 3C7.94772 3 7.5 3.44772 7.5 4V15.5C7.5 20.1944 11.3056 24 16 24C20.6944 24 24.5 20.1944 24.5 15.5V4C24.5 3.44772 24.0523 3 23.5 3C22.9477 3 22.5 3.44772 22.5 4V15.5C22.5 19.0899 19.5899 22 16 22C12.4101 22 9.5 19.0899 9.5 15.5V4ZM6.1 26C5.49249 26 5 26.4925 5 27.1C5 27.7075 5.49249 28.2 6.1 28.2H25.9C26.5075 28.2 27 27.7075 27 27.1C27 26.4925 26.5075 26 25.9 26H6.1Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 591 B

BIN
designer-base/src/main/resources/com/fr/design/images/server/global_param.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

10
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java

@ -17,6 +17,9 @@ import java.awt.Dimension;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2011-12-28 下午02:51:10
@ -46,7 +49,6 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
}
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell")));
@ -57,8 +59,10 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
this.add(column(
cell(centerPane).weight(0.2),
cell(parameterViewPane).weight(0.8)
).getComponent());
}
protected void addPaneInCenter(JPanel centerPane) {

9
designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java

@ -1,5 +1,6 @@
package com.fr.design.module;
import com.fr.base.svg.IconUtils;
import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.chart.web.ChartHyperRelateFloatLink;
@ -41,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = {
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper);
}

7
designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java

@ -1,5 +1,6 @@
package com.fr.design.module;
import com.fr.base.svg.IconUtils;
import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane;
@ -31,9 +32,9 @@ public class FormHyperlinkGroup extends BaseHyperlinkGroup {
public NameableCreator[] getHyperlinkCreators() {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = {
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper);
}

6
designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java

@ -16,11 +16,13 @@ import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade;
import javax.swing.KeyStroke;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class WidgetManagerAction extends UpdateAction {
public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(720, 600);
public WidgetManagerAction() {
this.setMenuKeySet(WIDGET_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
@ -45,7 +47,7 @@ public class WidgetManagerAction extends UpdateAction {
}
};
BasicDialog widgetConfigDialog = widgetManagerPane.showLargeWindow(designerFrame, new DialogActionAdapter() {
BasicDialog widgetConfigDialog = widgetManagerPane.showWindowWithCustomSize(designerFrame, new DialogActionAdapter() {
@Override
public void doOk() {
@ -68,7 +70,7 @@ public class WidgetManagerAction extends UpdateAction {
}
}));
}
});
}, WINDOW_CUSTOM_SIZE);
widgetConfigDialog.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {

6
designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java

@ -4,8 +4,10 @@ import java.awt.BorderLayout;
import java.awt.Window;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.AbstractTableModel;
@ -17,6 +19,7 @@ import com.fr.design.dialog.DialogActionListener;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.selection.SelectionListener;
import sun.swing.table.DefaultTableCellHeaderRenderer;
/*
* SmartJTablePane用于在Grid上面选单元格时编辑JTable
@ -70,6 +73,9 @@ public abstract class SmartJTablePane extends BasicPane {
}
}
});
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
table.getTableHeader().setDefaultRenderer(headerRenderer);
setCellRenderer();
actionReportPane.addSelectionChangeListener(gridSelectionChangeL);

3
designer-realize/src/main/java/com/fr/design/headerfooter/ImagePane.java

@ -4,6 +4,7 @@
package com.fr.design.headerfooter;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.dialog.BasicPane;
@ -49,7 +50,7 @@ public class ImagePane extends BasicPane {
previewPane.add(new JScrollPane(imagePreviewPane));
previewPane.setBorder(new FineRoundBorder());
previewPane.setPreferredSize(new Dimension(500, 400));
previewPane.setPreferredSize(new Dimension(FineUIScale.scale(500), FineUIScale.scale(400)));
previewPane.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));

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

@ -1,5 +1,6 @@
package com.fr.design.report;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.IntegerEditor;
@ -25,7 +26,6 @@ import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
@ -44,6 +44,13 @@ import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
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
* @version 10.0
@ -52,7 +59,7 @@ import java.util.List;
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;
@ -77,46 +84,50 @@ 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"));
outReportEnginePane.setPreferredSize(new Dimension(600, 370));
this.add(outReportEnginePane, BorderLayout.NORTH);
JPanel outReportEnginePane = new JPanel(new BorderLayout());
createOutPagingEngineSelectPane();
outReportEnginePane.add(createReportEnginePane());
JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice"));
this.add(outAdvicePane, BorderLayout.SOUTH);
outAdvicePane.setPreferredSize(new Dimension(600, 150));
JPanel outAdvicePane = new JPanel();
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane());
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 JPanel createReportEnginePane() {
JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
clientPaging = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false);
clientPagingPane.add(clientPaging);
reportEnginePane.add(clientPagingPane);
outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"));
reportEnginePane.add(outPagingEngineSelectPane);
private void createOutPagingEngineSelectPane() {
outPagingEngineSelectPane = new JPanel(new BorderLayout());
outPagingEngineSelectPane.setVisible(false);
outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300));
outPagingEngineSelectPane.add(createPagingEngineSelectPane());
}
private JPanel createReportEnginePane() {
JPanel reportEnginePane = new JPanel(new BorderLayout());
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false);
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane));
reportEnginePane.add(clientPaging);
return reportEnginePane;
}
private JPanel createPagingEngineSelectPane() {
engineSettingPane = new JLayeredPane();
engineSettingPane.setPreferredSize(new Dimension(570, 240));
engineSettingPane.setBounds(0, 0, 570, 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.setVisible(true);
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
pagingEngineSelectPane.add(createPagingEngineRadioPanel());
pagingEngineSelectPane.add(engineSettingPane);
JPanel pagingEngineSelectPane = new JPanel(new BorderLayout());
pagingEngineSelectPane.add(createPagingEngineRadioPanel(), BorderLayout.NORTH);
pagingEngineSelectPane.add(engineSettingPane, BorderLayout.CENTER);
return pagingEngineSelectPane;
}
@ -125,45 +136,49 @@ 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, 570, 240);
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
engineXPageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Row_Count"));
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(column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip))
.getComponent());
outEngineXSettingPane.add(engineXSettingPane);
}
private void createLineEngineSettingPane() {
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine"));
outLineEngineSettingPane.setBounds(0, 0, 570, 240);
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
lineEnginePageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
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);
lineEnginePageQueryPane.setVisible(false);
lineEngineSettingPane.add(lineEnginePageQueryPane);
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane));
JPanel tipPane = createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
lineEngineSettingPane.add(tipPane);
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
lineEngineSettingPane.add(column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane))
.getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane);
}
@ -190,16 +205,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) {
@ -211,6 +222,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
}
}
});
adviceDownPane.add(row(20,
cell(downExplainLabel),
cell(helper))
.getComponent());
advicePane.add(column(20,
cell(topExplainLabel),
cell(adviceDownPane))
.getComponent());
return advicePane;
}
@ -222,7 +242,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
buttonGroup.add(lineEngine);
radioButtons.add(newEngine);
radioButtons.add(lineEngine);
double p = TableLayout.PREFERRED;
double p = TableLayout.FILL;
double[] rowSize = {p};
double[] columnSize = {p, p, p, p, p};
Component[][] components = new Component[][]{
@ -239,7 +259,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute");
return Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute");
}
@Override
@ -254,14 +274,12 @@ 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);
outEngineXSettingPane.setVisible(true);
outLineEngineSettingPane.setVisible(false);
engineXCountPerPageEditor.setValue(new Integer(ob.getCountPerPage()));
engineXPageQueryBox.setSelected(ob.isPageQuery());
engineXPageQueryPane.setVisible(ob.isPageQuery());
} else {
engineSettingPane.moveToFront(outLineEngineSettingPane);
outEngineXSettingPane.setVisible(false);
outLineEngineSettingPane.setVisible(true);
lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage()));
@ -335,11 +353,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;
@ -356,7 +374,6 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
target.setVisible(true);
showTarget.setVisible(true);
notShowTarget.setVisible(false);
target.moveToFront(showTarget);
} else {
target.setVisible(false);
}

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

@ -14,6 +14,7 @@ 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;
@ -23,7 +24,6 @@ import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class WriteShortCutsPane extends JPanel{
private static final int V_GAP = 20;
private static final int MAX_LABEL_WIDTH = 100;
@ -57,7 +57,6 @@ public class WriteShortCutsPane extends JPanel{
cons.weightx = 1;
cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);
contentPane.add(getFeatureNamePane(), cons);
contentPane.add(getHintsPane(), cons);

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

@ -1,5 +1,6 @@
package com.fr.design.webattr;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory;
@ -40,8 +41,6 @@ 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);
container.add(tabbedPane, BorderLayout.CENTER);
// peter: writeSQLAttrList的编辑.
if (submiterListPane == null) {
@ -53,9 +52,15 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
}
writeShortCutsPane = new WriteShortCutsPane();
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane);
final FineTabbedPane tabbedPane = FineTabbedPane.builder()
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane)
.withHeadRatio(0.5f)
.build();
container.setPreferredSize(this.getPreferredSize());
container.add(tabbedPane, BorderLayout.CENTER);
}
@Override

43
designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java

@ -7,7 +7,9 @@ import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.mobile.WidgetMobilePane;
@ -34,9 +36,7 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板
private ArrayList<JPanel> paneList;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private FineTabbedPane tabsPane;
private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器
@ -64,31 +64,11 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override
public void tabChanged(int index) {
tabbedPane.show(center, tabTitles[index]);
}
};
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsHeaderIconPane, BorderLayout.NORTH);
wrapperPane.add(center, BorderLayout.CENTER);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
this.add(wrapperPane, BorderLayout.CENTER);
// 属性
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return attriTabPane;
}
};
widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -111,10 +91,17 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
mobileCardLayout = (CardLayout) mobileCardPane.getLayout();
tabsPane = FineTabbedPane.builder()
.addTab(tabTitles[0], new UIScrollPane(attriTabPane))
.addTab(tabTitles[1], eventTabPane)
.addTab(tabTitles[2], mobileTabPane)
.build();
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsPane, BorderLayout.CENTER);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
wrapperPane.setOpaque(false);
this.add(wrapperPane, BorderLayout.CENTER);
center.add(basicScrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"));
center.add(eventTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"));
center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal"));
initPaneList();
}
@ -122,7 +109,7 @@ public class CellWidgetCardPane extends BasicPane {
private void initPaneList() {
paneList = new ArrayList<JPanel>();
paneList.add(attriTabPane);
paneList.add(eventPane);
paneList.add(eventTabPane);
paneList.add(mobileTabPane);
}
@ -161,7 +148,7 @@ public class CellWidgetCardPane extends BasicPane {
currentWidgetMobilePane = mobilePane;
tabsHeaderIconPane.setSelectedIndex(0);
//tabsHeaderIconPane.setSelectedIndex(0);
}
public Widget update() {

4
designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java

@ -1,11 +1,11 @@
package com.fr.design.widget;
import java.awt.BorderLayout;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.UserDefinedWidgetConfig;
import java.awt.BorderLayout;
public class UserDefinedWidgetConfigPane extends BasicBeanPane<UserDefinedWidgetConfig> {
private ValueWidgetPane editorDefPane;

33
designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java

@ -15,6 +15,11 @@ import com.fr.form.ui.WidgetValue;
import java.awt.*;
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;
import static com.fine.swing.ui.layout.Layouts.flex;
public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor;
@ -27,18 +32,24 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel initNorthPane(){
JPanel northPane = super.initNorthPane();
label = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")+ ":");
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value"));
label.setVisible(false);
widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{northPane, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
widgetValuePane = new JPanel(new BorderLayout());
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setOpaque(false);
widgetValuePane.setOpaque(false);
centerPane.add(row(
cell(label).weight(68),
cell(widgetValuePane).weight(372)).getComponent()
);
JPanel jPanel = new JPanel();
jPanel.setBackground(Color.WHITE);
jPanel.setLayout(new BorderLayout());
jPanel.add(column(10, true,
cell(northPane),
cell(centerPane)
).getComponent());
return jPanel;
}

2
designer-realize/src/main/java/com/fr/design/widget/WidgetConfigPane.java

@ -42,7 +42,7 @@ public class WidgetConfigPane extends JListControlPane {
*/
public NameableCreator[] createNameableCreators() {
NameableCreator defaultWidget = new NameObjectCreator(WidgetConstants.USER_DEFINED_WIDGETCONFIG,
"/com/fr/design/images/data/user_widget.png", UserDefinedWidgetConfig.class,
"/com/fr/design/images/data/user_widget.svg", UserDefinedWidgetConfig.class,
UserDefinedWidgetConfigPane.class);
return new NameableCreator[] { defaultWidget };
}

8
designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java

@ -80,8 +80,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.add(column(
10,
cell(northPane),
cell(cellEditorCardPane).weight(1)
cell(northPane).weight(0.17),
cell(cellEditorCardPane).weight(0.83)
).getComponent()
);
}
@ -90,8 +90,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return column(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(LEFT_WEIGHT),
cell(editorTypeComboBox).weight(RIGHT_WEIGHT)
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68),
cell(editorTypeComboBox).weight(372)
)
).getComponent();
}

14
designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -15,8 +15,6 @@ import java.awt.BorderLayout;
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.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class BasicWidgetPropertySettingPane extends BasicPane {
@ -33,13 +31,11 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree();
this.add(column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(LEFT_WEIGHT),
cell(widgetNameComboBox).weight(RIGHT_WEIGHT)
),
cell(enableCheckBox),
cell(visibleCheckBox)
this.add(row(LayoutConstants.HORIZONTAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2),
cell(widgetNameComboBox).weight(0.6),
cell(enableCheckBox).weight(0.1),
cell(visibleCheckBox).weight(0.1)
).getComponent());
}

39
designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -1,9 +1,8 @@
package com.fr.design.widget.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.FRContext;
import com.fr.data.core.FormatField;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
@ -20,10 +19,9 @@ import com.fr.stable.ArrayUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -67,7 +65,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
cell(endDv),
cell(waterMarkDictPane),
row(
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(RIGHT_WEIGHT)
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6)
)
).getComponent();
}
@ -78,17 +76,18 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){
Color tipColor = FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY);
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(tipColor, 1, 5),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample"), TitledBorder.LEADING, TitledBorder.TOP,
this.getFont(), tipColor);
previewPane.setBorder(titledBorder);
previewPane.add(sampleLabel, BorderLayout.CENTER);
return column(LayoutConstants.VERTICAL_GAP,
cell(previewPane),
cell(formatComboBox)
previewPane.setPreferredSize(formatComboBox.getPreferredSize());
previewPane.setBorder(new BorderUIResource.CompoundBorderUIResource(
new FineRoundBorder(),
new EmptyBorder(0, 8, 0, 0)
));
previewPane.add(sampleLabel, BorderLayout.WEST);
return column(LayoutConstants.VERTICAL_GAP, true,
cell(formatComboBox),
cell(previewPane).weight(1.0)
).getComponent();
}
@ -102,7 +101,8 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
};
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER);
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont());
sampleLabel.setFont(this.getFont());
sampleLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY));
return sampleLabel;
}
@ -140,7 +140,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
});
return column(LayoutConstants.VERTICAL_GAP,
row(
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(RIGHT_WEIGHT)
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6)
),
row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT))
).getComponent();
@ -153,9 +153,10 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text);
String sample = simpleDateFormat.format(new Date());
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text);
currentSampleLabel.setText(result.getSample());
currentSampleLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample") + ":" + result.getSample());
currentSampleLabel.setForeground(result.getColor());
} catch (Exception exp) {
currentSampleLabel.removeAll();
currentSampleLabel.setForeground(Color.red);
currentSampleLabel.setText(exp.getMessage());
}

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

@ -36,6 +36,7 @@ import com.fr.write.DMLConfigJob;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.table.DefaultTableCellRenderer;
@ -351,11 +352,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
*/
TableColumn column0 = table.getColumnModel().getColumn(0);
column0.setMaxWidth(LEFT_COLUMN_MAX_WIDTH);
ColumnNameTableCellRenderer cellRenderer = new ColumnNameTableCellRenderer();
cellRenderer.setHorizontalAlignment(SwingConstants.LEFT);
column0.setCellRenderer(cellRenderer);
/*
* 设置Column 1的Renderer
*/
TableColumn column1 = table.getColumnModel().getColumn(1);
column1.setCellRenderer(new ColumnNameTableCellRenderer());
column1.setCellRenderer(cellRenderer);
/*
* 设置Column 2的Renderer
@ -364,10 +368,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
// column2.setCellRenderer(new SelectedColumnValueTableCellRenderer());
if (isCellGroup) {
column2.setCellRenderer(new ColumnRowGroupCellRenderer2());
ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2();
cellRenderer2.setHorizontalAlignment(SwingConstants.LEFT);
column2.setCellRenderer(cellRenderer2);
column2.setCellEditor(new ColumnValueEditor(ValueEditorPaneFactory.cellGroupEditor()));
} else {
column2.setCellRenderer(new SelectedColumnValueTableCellRenderer());
SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer();
renderer.setHorizontalAlignment(SwingConstants.LEFT);
column2.setCellRenderer(renderer);
}
}

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

@ -33,6 +33,11 @@ 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;
import static com.fine.swing.ui.layout.Layouts.flex;
public class SubmitVisitorListPane extends ObjectJControlPane {
public SubmitVisitorListPane(ElementCasePane ePane) {
@ -186,12 +191,20 @@ 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,
flex(0.002),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")).weight(0.158),
cell(csjConfigComboBox).weight(0.84)).getComponent());
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(
cell(typePane),
cell(customCardPane).weight(1.0)).getComponent());
csjConfigComboBox.addItemListener(new ItemListener() {
@Override

13
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -7,6 +7,7 @@ import com.fr.base.OptimizeUtil;
import com.fr.base.passport.FinePassportListenerAdapter;
import com.fr.base.passport.FinePassportManager;
import com.fr.base.process.ProcessOperator;
import com.fr.base.svg.IconUtils;
import com.fr.base.theme.migrator.FormThemeConfigMigrator;
import com.fr.base.theme.migrator.ReportThemeConfigMigrator;
import com.fr.chart.chartattr.ChartCollection;
@ -341,12 +342,12 @@ public class DesignerActivator extends Activator implements Prepare {
private static NameableCreator[] hyperlinkTypes() {
return new NameableCreator[]{
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), MobilePopupHyperlink.class, MobilePopupPane.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ReportletHyperlink.class, ReportletHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Web_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_JavaScript_Dynamic_Parameters"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), MobilePopupHyperlink.class, MobilePopupPane.class),
};
}

Loading…
Cancel
Save