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

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.fun.impl;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
@ -25,7 +26,7 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme
@Override
public NameableCreator createHyperlinkCreator() {
return new NameObjectCreator(text(), target(), appearance());
return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.png"), target(), appearance());
}
@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 static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
@ -24,19 +27,17 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
this.add(pane, BorderLayout.NORTH);
JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":"));
pane.add(colPane);
UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
initColSpinner();
colPane.add(columnSpinner);
JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
pane.add(rowPane);
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
UILabel rowLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row"));
initRowSpinner();
rowPane.add(rowSpinner);
pane.add(column(10,
row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)),
row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8))
).getComponent());
this.addDocumentListener(d);
}

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

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

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

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.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.*;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.Insets;
@ -37,6 +38,11 @@ public class UITableEditorPane<T> extends BasicPane {
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) {
leftLabelName = s;
this.tableModel = model;
@ -44,20 +50,29 @@ public class UITableEditorPane<T> extends BasicPane {
}
protected void initComponent(UITableEditAction[] action) {
this.initComponent(action, null);
}
protected void initComponent(UITableEditAction[] action, JPanel content) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = new JPanel(new BorderLayout(4, 4));
this.add(pane, BorderLayout.CENTER);
UILabel l = new UILabel(leftLabelName);
editTable = tableModel.createTable();
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
editTable.getTableHeader().setDefaultRenderer(headerRenderer);
UIScrollPane scrollPane = new UIScrollPane(editTable);
scrollPane.setBorder(new FineRoundBorder());
pane.add(scrollPane, BorderLayout.CENTER);
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(l, BorderLayout.WEST);
controlPane.add(content == null ? l : content, BorderLayout.WEST);
pane.add(controlPane, BorderLayout.NORTH);
}
@ -70,7 +85,7 @@ public class UITableEditorPane<T> extends BasicPane {
buttonPane = new JPanel();
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++) {
final UIButton newButton = new UIButton(action[i]);
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.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.js.Hyperlink;
@ -17,6 +18,12 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.fix;
public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1;
@ -31,11 +38,11 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
/**
* 对话框高度输入框
*/
private UINumberField heightTextFiled;
private UISpinner heightTextFiled;
/**
* 对话框宽度输入框
*/
private UINumberField widthTextFiled;
private UISpinner widthTextFiled;
public AbstractHyperNorthPane() {
@ -46,8 +53,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -55,38 +61,37 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
return this;
}
});
JPanel targetFramePanel = new JPanel();
targetFramePanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")));
targetFramePanel.add(targetFrameComboBox);
UILabel targetFrameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In"));
targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel();
newWindowConfPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ": "));
heightTextFiled = new UINumberField();
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(heightTextFiled);
newWindowConfPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ": "));
widthTextFiled = new UINumberField();
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
final JPanel newWindowConfPane = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height"));
heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
newWindowConfPane.add(column(10,
row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)),
row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87))
).getComponent());
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
centerPanel.add(column(
10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)),
cell(newWindowConfPane)
).getComponent());
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex());
}
});
targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()));
this.add(this.setFootPanel(), BorderLayout.SOUTH);
this.add(column(
cell(headerPane),
cell(centerPane),
cell(this.setFootPanel())
).getComponent());
}
protected String[] getTargetFrames() {
@ -107,19 +112,19 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.targetFrameComboBox = targetFrameComboBox;
}
public UINumberField getHeightTextFiled() {
public UISpinner getHeightTextFiled() {
return heightTextFiled;
}
public void setHeightTextFiled(UINumberField heightTextFiled) {
public void setHeightTextFiled(UISpinner heightTextFiled) {
this.heightTextFiled = heightTextFiled;
}
public UINumberField getWidthTextFiled() {
public UISpinner getWidthTextFiled() {
return widthTextFiled;
}
public void setWidthTextFiled(UINumberField widthTextFiled) {
public void setWidthTextFiled(UISpinner widthTextFiled) {
this.widthTextFiled = widthTextFiled;
}
@ -127,8 +132,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void populateBean(T link) {
String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight());
widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth());
populateSubHyperlinkBean(link);
}
@ -148,8 +153,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getValue(), false).intValue());
}
}

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

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

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

@ -1,10 +1,12 @@
package com.fr.design.hyperlink;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
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.UITableEditAction;
import com.fr.design.i18n.Toolkit;
@ -16,13 +18,14 @@ import com.fr.js.ReportletHyperlink;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyperlink> {
/**
* 超链配置面板
@ -47,7 +50,6 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
this.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane = new ReportletHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{
@ -58,12 +60,16 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
getValueEditorPane()
);
this.add(parameterViewPane, BorderLayout.CENTER);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
UIScrollPane scrollPane = new UIScrollPane(extendParametersCheckBox);
scrollPane.setBorder(new FineRoundBorder());
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0),
cell(scrollPane)
).getComponent());
}
@Override

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

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

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

@ -1,8 +1,10 @@
package com.fr.design.hyperlink;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.Parameter;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
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.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -17,6 +19,10 @@ import java.awt.FlowLayout;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private static final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane;
@ -38,14 +44,19 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
//this.add(northPane, BorderLayout.NORTH);
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));
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -890,6 +890,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyPanel = new JPanel();
contentPane = generateContentPane();
popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON);
popupToolPane.setPreferredSize(new Dimension(0, 34));
headerPane = new JPanel();
headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏
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.ParameterConfig;
import com.fr.base.svg.IconUtils;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.NameableSelfCreator;
@ -57,7 +58,10 @@ public class ParameterArrayPane extends JListControlPane {
*/
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) {
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"),
"com/fr/design/images/server/global_param.png",
Parameter.class,
ParameterPane.class) {
public Parameter createNameable(UnrepeatedNameHelper helper) {
// 返回参数设置面板.
return new Parameter(helper.createUnrepeatedName(DEFAULT_PARAMETER_NAME_PREFIX));

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

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

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -34,22 +35,22 @@ import static com.fine.swing.ui.layout.Layouts.row;
public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane;
private static final int DEFAULT_LENGTH = 25;
private static final int DEFAULT_LENGTH = 33;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
classNameTextField = new UITextField();
//reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
/*reportletNamePane.add(browserButton);
@ -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.setLayout(new BorderLayout());
reportletNamePane.add(row(10,
cell(classNameTextField).weight(1.0),
cell(browserButton),
cell(editButton)
cell(classNameTextField).weight(0.8),
cell(browserButton).weight(0.1),
cell(editButton).weight(0.1)
).getComponent());
//this.add(reportletNamePane, BorderLayout.NORTH);
@ -120,7 +122,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
}
public int getLengthOfTextField() {
return DEFAULT_LENGTH;
return FineUIScale.scale(DEFAULT_LENGTH);
}
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.BaseUtils;
import com.fr.base.Parameter;
import com.fr.cert.token.lang.Collections;
import com.fr.data.DataConstants;
import com.fr.data.condition.JoinCondition;
import com.fr.data.condition.ListCondition;
@ -34,8 +33,6 @@ import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.javascript.JavaScriptActionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.FRLeftFlowLayout;
import com.fr.design.layout.LeftCenterRightLayout;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
@ -53,6 +50,7 @@ import com.fr.write.config.DeleteConfig;
import com.fr.write.config.InsertConfig;
import com.fr.write.config.IntelliDMLConfig;
import com.fr.write.config.UpdateConfig;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
@ -66,6 +64,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTree;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableCellRenderer;
@ -152,27 +151,20 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
this.v_Types = v_Types;
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//this.add(northPane, BorderLayout.NORTH);
dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES);
//JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox},
// FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(dmlConfigComboBox)).getComponent(), 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")));
//northPane.add(typePane, BorderLayout.NORTH);
chooseTable = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")));
chooseTable.setTableNameComboBoxPopSize(160, 320);
//northPane.add(chooseTable, BorderLayout.CENTER);
// peter:编辑的TablePane
JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//this.add(editTablePane, BorderLayout.CENTER);
editTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable();
@ -180,6 +172,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150));
keyColumnValuesTable.setShowHorizontalLines(true);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true,
cell(typePane),
@ -215,15 +210,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new BorderLayout());
editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST);
List<Layouts.Cell> buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList());
/*for (UpdateAction action : actions) {
controlBtnPane.add(new UIButton(action));
}*/
checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0));
checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20));
//buttonGroup.add(cell(checkBoxUpdatePane));
//controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
//controlBtnPane.add(checkBoxUpdatePane);
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON);
@ -239,12 +228,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
});
helpButton.set4ToolbarButton();
//checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
//checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
buttonGroup.add(row(5, cell(UpdateCheckBox),
cell(helpButton)));
//checkBoxUpdatePane.add(row(5, cell(UpdateCheckBox),
// cell(helpButton)).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();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree);
addComponent(conditionPane, jp);
UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"));
addSubmitConditionButton.addActionListener(new ActionListener() {
@ -355,8 +339,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
conditionPane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), setControlBtnPanePosition());
controlBtnPane.add(addSubmitConditionButton);
conditionPane.add(row(
cell(jp).weight(0.74),
column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26)
).getComponent());
return conditionPane;
}
@ -698,6 +685,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private void initJTableColumn() {
TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0);
column0.setMaxWidth(50);
column0.setCellRenderer(new ColumnNameTableCellRenderer());
TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1);
column1.setCellRenderer(new ColumnNameTableCellRenderer());
@ -1187,7 +1175,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnName) {
this.setText(((ColumnName) value).name);
}
@ -1203,6 +1191,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnValue) {
if (((ColumnValue) value).obj != null) {

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

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

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 536 B

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

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

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

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

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

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

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

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 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.ListSelectionListener;
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.selection.SelectionListener;
import sun.swing.table.DefaultTableCellHeaderRenderer;
/*
* 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();
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());
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
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));
reportEnginePane.add(clientPaging);
return reportEnginePane;
@ -133,17 +128,10 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
engineSettingPane.add(box(cell(outEngineXSettingPane),
cell(outLineEngineSettingPane)).getComponent()
, BorderLayout.WEST);
/*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER);
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/
//engineSettingPane.moveToFront(outEngineXSettingPane);
engineSettingPane.setVisible(true);
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
pagingEngineSelectPane.add(createPagingEngineRadioPanel());
pagingEngineSelectPane.add(engineSettingPane);
/*pagingEngineSelectPane.add(Layouts.column(10,
Layouts.cell(createPagingEngineSelectPane()),
Layouts.cell(engineSettingPane))
.getComponent());*/
JPanel pagingEngineSelectPane = new JPanel(new BorderLayout());
pagingEngineSelectPane.add(createPagingEngineRadioPanel(), BorderLayout.NORTH);
pagingEngineSelectPane.add(engineSettingPane, BorderLayout.CENTER);
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.setLayout(new GridBagLayout());
contentPane.setLayout(new GridBagLayout());
GridBagConstraints cons = new GridBagConstraints();
cons.fill = GridBagConstraints.HORIZONTAL;
cons.weightx = 1;
cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);*/
contentPane.setLayout(new BorderLayout());
contentPane.add(column(10, true,
cell(getFeatureNamePane()),
cell(getHintsPane())).getComponent());
//contentPane.add(getFeatureNamePane());
//contentPane.add(getHintsPane());
cons.insets = new Insets(20, 0, 0, 0);
contentPane.add(getFeatureNamePane(), cons);
contentPane.add(getHintsPane(), cons);
return contentPane;
}
@ -80,20 +76,16 @@ public class WriteShortCutsPane extends JPanel{
JPanel switchBtnPane = getSwitchBtnPane();
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.add(name);
centerPane.add(name);
centerPane.add(nextCol);
centerPane.add(new JPanel());
centerPane.add(nextRow);
centerPane.add(shortName);
centerPane.add(nextColHK);
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);*/
centerPane.add(column(20, true,
row(50, cell(name), cell(nextCol), flex(), cell(nextRow)),
row(50, cell(shortName), cell(nextColHK), cell(switchBtnPane), cell(nextRowHK))
).getComponent());
centerPane.add(nextRowHK);
featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -123,22 +115,16 @@ public class WriteShortCutsPane extends JPanel{
preCol = new UILabel("Shift+" + nextColString, 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.add(systemDefault);
centerPane.add(systemDefault);
centerPane.add(preColText);
centerPane.add(preCol);
centerPane.add(new JPanel());
centerPane.add(preRowText);
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());
centerPane.add(preRow);
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;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory;
@ -40,8 +41,6 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
@Override
protected synchronized void initComponents(JPanel container) {
container.setLayout(FRGUIPaneFactory.createBorderLayout());
final UITabbedPane tabbedPane = new UITabbedPane(SwingConstants.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
container.add(tabbedPane, BorderLayout.CENTER);
// peter: writeSQLAttrList的编辑.
if (submiterListPane == null) {
@ -53,9 +52,15 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
}
writeShortCutsPane = new WriteShortCutsPane();
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane);
final FineTabbedPane tabbedPane = FineTabbedPane.builder()
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Submit"), submiterListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify"), verifierListPane)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Writer_ShortCuts_Setting"), writeShortCutsPane)
.withHeadRatio(0.5f)
.build();
container.setPreferredSize(this.getPreferredSize());
container.add(tabbedPane, BorderLayout.CENTER);
}
@Override

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

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

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

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

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

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

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

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

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

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

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.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
public class SubmitVisitorListPane extends ObjectJControlPane {
@ -194,8 +195,9 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
// FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(csjConfigComboBox)).getComponent(), BorderLayout.WEST);
flex(0.002),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")).weight(0.158),
cell(csjConfigComboBox).weight(0.84)).getComponent());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
/*this.add(typePane, BorderLayout.NORTH);

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

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

Loading…
Cancel
Save