Browse Source

控件管理/报表填报属性/超级链接/服务器参数

newui
renekton 7 months ago
parent
commit
abec5c347c
  1. 11
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  2. 66
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  3. 3
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  4. 25
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  5. 22
      designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
  6. 2
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java
  7. 25
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  8. 79
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  9. 74
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  10. 20
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  11. 24
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  12. 17
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  13. 75
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  14. 20
      designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java
  15. 10
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupPane.java
  16. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  17. 24
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  18. 84
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  19. 51
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  20. 20
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  21. 21
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java
  22. 1
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  23. 6
      designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java
  24. 2
      designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java
  25. 6
      designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java
  26. 18
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  27. 37
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  28. BIN
      designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png
  29. BIN
      designer-base/src/main/resources/com/fr/design/images/data/user_widget.png
  30. 14
      designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg
  31. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png
  32. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png
  33. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png
  34. BIN
      designer-base/src/main/resources/com/fr/design/images/server/global_param.png
  35. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  36. 9
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  37. 7
      designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java
  38. 6
      designer-realize/src/main/java/com/fr/design/actions/server/WidgetManagerAction.java
  39. 8
      designer-realize/src/main/java/com/fr/design/cell/smartaction/SmartJTablePane.java
  40. 18
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  41. 34
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  42. 15
      designer-realize/src/main/java/com/fr/design/webattr/ReportWriteAttrPane.java
  43. 35
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  44. 7
      designer-realize/src/main/java/com/fr/design/widget/UserDefinedWidgetConfigPane.java
  45. 33
      designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java
  46. 8
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  47. 14
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  48. 39
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java
  49. 19
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  50. 6
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java
  51. 13
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

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.SVGIcon;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.actions.core.ActionFactory; 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.ibutton.UIButton;
import com.fr.design.gui.imenu.UICheckBoxMenuItem; import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem; 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"; 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. * Returns true if the action is enabled.
* *

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

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

25
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 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 * @author kunsnat E-mail:kunsnat@gmail.com
@ -24,19 +27,17 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":"));
pane.add(colPane);
initColSpinner(); initColSpinner();
colPane.add(columnSpinner);
UILabel rowLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row"));
JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
pane.add(rowPane);
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
initRowSpinner(); 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); this.addDocumentListener(d);
} }

22
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.ArrayUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import javax.swing.JPanel;
import javax.swing.event.TableModelListener; import javax.swing.event.TableModelListener;
import java.awt.*; import java.awt.*;
import java.util.List; import java.util.List;
@ -41,15 +42,21 @@ public class ReportletParameterViewPane extends BasicPane {
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) { public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) {
this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType),
ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType)); ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), null);
} }
public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) { 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) { public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane,
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane); 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 +65,8 @@ public class ReportletParameterViewPane extends BasicPane {
* @param actions Chart的热点链接actions * @param actions Chart的热点链接actions
* @param useParaType 类型 * @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()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
if (useParaType != ParameterTableModel.NO_CHART_USE) { if (useParaType != ParameterTableModel.NO_CHART_USE) {
@ -70,14 +78,14 @@ public class ReportletParameterViewPane extends BasicPane {
return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions); return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions);
} }
}; };
editorPane = new UITableEditorPane<ParameterProvider>(model); editorPane = new UITableEditorPane<ParameterProvider>(model, otherPanel);
} else { } else {
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel() { editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel() {
@Override @Override
public UITableEditAction[] createAction() { public UITableEditAction[] createAction() {
return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions); return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions);
} }
}); }, otherPanel);
} }
this.add(editorPane, BorderLayout.CENTER); 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) { public ParameterValueRenderer(ValueEditorPane valueEditorPane) {
disableLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Paramete_Name")); disableLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Paramete_Name"));
disableLable.setForeground(Color.pink); disableLable.setForeground(Color.pink);
disableLable.setHorizontalAlignment(SwingConstants.CENTER); disableLable.setHorizontalAlignment(SwingConstants.LEFT);
editor = valueEditorPane; editor = valueEditorPane;
} }

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

@ -6,10 +6,11 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.JPanel; import javax.swing.*;
import javax.swing.JTable;
import javax.swing.event.TableModelListener; import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.Insets; import java.awt.Insets;
@ -37,6 +38,11 @@ public class UITableEditorPane<T> extends BasicPane {
this.initComponent(model.createAction()); this.initComponent(model.createAction());
} }
public UITableEditorPane(UITableModelAdapter<T> model, JPanel panel) {
this.tableModel = model;
this.initComponent(model.createAction(), panel);
}
public UITableEditorPane(UITableModelAdapter<T> model, String s) { public UITableEditorPane(UITableModelAdapter<T> model, String s) {
leftLabelName = s; leftLabelName = s;
this.tableModel = model; this.tableModel = model;
@ -44,20 +50,29 @@ public class UITableEditorPane<T> extends BasicPane {
} }
protected void initComponent(UITableEditAction[] action) { protected void initComponent(UITableEditAction[] action) {
this.initComponent(action, null);
}
protected void initComponent(UITableEditAction[] action, JPanel content) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = new JPanel(new BorderLayout(4, 4)); JPanel pane = new JPanel(new BorderLayout(4, 4));
this.add(pane, BorderLayout.CENTER); this.add(pane, BorderLayout.CENTER);
UILabel l = new UILabel(leftLabelName); UILabel l = new UILabel(leftLabelName);
editTable = tableModel.createTable(); editTable = tableModel.createTable();
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
editTable.getTableHeader().setDefaultRenderer(headerRenderer);
UIScrollPane scrollPane = new UIScrollPane(editTable); UIScrollPane scrollPane = new UIScrollPane(editTable);
scrollPane.setBorder(new FineRoundBorder()); scrollPane.setBorder(new FineRoundBorder());
pane.add(scrollPane, BorderLayout.CENTER); pane.add(scrollPane, BorderLayout.CENTER);
initbuttonPane(action); initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST); controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(l, BorderLayout.WEST);
controlPane.add(content == null ? l : content, BorderLayout.WEST);
pane.add(controlPane, BorderLayout.NORTH); pane.add(controlPane, BorderLayout.NORTH);
} }
@ -70,7 +85,7 @@ public class UITableEditorPane<T> extends BasicPane {
buttonPane = new JPanel(); buttonPane = new JPanel();
if (action != null) { if (action != null) {
buttonPane.setLayout(new GridLayout(1, action.length, 3, 3)); buttonPane.setLayout(new GridLayout(1, action.length, 6, 3));
for (int i = 0; i < action.length; i++) { for (int i = 0; i < action.length; i++) {
final UIButton newButton = new UIButton(action[i]); final UIButton newButton = new UIButton(action[i]);
newButton.set4ToolbarButton(); newButton.set4ToolbarButton();

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.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; 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.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.js.Hyperlink; import com.fr.js.Hyperlink;
@ -17,6 +18,12 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; 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 abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0; public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1; 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() { public AbstractHyperNorthPane() {
@ -46,8 +53,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = this.setHeaderPanel(); JPanel headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames()); targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() { targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 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; return this;
} }
}); });
JPanel targetFramePanel = new JPanel(); UILabel targetFrameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In"));
targetFramePanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")));
targetFramePanel.add(targetFrameComboBox);
targetFrameComboBox.setEditable(true); targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel(new BorderLayout());
final JPanel newWindowConfPane = new JPanel(); UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height"));
newWindowConfPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ": ")); heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
heightTextFiled = new UINumberField(); UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE)); widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
heightTextFiled.setPreferredSize(new Dimension(40, 20)); newWindowConfPane.add(column(10,
newWindowConfPane.add(heightTextFiled); row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)),
newWindowConfPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ": ")); row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87))
widthTextFiled = new UINumberField(); ).getComponent());
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
JPanel centerPanel = new JPanel(new BorderLayout()); 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); newWindowConfPane.setVisible(false);
centerPane.add(centerPanel); centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() { targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()));
@Override
public void actionPerformed(ActionEvent 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() { protected String[] getTargetFrames() {
@ -107,19 +112,19 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.targetFrameComboBox = targetFrameComboBox; this.targetFrameComboBox = targetFrameComboBox;
} }
public UINumberField getHeightTextFiled() { public UISpinner getHeightTextFiled() {
return heightTextFiled; return heightTextFiled;
} }
public void setHeightTextFiled(UINumberField heightTextFiled) { public void setHeightTextFiled(UISpinner heightTextFiled) {
this.heightTextFiled = heightTextFiled; this.heightTextFiled = heightTextFiled;
} }
public UINumberField getWidthTextFiled() { public UISpinner getWidthTextFiled() {
return widthTextFiled; return widthTextFiled;
} }
public void setWidthTextFiled(UINumberField widthTextFiled) { public void setWidthTextFiled(UISpinner widthTextFiled) {
this.widthTextFiled = widthTextFiled; this.widthTextFiled = widthTextFiled;
} }
@ -127,8 +132,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void populateBean(T link) { public void populateBean(T link) {
String name = link.getTargetFrame(); String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name)); targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight())); heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight());
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth())); widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth());
populateSubHyperlinkBean(link); populateSubHyperlinkBean(link);
} }
@ -148,8 +153,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void updateBean(T link) { public void updateBean(T link) {
updateSubHyperlinkBean(link); updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName()); link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue()); link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), 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.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; 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.UINumberField;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane; import com.fr.design.gui.itree.filetree.ReportletPane;
@ -39,6 +40,10 @@ import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; 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(); JPanel reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框 // 路径输入框
reportPathTextField = new UITextField(20); reportPathTextField = new UITextField(20);
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER);
// 选择路径按钮 // 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select")); browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20)); browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST);
browserButton.addActionListener(new ActionListener() { browserButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -165,6 +169,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
reportletDialog.setVisible(true); reportletDialog.setVisible(true);
} }
}); });
reportletNamePane.add(row(10,
cell(reportPathTextField).weight(0.85),
cell(browserButton).weight(0.15)
).getComponent());
return reportletNamePane; return reportletNamePane;
} }
@ -274,19 +283,19 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
*/ */
@Override @Override
protected JPanel setFootPanel() { 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 = new UIComboBox(new String[]{"GET", "POST"});
postComboBox.setPreferredSize(new Dimension(60, 20));
postComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); postComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
content.add(postComboBox);
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display")); showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); 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; return content;
} }
@ -324,7 +333,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 是否有重命名属性 // 是否有重命名属性
if (this.needRenamePane) { if (this.needRenamePane) {
itemNameTextField = new UITextField(); 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); dialogComponents.add(renameComponents);
othersComponents.add(renameComponents); othersComponents.add(renameComponents);
} }
@ -333,7 +342,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
private void initHeaderPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) { private void initHeaderPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) {
//最上方位置的面板 //最上方位置的面板
JPanel headerPane = this.setHeaderPanel(); 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); dialogComponents.add(headerComponents);
othersComponents.add(headerComponents); othersComponents.add(headerComponents);
} }
@ -343,10 +352,9 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
UIComboBox targetFrameComboBox = new UIComboBox(getTargetFrames()); UIComboBox targetFrameComboBox = new UIComboBox(getTargetFrames());
this.setTargetFrameComboBox(targetFrameComboBox); this.setTargetFrameComboBox(targetFrameComboBox);
targetFrameComboBox.setEditable(false); targetFrameComboBox.setEditable(false);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20)); JPanel targetFramePanel = new JPanel(new BorderLayout());
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
targetFramePanel.add(targetFrameComboBox); 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); dialogComponents.add(targetComponents);
othersComponents.add(targetComponents); othersComponents.add(targetComponents);
} }
@ -355,36 +363,26 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 对话框标题 // 对话框标题
titleFiled = new TinyFormulaPane(); titleFiled = new TinyFormulaPane();
titleFiled.getUITextField().setColumns(15); 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); 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); dialogComponents.add(titleComponents);
} }
private void initDialogSizePanel(List<Component[]> dialogComponents) {// 对话框大小 private void initDialogSizePanel(List<Component[]> dialogComponents) {// 对话框大小
final JPanel sizeJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); final JPanel sizeJPanel = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height") + ":"); UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height"));
heightLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
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);
this.setHeightTextFiled(heightTextFiled); this.setHeightTextFiled(heightTextFiled);
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":"); UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
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);
this.setWidthTextFiled(widthTextFiled); this.setWidthTextFiled(widthTextFiled);
sizeJPanel.add(column(8,
row(10, cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)),
row(10, cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8))
).getComponent());
sizeJPanel.setVisible(true); sizeJPanel.setVisible(true);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size") + ":"), sizeJPanel}); dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizeJPanel});
} }
private void initDialogLocationPanel(List<Component[]> dialogComponents) { private void initDialogLocationPanel(List<Component[]> dialogComponents) {
@ -408,13 +406,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10)); leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10));
leftLocation = new UINumberField(); leftLocation = new UINumberField();
leftLocation.setMinValue(0); leftLocation.setMinValue(0);
leftLocation.setPreferredSize(new Dimension(40, 20)); leftLocation.setPreferredSize(new Dimension(60, 20));
// 位置 距上 // 位置 距上
final UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Top")); final UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Top"));
topLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); topLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
topLocation = new UINumberField(); topLocation = new UINumberField();
topLocation.setMinValue(0); topLocation.setMinValue(0);
topLocation.setPreferredSize(new Dimension(40, 20)); topLocation.setPreferredSize(new Dimension(60, 20));
locationPanel.add(leftLabel); locationPanel.add(leftLabel);
locationPanel.add(leftLocation); locationPanel.add(leftLocation);
@ -439,13 +437,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
center.addChangeListener(actionListener); center.addChangeListener(actionListener);
custom.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) { 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); dialogComponents.add(footerComponents);
othersComponents.add(footerComponents); othersComponents.add(footerComponents);
} }

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

@ -1,10 +1,12 @@
package com.fr.design.hyperlink; package com.fr.design.hyperlink;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.gui.itableeditorpane.UITableEditAction; import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -16,13 +18,14 @@ import com.fr.js.ReportletHyperlink;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JOptionPane; import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; 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> { public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyperlink> {
/** /**
* 超链配置面板 * 超链配置面板
@ -47,7 +50,6 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane = new ReportletHyperNorthPane(needRenamePane()); northPane = new ReportletHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane( parameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{ new UITableEditAction[]{
@ -58,12 +60,16 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
getValueEditorPane() getValueEditorPane()
); );
this.add(parameterViewPane, BorderLayout.CENTER);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null)); parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH); UIScrollPane scrollPane = new UIScrollPane(extendParametersCheckBox);
scrollPane.setBorder(new FineRoundBorder());
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0),
cell(scrollPane)
).getComponent());
} }
@Override @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.config.ServerPreferenceConfig;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -13,7 +14,10 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; 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 特征的 界面 * chart 网页链接 定义属性 target url 特征的 界面
@ -45,20 +49,26 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
@Override @Override
protected JPanel setHeaderPanel() { 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); 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) { if (this.needRenamePane) {
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL));
itemNameTextField = new UITextField(); 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); headerPane.add(urlWithHelp, BorderLayout.CENTER);
} else { } else {
headerPane.add(urlWithHelp, BorderLayout.NORTH); headerPane.add(urlWithHelp);
} }
return headerPane; return headerPane;

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

@ -1,8 +1,10 @@
package com.fr.design.hyperlink; package com.fr.design.hyperlink;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -17,6 +19,10 @@ import java.awt.FlowLayout;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; 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 WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> { public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private static final int BORDER_WIDTH = 4; private static final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane; private WebHyperNorthPane northPane;
@ -38,14 +44,19 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane()); northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH); //this.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
this.add(parameterViewPane, BorderLayout.CENTER); //this.add(parameterViewPane, BorderLayout.CENTER);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null)); parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); 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(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0),
cell(extendParametersCheckBox)
).getComponent());
} }
@Override @Override

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup; package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Parameter; 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.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox; 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.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane; import com.fr.design.gui.itree.filetree.ReportletPane;
@ -31,6 +33,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.List; 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> { public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperlink> {
private JPanel popupTargetPane; private JPanel popupTargetPane;
private UIRadioButton templatePopupButton; private UIRadioButton templatePopupButton;
@ -47,7 +53,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
public ContentSettingPane() { public ContentSettingPane() {
super(); super();
this.initCompoennt(); this.initComponent();
} }
public void addTargetRadioActionListener(ActionListener listener) { public void addTargetRadioActionListener(ActionListener listener) {
@ -64,10 +70,8 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
} }
private void initCompoennt() { private void initComponent() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); this.setLayout(new BorderLayout(10, 10));
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content")));
popupTargetPane = this.createPopupTargetPane(); popupTargetPane = this.createPopupTargetPane();
this.add(popupTargetPane, BorderLayout.NORTH); this.add(popupTargetPane, BorderLayout.NORTH);
@ -87,10 +91,17 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
popupTargetButtons.add(textPopupButton); popupTargetButtons.add(textPopupButton);
JPanel popupButtonsPanel = new JPanel(); JPanel popupButtonsPanel = new JPanel();
popupButtonsPanel.setLayout( new FlowLayout(FlowLayout.LEFT, 10, 0)); popupButtonsPanel.setLayout(new BorderLayout());
popupButtonsPanel.add(templatePopupButton); popupButtonsPanel.add(templatePopupButton);
popupButtonsPanel.add(textPopupButton); 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() { private ActionListener radioActionListener = new ActionListener() {
@ -111,15 +122,15 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
private JPanel createTemplateContentPane() { private JPanel createTemplateContentPane() {
JPanel templateContentPane = new JPanel(); JPanel templateContentPane = new JPanel();
templateContentPane.setLayout(new BorderLayout(0,8)); 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")); 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; return templateContentPane;
} }
@ -127,12 +138,12 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
JPanel templatePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel templatePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框 // 路径输入框
templatePathTextField = new UITextField(20); templatePathTextField = new UITextField(20);
templatePanel.add(templatePathTextField, BorderLayout.CENTER); //templatePanel.add(templatePathTextField, BorderLayout.CENTER);
// 选择路径按钮 // 选择路径按钮
UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select")); UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select"));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20)); templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20));
templatePanel.add(templateSelectButton, BorderLayout.EAST); //templatePanel.add(templateSelectButton, BorderLayout.EAST);
templateSelectButton.addActionListener(new ActionListener() { templateSelectButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -149,19 +160,26 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
reportletDialog.setVisible(true); 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( ReportletParameterViewPane templateParameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{ new UITableEditAction[]{
new HyperlinkParametersAction() new HyperlinkParametersAction()
}, },
getChartParaType(), getChartParaType(),
getValueEditorPane(), getValueEditorPane(),
getValueEditorPane() getValueEditorPane(),
extendPane
); );
templateParameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Parameter"), null));
templateParameterViewPane.setPreferredSize(new Dimension(this.getWidth(), 200)); templateParameterViewPane.setPreferredSize(new Dimension(this.getWidth(), 200));
return templateParameterViewPane; return templateParameterViewPane;
} }
@ -172,15 +190,16 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
textContentPane = new TinyFormulaPane(); textContentPane = new TinyFormulaPane();
textContentPane.getUITextField().setColumns(20); textContentPane.getUITextField().setColumns(20);
textSettingPanel.add(
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"), textContentPane),
BorderLayout.CENTER);
fontPane = new CustomFontPane(); fontPane = new CustomFontPane();
textSettingPanel.add( textSettingPanel.add(column(10,
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"), fontPane), row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
BorderLayout.SOUTH); cell(textContentPane)),
return MobilePopupUIUtils.createTitleSplitLineContentPane("", textSettingPanel); row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
cell(fontPane))
).getComponent());
return textSettingPanel;
} }
private String getReportletName() { 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.awt.*;
import java.util.Vector; 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 { public class CustomFontPane extends JPanel {
private static final int MAX_FONT_SIZE = 100; private static final int MAX_FONT_SIZE = 100;
private static final Dimension BUTTON_SIZE = new Dimension(20, 18); private static final Dimension BUTTON_SIZE = new Dimension(20, 18);
@ -43,19 +46,22 @@ public class CustomFontPane extends JPanel {
fontSizeComboBox.setEditable(true); fontSizeComboBox.setEditable(true);
colorSelectPane = new UIColorButton(); colorSelectPane = new UIColorButton();
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_italic.png"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png")); underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/new_underline.png"));
this.setButtonsTips(); this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE); this.setButtonsSize(BUTTON_SIZE);
Component[] components_font = new Component[]{
fontSizeComboBox, colorSelectPane, bold, underline, italic
};
JPanel buttonPane = new JPanel(new BorderLayout()); 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.setLayout(new BorderLayout(0,0));
this.add(buttonPane, BorderLayout.CENTER); 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; package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -10,6 +11,9 @@ import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; 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> { public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink> {
private ContentSettingPane contentSettingPane; private ContentSettingPane contentSettingPane;
private StyleSettingPane styleSettingPane; private StyleSettingPane styleSettingPane;
@ -26,9 +30,11 @@ public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink>
JPanel scrollContent = new JPanel(); JPanel scrollContent = new JPanel();
scrollContent.setLayout(new BorderLayout(10, 10)); scrollContent.setLayout(new BorderLayout(10, 10));
contentSettingPane = new ContentSettingPane(); contentSettingPane = new ContentSettingPane();
scrollContent.add(contentSettingPane, BorderLayout.NORTH);
styleSettingPane = new StyleSettingPane(); 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); 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(customRadio);
radiosPane.add(autoRadio); radiosPane.add(autoRadio);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane); return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY);
} }
private ActionListener radioActionListener = new ActionListener() { private ActionListener radioActionListener = new ActionListener() {

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

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

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

@ -16,6 +16,11 @@ import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; 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> { public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
private double maxNumber = 100; private double maxNumber = 100;
private double maxBorderRadius = 24; private double maxBorderRadius = 24;
@ -40,65 +45,81 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
} }
private void initComponent() { private void initComponent() {
this.setLayout(new BorderLayout(0, 10)); this.setLayout(new BorderLayout());
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style")));
typePane = this.createTypePane(); typePane = this.createTypePane();
this.add(typePane, BorderLayout.NORTH);
stylePane = this.createStylePane(); stylePane = this.createStylePane();
this.add(stylePane, BorderLayout.CENTER); this.add(column(10,
cell(typePane),
cell(stylePane)
).getComponent());
} }
private JPanel createTypePane() { private JPanel createTypePane() {
JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
popupTypeLabel = new UILabel(""); popupTypeLabel = new UILabel("");
typePane.add(popupTypeLabel, BorderLayout.CENTER); UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"));
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane); typePane.add(row(40,
cell(typeLabel),
cell(popupTypeLabel)
).getComponent());
return typePane;
} }
private JPanel createStylePane() { private JPanel createStylePane() {
JPanel stylePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel stylePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
stylePane.add(this.createBorderSettingPane(), BorderLayout.NORTH); stylePane.add(column(10,
stylePane.add(this.createBackgroundSettingPane(), BorderLayout.CENTER); cell(this.createBorderSettingPane()),
stylePane.add(this.createPopupSizePane(), BorderLayout.SOUTH); cell(this.createBackgroundSettingPane()),
cell(this.createPopupSizePane())
).getComponent());
return stylePane; return stylePane;
} }
private JPanel createBorderSettingPane() { private JPanel createBorderSettingPane() {
JPanel borderPane = new JPanel(); JPanel borderPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10); borderPane.setLayout(new BorderLayout());
layout.setAlignLeft(true);
borderPane.setLayout(layout);
borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY); borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY);
borderType.setPreferredSize(new Dimension(115, 20)); borderType.setPreferredSize(new Dimension(115, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType));
borderColor = new NewColorSelectBox(100); 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 = new UISpinner(0, maxBorderRadius, 1, 20);
borderRadiusSpinner.setPreferredSize(new Dimension(120, 20)); borderRadiusSpinner.setPreferredSize(new Dimension(120, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner)); JLabel label = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"), borderPane); borderPane.add(row(40,
column(10,
cell(label).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() { private JPanel createBackgroundSettingPane() {
JPanel bgPane = new JPanel(); JPanel bgPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10); bgPane.setLayout(new BorderLayout());
layout.setAlignLeft(true);
bgPane.setLayout(layout);
JPanel colorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,0));
bgColor = new NewColorSelectBox(100); 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(); JPanel transparencyPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.numberDragPane = new UINumberDragPane(0,100); this.numberDragPane = new UINumberDragPane(0,100);
this.numberDragPane.setPreferredSize(new Dimension(140, 20)); this.numberDragPane.setPreferredSize(new Dimension(140, 20));
transparencyPane.add(numberDragPane, BorderLayout.CENTER); transparencyPane.add(numberDragPane, BorderLayout.CENTER);
transparencyPane.add(new UILabel(" %"), BorderLayout.EAST); transparencyPane.add(new UILabel(" %"), BorderLayout.EAST);
bgPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane)); JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"), bgPane); 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() { private JPanel createPopupSizePane() {
@ -107,10 +128,17 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
mobileRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Mobile_Rules")); mobileRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Mobile_Rules"));
padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules")); padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules"));
sizePane.add(mobileRegularPane, BorderLayout.NORTH); JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"));
sizePane.add(padRegularPane, BorderLayout.CENTER); sizePane.add(row(14,
column(10,
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"), sizePane); cell(sizeLabel).weight(0.16),
flex().weight(0.84)),
column(10,
cell(mobileRegularPane),
cell(padRegularPane)
)
).getComponent());
return sizePane;
} }
@Override @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.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.js.EmailJavaScript; import com.fr.js.EmailJavaScript;
import com.fr.stable.StringUtils; 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 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> { public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
@ -37,12 +48,12 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10)); this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));
tipsPane1 = new UILabel(); tipsPane1 = new UILabel();
tipsPane1.setHorizontalAlignment(SwingConstants.RIGHT); tipsPane1.setHorizontalAlignment(SwingConstants.LEFT);
tipsPane1.setForeground(Color.pink); tipsPane1.setForeground(Color.gray);
tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips")); 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") + ":"); UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content"));
mainTextLabel.setHorizontalAlignment(SwingConstants.RIGHT); mainTextLabel.setHorizontalAlignment(SwingConstants.LEFT);
mainTextLabel.setVerticalAlignment(SwingConstants.TOP); mainTextLabel.setVerticalAlignment(SwingConstants.TOP);
JScrollPane scrollPane = new JScrollPane(mainTextEditor = new JTextArea()); JScrollPane scrollPane = new JScrollPane(mainTextEditor = new JTextArea());
scrollPane.setBorder(null); 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[] rowSize = { preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred, preferred };
double[] columnSize = { preferred, fill}; double[] columnSize = { preferred, fill};
showTplContent = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email_Can_Preview_Report_Content")); 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}, centerPane = new JPanel(new BorderLayout());
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"), maitoEditor = new UITextField()), centerPane.add(column(10,
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"), ccEditor = new UITextField()), row(cell(tipsPane1), cell(new UILabel())),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"), bccEditor = new UITextField()), 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)),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"), titleEditor = new UITextField()), 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)),
{mainTextLabel, scrollPane}, 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)),
{new UILabel(), showTplContent}, 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)),
{new UILabel(), tipsPane2}},rowSize, columnSize, 8); 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) { protected JComponent[] createLinePane(String string, JTextComponent textComp) {
UILabel label = new UILabel(string + ":"); UILabel label = new UILabel(string);
label.setPreferredSize(new Dimension(70, label.getPreferredSize().height)); label.setHorizontalAlignment(SwingConstants.LEFT);
label.setHorizontalAlignment(SwingConstants.RIGHT);
return new JComponent[] { label, textComp }; 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.general.IOUtils;
import com.fr.js.JavaScriptImpl; import com.fr.js.JavaScriptImpl;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
@ -40,6 +41,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; 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 { public class JSContentPane extends BasicPane {
protected RSyntaxTextArea contentTextArea; protected RSyntaxTextArea contentTextArea;
private UILabel funNameLabel = new UILabel(); 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 static final Dimension FUNCTION_NAME_LABEL_SIZE = new Dimension(300, 80);
private String[] defaultArgs; private String[] defaultArgs;
private int titleWidth = 180; private int titleWidth = 180;
private JPanel labelPane = new JPanel(new BorderLayout(6, 4));; private JPanel labelPane = new JPanel();
private NewJavaScriptImplPane newJavaScriptImplPane = null; private NewJavaScriptImplPane newJavaScriptImplPane = null;
private JavaScriptImpl javaScript; private JavaScriptImpl javaScript;
private JSImplUpdateAction jsImplUpdateAction; private JSImplUpdateAction jsImplUpdateAction;
@ -97,7 +101,6 @@ public class JSContentPane extends BasicPane {
private void addNewPaneLabel(){ private void addNewPaneLabel(){
UILabel advancedEditorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Advanced_Editor"), IconUtils.readIcon("com/fr/design/images/edit/advancedEditor.svg"), SwingConstants.LEFT); 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.setCursor(new Cursor(Cursor.HAND_CURSOR));
advancedEditorLabel.addMouseListener(new MouseAdapter() { advancedEditorLabel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
@ -183,15 +186,16 @@ public class JSContentPane extends BasicPane {
}.execute(); }.execute();
} }
}); });
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
labelPane.add(label,BorderLayout.CENTER); labelPane.add(label,BorderLayout.CENTER);
JPanel jsParaPane = new JPanel(new BorderLayout(4, 4)); JPanel jsParaPane = new JPanel(new BorderLayout());
jsParaPane.setPreferredSize(new Dimension(300, 80));
UIScrollPane scrollPane = new UIScrollPane(funNameLabel); UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setPreferredSize(FUNCTION_NAME_LABEL_SIZE);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC)); scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(scrollPane, BorderLayout.WEST); jsParaPane.add(row(10,
jsParaPane.add(labelPane, BorderLayout.EAST); cell(scrollPane).weight(0.6),
cell(labelPane).weight(0.4)
).getComponent());
return jsParaPane; 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.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.GridBagConstraints; import java.awt.GridBagConstraints;
import java.awt.GridLayout;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; 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> { public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
private static final int BOTTOM_BORDER = 12; private static final int BOTTOM_BORDER = 12;
private UITextField itemNameTextField; private UITextField itemNameTextField;
@ -64,21 +67,23 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
protected void initComponents() { protected void initComponents() {
parameterPane = createParameterViewPane(); parameterPane = createParameterViewPane();
importedJsPane = createImportedJsPane(); importedJsPane = createImportedJsPane();
importedJsPane.setPreferredSize(new Dimension(265, 150));
jsPane = createJSContentPane(defaultArgs); jsPane = createJSContentPane(defaultArgs);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))); 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 BorderLayout());
JPanel topPane = new JPanel(new GridLayout(1,2)); topPane.add(row(10,
topPane.add(importedJsPane); cell(importedJsPane).weight(0.5),
topPane.add(parameterPane); cell(parameterPane).weight(0.5)
).getComponent());
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0)); topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(topPane, BorderLayout.NORTH); this.add(column(10,
this.add(jsPane, BorderLayout.CENTER); cell(topPane).weight(0.5),
cell(jsPane).weight(0.5)
).getComponent());
this.reLayoutForChart(); this.reLayoutForChart();
} }

1
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -890,6 +890,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyPanel = new JPanel(); propertyPanel = new JPanel();
contentPane = generateContentPane(); contentPane = generateContentPane();
popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON);
popupToolPane.setPreferredSize(new Dimension(0, 34));
headerPane = new JPanel(); headerPane = new JPanel();
headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏 headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏
contentArea = new JPanel(new BorderLayout()); contentArea = new JPanel(new BorderLayout());

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.Parameter;
import com.fr.base.ParameterConfig; import com.fr.base.ParameterConfig;
import com.fr.base.svg.IconUtils;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.NameableSelfCreator; import com.fr.design.gui.controlpane.NameableSelfCreator;
@ -57,7 +58,10 @@ public class ParameterArrayPane extends JListControlPane {
*/ */
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{ 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) { public Parameter createNameable(UnrepeatedNameHelper helper) {
// 返回参数设置面板. // 返回参数设置面板.
return new Parameter(helper.createUnrepeatedName(DEFAULT_PARAMETER_NAME_PREFIX)); 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( this.add(
row( 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) 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.allowNegativeCheckBox.addActionListener(allowNegativeListener);
this.setMaxValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Max_Value"), false); 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 = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.maxValueSpinner.setSize(this.decimalLength.getSize());
this.setMaxValueCheckBox.addActionListener(setMaxListener); this.setMaxValueCheckBox.addActionListener(setMaxListener);
this.maxValueSpinner.addChangeListener(maxValueChangeListener); this.maxValueSpinner.addChangeListener(maxValueChangeListener);
this.setMinValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Min_Value"), false); 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 = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.minValueSpinner.setSize(this.decimalLength.getSize());
this.setMinValueCheckBox.addActionListener(setMinListener); this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener); this.minValueSpinner.addChangeListener(minValueChangeListener);
initErrorMsgPane(); initErrorMsgPane();
@ -91,10 +93,10 @@ public class NumberEditorValidatePane extends JPanel {
cell(limitNumberPane), cell(limitNumberPane),
cell(allowNegativeCheckBox), cell(allowNegativeCheckBox),
row( row(
cell(setMaxValueCheckBox).weight(1), cell(maxValueSpinner).weight(1.5) cell(setMaxValueCheckBox).weight(1.2), cell(maxValueSpinner).weight(3)
), ),
row( row(
cell(setMinValueCheckBox).weight(1), cell(minValueSpinner).weight(1.5) cell(setMinValueCheckBox).weight(1.2), cell(minValueSpinner).weight(3)
), ),
cell(errorMsgBorderPane) cell(errorMsgBorderPane)
).getComponent()); ).getComponent());

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

@ -1,5 +1,6 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob; import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -34,22 +35,22 @@ import static com.fine.swing.ui.layout.Layouts.row;
public abstract class CustomJobPane extends BasicBeanPane { public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField; protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane; protected ObjectProperiesPane objectProperiesPane;
private static final int DEFAULT_LENGTH = 25; private static final int DEFAULT_LENGTH = 33;
public CustomJobPane() { public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField()); classNameTextField = new UITextField();
//reportletNamePane.add(classNameTextField); //reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension( 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)); classNameTextField.getPreferredSize().height));
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension( 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)); classNameTextField.getPreferredSize().height));
/*reportletNamePane.add(browserButton); /*reportletNamePane.add(browserButton);
@ -94,10 +95,11 @@ public abstract class CustomJobPane extends BasicBeanPane {
}); });
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null)); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null));
reportletNamePane.setLayout(new BorderLayout());
reportletNamePane.add(row(10, reportletNamePane.add(row(10,
cell(classNameTextField).weight(1.0), cell(classNameTextField).weight(0.8),
cell(browserButton), cell(browserButton).weight(0.1),
cell(editButton) cell(editButton).weight(0.1)
).getComponent()); ).getComponent());
//this.add(reportletNamePane, BorderLayout.NORTH); //this.add(reportletNamePane, BorderLayout.NORTH);
@ -120,7 +122,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
} }
public int getLengthOfTextField() { public int getLengthOfTextField() {
return DEFAULT_LENGTH; return FineUIScale.scale(DEFAULT_LENGTH);
} }
protected String title4PopupWindow() { protected String title4PopupWindow() {

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

@ -5,7 +5,6 @@ import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.cert.token.lang.Collections;
import com.fr.data.DataConstants; import com.fr.data.DataConstants;
import com.fr.data.condition.JoinCondition; import com.fr.data.condition.JoinCondition;
import com.fr.data.condition.ListCondition; import com.fr.data.condition.ListCondition;
@ -34,8 +33,6 @@ import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.javascript.JavaScriptActionPane; import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.FRLeftFlowLayout;
import com.fr.design.layout.LeftCenterRightLayout;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -53,6 +50,7 @@ import com.fr.write.config.DeleteConfig;
import com.fr.write.config.InsertConfig; import com.fr.write.config.InsertConfig;
import com.fr.write.config.IntelliDMLConfig; import com.fr.write.config.IntelliDMLConfig;
import com.fr.write.config.UpdateConfig; import com.fr.write.config.UpdateConfig;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.AbstractCellEditor; import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -66,6 +64,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTable; import javax.swing.JTable;
import javax.swing.JTree; import javax.swing.JTree;
import javax.swing.ListSelectionModel; import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableCellRenderer;
@ -152,27 +151,20 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
this.v_Types = v_Types; this.v_Types = v_Types;
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//this.add(northPane, BorderLayout.NORTH);
dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES); 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()); JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10, typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(dmlConfigComboBox)).getComponent(), BorderLayout.WEST); cell(dmlConfigComboBox)).getComponent());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))); 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 = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))); chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")));
chooseTable.setTableNameComboBoxPopSize(160, 320); chooseTable.setTableNameComboBoxPopSize(160, 320);
//northPane.add(chooseTable, BorderLayout.CENTER);
// peter:编辑的TablePane // peter:编辑的TablePane
JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//this.add(editTablePane, BorderLayout.CENTER);
editTablePane.setBorder(BorderFactory.createTitledBorder(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)); editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable(); keyColumnValuesTable = new KeyColumnNameValueTable();
@ -180,6 +172,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150)); keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150));
keyColumnValuesTable.setShowHorizontalLines(true); keyColumnValuesTable.setShowHorizontalLines(true);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true, northPane.add(column(10, true,
cell(typePane), cell(typePane),
@ -215,15 +210,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new BorderLayout()); JPanel controlBtnPane = new JPanel(new BorderLayout());
editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST); 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()); 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 = new JPanel(new BorderLayout(0, 0));
checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20)); checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20));
//buttonGroup.add(cell(checkBoxUpdatePane));
//controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
//controlBtnPane.add(checkBoxUpdatePane);
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified")); UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON); UIButton helpButton = new UIButton(HEIP_ICON);
@ -239,12 +228,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
} }
}); });
helpButton.set4ToolbarButton(); helpButton.set4ToolbarButton();
//checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
//checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
buttonGroup.add(row(5, cell(UpdateCheckBox), buttonGroup.add(row(5, cell(UpdateCheckBox),
cell(helpButton))); cell(helpButton)));
//checkBoxUpdatePane.add(row(5, cell(UpdateCheckBox),
// cell(helpButton)).getComponent());
controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent()); controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
} }
} }
@ -323,7 +308,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND); cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree); JScrollPane jp = new JScrollPane(conditionsTree);
addComponent(conditionPane, jp);
UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition")); UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"));
addSubmitConditionButton.addActionListener(new ActionListener() { addSubmitConditionButton.addActionListener(new ActionListener() {
@ -355,8 +339,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4)); JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
conditionPane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), setControlBtnPanePosition());
controlBtnPane.add(addSubmitConditionButton); 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; return conditionPane;
} }
@ -698,6 +685,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private void initJTableColumn() { private void initJTableColumn() {
TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0); TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0);
column0.setMaxWidth(50); column0.setMaxWidth(50);
column0.setCellRenderer(new ColumnNameTableCellRenderer());
TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1); TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1);
column1.setCellRenderer(new ColumnNameTableCellRenderer()); column1.setCellRenderer(new ColumnNameTableCellRenderer());
@ -1187,7 +1175,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnName) { if (value instanceof ColumnName) {
this.setText(((ColumnName) value).name); this.setText(((ColumnName) value).name);
} }
@ -1203,6 +1191,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnValue) { if (value instanceof ColumnValue) {
if (((ColumnValue) value).obj != null) { 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

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

14
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="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"> <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"/>
<title>高级编辑</title> <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"/>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> </svg>
<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>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 536 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

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.HashMap;
import java.util.List; 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 * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2011-12-28 下午02:51:10 * @version 创建时间2011-12-28 下午02:51:10
@ -46,7 +49,6 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
} }
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); 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"))); 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 = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))); parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200)); this.add(column(
this.add(parameterViewPane, BorderLayout.SOUTH); cell(centerPane).weight(0.2),
cell(parameterViewPane).weight(0.8)
).getComponent());
} }
protected void addPaneInCenter(JPanel centerPane) { 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; package com.fr.design.module;
import com.fr.base.svg.IconUtils;
import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.chart.web.ChartHyperRelateFloatLink;
@ -41,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = { 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_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); 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; package com.fr.design.module;
import com.fr.base.svg.IconUtils;
import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane;
@ -31,9 +32,9 @@ public class FormHyperlinkGroup extends BaseHyperlinkGroup {
public NameableCreator[] getHyperlinkCreators() { public NameableCreator[] getHyperlinkCreators() {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = { 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_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper); 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 com.fr.transaction.WorkerFacade;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
public class WidgetManagerAction extends UpdateAction { public class WidgetManagerAction extends UpdateAction {
public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(720, 600);
public WidgetManagerAction() { public WidgetManagerAction() {
this.setMenuKeySet(WIDGET_MANAGER); this.setMenuKeySet(WIDGET_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); 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 @Override
public void doOk() { public void doOk() {
@ -68,7 +70,7 @@ public class WidgetManagerAction extends UpdateAction {
} }
})); }));
} }
}); }, WINDOW_CUSTOM_SIZE);
widgetConfigDialog.addWindowListener(new WindowAdapter() { widgetConfigDialog.addWindowListener(new WindowAdapter() {
@Override @Override
public void windowClosed(WindowEvent e) { public void windowClosed(WindowEvent e) {

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

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

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

@ -113,11 +113,6 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
JPanel reportEnginePane = new JPanel(new BorderLayout()); JPanel reportEnginePane = new JPanel(new BorderLayout());
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false); clientPaging.setSelected(false);
/*outPagingEngineSelectPane = new JPanel();
outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout());
outPagingEngineSelectPane.setVisible(false);
outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300)));
outPagingEngineSelectPane.add(createPagingEngineSelectPane());*/
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane));
reportEnginePane.add(clientPaging); reportEnginePane.add(clientPaging);
return reportEnginePane; return reportEnginePane;
@ -133,17 +128,10 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
engineSettingPane.add(box(cell(outEngineXSettingPane), engineSettingPane.add(box(cell(outEngineXSettingPane),
cell(outLineEngineSettingPane)).getComponent() cell(outLineEngineSettingPane)).getComponent()
, BorderLayout.WEST); , BorderLayout.WEST);
/*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER);
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/
//engineSettingPane.moveToFront(outEngineXSettingPane);
engineSettingPane.setVisible(true); engineSettingPane.setVisible(true);
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel pagingEngineSelectPane = new JPanel(new BorderLayout());
pagingEngineSelectPane.add(createPagingEngineRadioPanel()); pagingEngineSelectPane.add(createPagingEngineRadioPanel(), BorderLayout.NORTH);
pagingEngineSelectPane.add(engineSettingPane); pagingEngineSelectPane.add(engineSettingPane, BorderLayout.CENTER);
/*pagingEngineSelectPane.add(Layouts.column(10,
Layouts.cell(createPagingEngineSelectPane()),
Layouts.cell(engineSettingPane))
.getComponent());*/
return pagingEngineSelectPane; return pagingEngineSelectPane;
} }

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

@ -51,18 +51,14 @@ public class WriteShortCutsPane extends JPanel{
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
// 纵向布局,横向自适应 // 纵向布局,横向自适应
/*contentPane.setLayout(new GridBagLayout()); contentPane.setLayout(new GridBagLayout());
GridBagConstraints cons = new GridBagConstraints(); GridBagConstraints cons = new GridBagConstraints();
cons.fill = GridBagConstraints.HORIZONTAL; cons.fill = GridBagConstraints.HORIZONTAL;
cons.weightx = 1; cons.weightx = 1;
cons.gridx = 0; cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);*/ cons.insets = new Insets(20, 0, 0, 0);
contentPane.setLayout(new BorderLayout()); contentPane.add(getFeatureNamePane(), cons);
contentPane.add(column(10, true, contentPane.add(getHintsPane(), cons);
cell(getFeatureNamePane()),
cell(getHintsPane())).getComponent());
//contentPane.add(getFeatureNamePane());
//contentPane.add(getHintsPane());
return contentPane; return contentPane;
} }
@ -80,20 +76,16 @@ public class WriteShortCutsPane extends JPanel{
JPanel switchBtnPane = getSwitchBtnPane(); JPanel switchBtnPane = getSwitchBtnPane();
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
/*centerPane.add(name); centerPane.add(name);
centerPane.add(nextCol); centerPane.add(nextCol);
centerPane.add(new JPanel()); centerPane.add(new JPanel());
centerPane.add(nextRow); centerPane.add(nextRow);
centerPane.add(shortName); centerPane.add(shortName);
centerPane.add(nextColHK); centerPane.add(nextColHK);
centerPane.add(switchBtnPane); centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);*/ centerPane.add(nextRowHK);
centerPane.add(column(20, true,
row(50, cell(name), cell(nextCol), flex(), cell(nextRow)),
row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK))
).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER); featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -123,22 +115,16 @@ public class WriteShortCutsPane extends JPanel{
preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER); preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER); preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new FlowLayout(FlowLayout.CENTER)); JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100)); centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100));
/*centerPane.add(systemDefault); centerPane.add(systemDefault);
centerPane.add(preColText); centerPane.add(preColText);
centerPane.add(preCol); centerPane.add(preCol);
centerPane.add(new JPanel()); centerPane.add(new JPanel());
centerPane.add(preRowText); centerPane.add(preRowText);
centerPane.add(preRow);*/ centerPane.add(preRow);
centerPane.add(row(80,
column(flex(), cell(systemDefault), flex()),
column(20,
row(80, cell(preColText), cell(preCol)),
row(80, cell(preRowText), cell(preRow)))
).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER); hintsPane.add(centerPane, BorderLayout.CENTER);

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

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

35
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.BasicPane;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane; 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.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.mobile.WidgetMobilePane; import com.fr.design.widget.mobile.WidgetMobilePane;
@ -34,9 +36,7 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane; private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板 //属性配置切换面板
private ArrayList<JPanel> paneList; private ArrayList<JPanel> paneList;
private JPanel center; private FineTabbedPane tabsPane;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane; private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器 //通用属性容器
@ -64,22 +64,8 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll(); this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); 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")}; 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(); attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -111,10 +97,17 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER); mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
mobileCardLayout = (CardLayout) mobileCardPane.getLayout(); mobileCardLayout = (CardLayout) mobileCardPane.getLayout();
tabsPane = FineTabbedPane.builder()
.addTab(tabTitles[0], basicScrollPane)
.addTab(tabTitles[1], eventTabPane)
.addTab(tabTitles[2], mobileTabPane)
.build();
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsPane, BorderLayout.NORTH);
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(); initPaneList();
} }
@ -161,7 +154,7 @@ public class CellWidgetCardPane extends BasicPane {
currentWidgetMobilePane = mobilePane; currentWidgetMobilePane = mobilePane;
tabsHeaderIconPane.setSelectedIndex(0); //tabsHeaderIconPane.setSelectedIndex(0);
} }
public Widget update() { public Widget update() {

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

@ -1,18 +1,21 @@
package com.fr.design.widget; package com.fr.design.widget;
import java.awt.BorderLayout; import java.awt.*;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.UserDefinedWidgetConfig; import com.fr.form.ui.UserDefinedWidgetConfig;
import javax.swing.*;
public class UserDefinedWidgetConfigPane extends BasicBeanPane<UserDefinedWidgetConfig> { public class UserDefinedWidgetConfigPane extends BasicBeanPane<UserDefinedWidgetConfig> {
private ValueWidgetPane editorDefPane; private ValueWidgetPane editorDefPane;
public UserDefinedWidgetConfigPane(){ public UserDefinedWidgetConfigPane(){
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
editorDefPane = new ValueWidgetPane(); editorDefPane = new ValueWidgetPane();
this.add(editorDefPane, BorderLayout.CENTER); this.add(new UIScrollPane(editorDefPane), BorderLayout.CENTER);
} }
@Override @Override

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 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 { public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane; private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor; private WidgetValueEditor widgetValueEditor;
@ -27,18 +32,24 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel initNorthPane(){ public JPanel initNorthPane(){
JPanel northPane = super.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); label.setVisible(false);
widgetValuePane = new JPanel(); widgetValuePane = new JPanel(new BorderLayout());
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED; JPanel centerPane = new JPanel(new BorderLayout());
double f = TableLayout.FILL; centerPane.setOpaque(false);
double[] columnSize = {p, p, f}; widgetValuePane.setOpaque(false);
double[] rowSize = {p}; centerPane.add(row(
Component[][] components = new Component[][]{ cell(label).weight(68),
new Component[]{northPane, label,widgetValuePane}, cell(widgetValuePane).weight(372)).getComponent()
}; );
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel jPanel = new JPanel();
jPanel.setBackground(Color.WHITE);
jPanel.setLayout(new BorderLayout());
jPanel.add(column(10, true,
cell(northPane),
cell(centerPane)
).getComponent());
return jPanel; return jPanel;
} }

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( this.add(column(
10, 10,
cell(northPane), cell(northPane).weight(0.08),
cell(cellEditorCardPane).weight(1) cell(cellEditorCardPane).weight(0.92)
).getComponent() ).getComponent()
); );
} }
@ -90,8 +90,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return column( return column(
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(LEFT_WEIGHT), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68),
cell(editorTypeComboBox).weight(RIGHT_WEIGHT) cell(editorTypeComboBox).weight(372)
) )
).getComponent(); ).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.cell;
import static com.fine.swing.ui.layout.Layouts.column; 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.row;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class BasicWidgetPropertySettingPane extends BasicPane { public class BasicWidgetPropertySettingPane extends BasicPane {
@ -33,13 +31,11 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree(); widgetNameComboBox.refreshTree();
this.add(column(LayoutConstants.VERTICAL_GAP, this.add(row(LayoutConstants.HORIZONTAL_GAP,
row( cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(LEFT_WEIGHT), cell(widgetNameComboBox).weight(0.6),
cell(widgetNameComboBox).weight(RIGHT_WEIGHT) cell(enableCheckBox).weight(0.1),
), cell(visibleCheckBox).weight(0.1)
cell(enableCheckBox),
cell(visibleCheckBox)
).getComponent()); ).getComponent());
} }

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

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

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

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

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

@ -36,6 +36,7 @@ import java.util.List;
import static com.fine.swing.ui.layout.Layouts.row; 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.column;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
public class SubmitVisitorListPane extends ObjectJControlPane { public class SubmitVisitorListPane extends ObjectJControlPane {
@ -194,8 +195,9 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
// FlowLayout.LEFT, 10); // FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout()); JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10, typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")), flex(0.002),
cell(csjConfigComboBox)).getComponent(), BorderLayout.WEST); 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"))); 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);

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.FinePassportListenerAdapter;
import com.fr.base.passport.FinePassportManager; import com.fr.base.passport.FinePassportManager;
import com.fr.base.process.ProcessOperator; 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.FormThemeConfigMigrator;
import com.fr.base.theme.migrator.ReportThemeConfigMigrator; import com.fr.base.theme.migrator.ReportThemeConfigMigrator;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
@ -341,12 +342,12 @@ public class DesignerActivator extends Activator implements Prepare {
private static NameableCreator[] hyperlinkTypes() { private static NameableCreator[] hyperlinkTypes() {
return new NameableCreator[]{ 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_Hyperlink_Reportlet"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Email"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Hyperlink_Web_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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_Basic_JavaScript_Dynamic_Parameters"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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("Fine-Design_Report_JavaScript"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), 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("FR-Plugin-Designer_Mobile_Popup"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), MobilePopupHyperlink.class, MobilePopupPane.class),
}; };
} }

Loading…
Cancel
Save