Browse Source

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

newui
renekton 5 months ago
parent
commit
05276039d9
  1. 7
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  2. 1
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  3. 6
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java
  4. 2
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  5. 46
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  6. 60
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  7. 44
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  8. 8
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

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

@ -38,8 +38,7 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
new LazyIcon("add"));
buttonPane.add(this.addButton, BorderLayout.WEST);
buttonPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 24)));
//this.add(buttonPane, BorderLayout.NORTH);
this.addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -50,8 +49,7 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
});
selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
// selectedItemPane.setLayout(new BoxLayout(selectedItemPane,BoxLayout.Y_AXIS));
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.add(selectedItemPane, BorderLayout.NORTH);
@ -61,7 +59,6 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(new FineRoundBorder());
centerPane.add(selectedItemScrollPane);
//this.add(centerPane, BorderLayout.CENTER);
this.add(column(4,
cell(buttonPane),
cell(centerPane).weight(1.0)

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

@ -96,7 +96,6 @@ public abstract class CustomJobPane extends BasicBeanPane {
reportletNamePane.setLayout(new BorderLayout());
reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
//reportletNamePane.setPreferredSize(new Dimension(0, FineUIScale.scale(24)));
reportletNamePane.add(row(4,
cell(classNameTextField).weight(1.0),
cell(browserButton),

6
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -116,7 +116,7 @@ public class EnvDetectorDialog extends JDialog {
this.body = FRGUIPaneFactory.createBorderLayout_L_Pane();
Color backgroundColor = new Color(240, 240, 243, 1);
//this.body.setBackground( backgroundColor);
this.body.setBackground( backgroundColor);
this.headerPanel = createHeaderPanel();
body.add(headerPanel, BorderLayout.NORTH);
@ -175,8 +175,8 @@ public class EnvDetectorDialog extends JDialog {
stopDetecting(detectButton);
}
});
detectButton.setForeground(Color.WHITE);
detectButton.setBackground(new Color(65, 155, 249));
detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal"));
detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "Button.default.background"));
headerPanel.add(detectButton, BorderLayout.WEST);

2
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -222,6 +222,8 @@ CombinationButton.background = $Button.background
CombinationButton.borderColor = $Component.borderColor
CombinationButton.arc = $Button.arc
EnvDetecorButton.background = #FF419BF9
#---- CheckBox ----
CheckBox.arc = 4
CheckBox.margin = 2,0,2,0

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

@ -1,6 +1,7 @@
package com.fr.design.widget;
import com.fr.design.constants.UIConstants;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane;
@ -14,12 +15,15 @@ import com.fr.design.widget.ui.BasicWidgetPropertySettingPane;
import com.fr.form.event.Listener;
import com.fr.form.ui.Widget;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.util.ArrayList;
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.fix;
/*
* carl :单独弄出来
*/
@ -62,7 +66,20 @@ public class CellWidgetCardPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
this.add(center, BorderLayout.CENTER);
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();
@ -73,16 +90,19 @@ public class CellWidgetCardPane extends BasicPane {
}
};
widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriTabPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
attriTabPane.add(uiExpandablePane, BorderLayout.NORTH);
UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
attriTabPane.add(attriCardPane, BorderLayout.CENTER);
attriCardLayout = (CardLayout) attriCardPane.getLayout();
attriTabPane.add(column(
cell(basicPane),
fix(1).with(it -> it.setBorder(FineBorderFactory.createDefaultUnderlineBorder())),
cell(attriCardPane)
).getComponent()
);
// 事件
eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventTabPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
eventPane = initWidgetEventPane(pane);
eventTabPane.add(eventPane, BorderLayout.CENTER);
@ -97,16 +117,6 @@ public class CellWidgetCardPane extends BasicPane {
center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal"));
initPaneList();
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]);
}
};
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH);
}
private void initPaneList() {

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

@ -1,5 +1,6 @@
package com.fr.design.widget;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.WidgetDesignHandler;
import com.fr.design.gui.core.WidgetOption;
@ -9,27 +10,36 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.CellWidgetPropertyPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.btn.ButtonConstants;
import com.fr.form.ui.Button;
import com.fr.form.ui.*;
import com.fr.form.ui.NameWidget;
import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetConfig;
import com.fr.form.ui.WidgetInfoConfig;
import com.fr.general.ComparatorUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.*;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Vector;
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;
/**
* CellEditorDef Pane.
*/
@ -38,7 +48,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
private EditorTypeComboBox editorTypeComboBox;
private CellWidgetCardPane cellEditorCardPane;
private boolean shouldFireSelectedEvent = true;
private JPanel northPane;
private JComponent northPane;
public WidgetPane() {
this(null);
@ -58,36 +68,32 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
protected void initComponents(ElementCasePane pane) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
editorTypeComboBox = new EditorTypeComboBox(pane != null);
editorTypeComboBox.setPreferredSize(new Dimension(155, 30));
editorTypeComboBox.setMaximumRowCount(16);
northPane = initNorthPane();
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15));
this.add(northPane, BorderLayout.NORTH);
northPane.setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = initWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
this.add(column(
10,
cell(northPane),
cell(cellEditorCardPane).weight(1)
).getComponent()
);
}
public JPanel initNorthPane() {
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget")), emptyLabel, editorTypeComboBox},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
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)
)
).getComponent();
}
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {

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

@ -1,21 +1,22 @@
package com.fr.design.widget.ui;
import com.fr.design.designer.IntervalConstants;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.dialog.BasicPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
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 {
@ -26,27 +27,20 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
public BasicWidgetPropertySettingPane() {
this.setLayout(new BorderLayout());
this.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true);
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox},
new Component[]{enableCheckBox, null},
new Component[]{visibleCheckBox, null},
};
double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}};
JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1);
pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0));
this.add(pane, BorderLayout.CENTER);
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)
).getComponent());
}
@Override

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

@ -2,12 +2,9 @@ package com.fr.design.widget.ui;
import com.fr.base.FRContext;
import com.fr.data.core.FormatField;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
@ -22,7 +19,9 @@ import com.fr.form.ui.DateEditor;
import com.fr.stable.ArrayUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -31,7 +30,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Set;
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> {
private UIButtonGroup returnTypeComboBox;

Loading…
Cancel
Save