Browse Source

Merge remote-tracking branch 'origin/newui' into newui

newui
lemon 3 months ago
parent
commit
2d971b36ef
  1. 2
      designer-base/src/main/java/com/fr/design/actions/file/CloseCurrentTemplateAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/file/ExitDesignerAction.java
  4. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java
  5. 4
      designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java
  6. 8
      designer-base/src/main/java/com/fr/design/border/FineBorderFactory.java
  7. 8
      designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java
  8. 14
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java
  9. 19
      designer-base/src/main/java/com/fr/design/dialog/BasicPane.java
  10. 8
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  11. 9
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  12. 26
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  13. 44
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  14. 22
      designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java
  15. 24
      designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java
  16. 5
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java
  17. 6
      designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java
  18. 3
      designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java
  19. 1
      designer-base/src/main/java/com/fr/design/gui/style/FormatPane.java
  20. 14
      designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java
  21. 6
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  22. 4
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  23. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  24. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  25. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java
  26. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java
  27. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java
  28. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java
  29. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  30. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java
  31. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java
  32. 61
      designer-base/src/main/java/com/fr/design/present/dict/FormulaDictPane.java
  33. 3
      designer-base/src/main/java/com/fr/design/scrollruler/BaseRuler.java
  34. 49
      designer-base/src/main/java/com/fr/design/style/FRFontPane.java
  35. 35
      designer-base/src/main/java/com/fr/design/style/FontSizeStylePane.java
  36. 19
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java
  37. 59
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  38. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg
  39. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg
  40. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg
  41. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg
  42. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg
  43. 49
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  44. 2
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java
  45. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java
  46. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  47. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  48. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  49. 2
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  50. 2
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  51. 5
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java
  52. 4
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java
  53. 7
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java
  54. 6
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  55. 6
      designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java
  56. 25
      designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java
  57. 14
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

2
designer-base/src/main/java/com/fr/design/actions/file/CloseCurrentTemplateAction.java

@ -7,6 +7,7 @@ import com.fr.design.file.MultiTemplateTabPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils;
import com.fr.general.IOUtils;
import java.awt.event.ActionEvent;
/**
@ -21,6 +22,7 @@ public class CloseCurrentTemplateAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setAccelerator(getMenuKeySet().getKeyStroke());
this.setSmallIcon(IOUtils.readIcon("/com/fr/base/images/cell/blank.gif"));
}
/**

2
designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java

@ -5,6 +5,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.IOUtils;
import java.awt.event.ActionEvent;
@ -13,6 +14,7 @@ public class EditEnvAction extends UpdateAction {
public EditEnvAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Others") + "...");
this.setSmallIcon(IOUtils.readIcon("/com/fr/base/images/cell/blank.gif"));
}
@Override

2
designer-base/src/main/java/com/fr/design/actions/file/ExitDesignerAction.java

@ -5,6 +5,7 @@ package com.fr.design.actions.file;
import com.fr.design.file.SaveSomeTemplatePane;
import com.fr.design.mainframe.TemplateSavingChecker;
import com.fr.general.IOUtils;
import java.awt.event.ActionEvent;
import com.fr.design.actions.UpdateAction;
@ -22,6 +23,7 @@ public class ExitDesignerAction extends UpdateAction {
this.setMenuKeySet(KeySetUtils.EXIT_DESIGNER);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/base/images/cell/blank.gif"));
}
/**

2
designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java

@ -11,6 +11,7 @@ import com.fr.design.mainframe.DesignerFrameFileDealerPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils;
import com.fr.general.IOUtils;
import java.awt.event.ActionEvent;
@ -20,6 +21,7 @@ public class PreferenceAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.generateAndSetSearchText(PreferencePane.class.getName());
this.setSmallIcon(IOUtils.readIcon("/com/fr/base/images/cell/blank.gif"));
}
/**

4
designer-base/src/main/java/com/fr/design/actions/help/AboutAction.java

@ -8,7 +8,8 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.MenuKeySet;
import javax.swing.*;
import com.fr.general.IOUtils;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
/**
@ -19,6 +20,7 @@ public class AboutAction extends UpdateAction {
this.setMenuKeySet(ABOUT);
this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/base/images/cell/blank.gif"));
}
/**

8
designer-base/src/main/java/com/fr/design/border/FineBorderFactory.java

@ -68,4 +68,12 @@ public class FineBorderFactory {
);
}
/**
* 创建具有padding的边框
* @return 边框
*/
public static Border createBorderWithPadding(Border border) {
return BorderFactory.createCompoundBorder(border, new ScaledEmptyBorder(0, 6, 0, 0)
);
}
}

8
designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java

@ -123,12 +123,12 @@ public class DSColumnLiteConditionPane extends LiteConditionPane<CommonCondition
UILabel operatorLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ConditionB_Operator") + ":");
operatorLabel.setPreferredSize(FineUIScale.scale(new Dimension(68, 24)));
Component[][] components = {
{ columLabel,
keyColumnPane, operatorLabel, conditionOPComboBox, conditionValuePane}};
{ columLabel, keyColumnPane, null},
{operatorLabel, conditionOPComboBox, conditionValuePane}};
double p = TableLayout.PREFERRED;
double rowSize[] = { p };
double columnSize[] = { p, p, p, p, TableLayout.FILL };
double rowSize[] = { p, p };
double columnSize[] = { p, p, TableLayout.FILL };
JPanel leftPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.add(leftPanel, BorderLayout.CENTER);

14
designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java

@ -11,7 +11,6 @@ import javax.swing.JList;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.data.TableDataSource;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
@ -48,14 +47,15 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel renderer = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof TableDataWrapper) {
if (index == -1 && value == null) {
// 显示空白
renderer.setIcon(null);
renderer.setText(StringUtils.EMPTY);
}else if (value instanceof TableDataWrapper) {
TableDataWrapper tabledatawrappe = (TableDataWrapper)value;
renderer.setIcon(tabledatawrappe.getIcon());
renderer.setText(tabledatawrappe.getTableDataName());
renderer.setToolTipText(tabledatawrappe.getTableDataName());
} else {
renderer.setIcon(null);
renderer.setText(StringUtils.EMPTY);
}
return renderer;
}
@ -75,7 +75,7 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC
setDsMap();
DefaultComboBoxModel model = new DefaultComboBoxModel();
this.setModel(model);
model.addElement(UIConstants.PENDING);
// 遍历添加所有数据项到模型
Iterator<Entry<String, TableDataWrapper>> entryIt = dsMap.entrySet().iterator();
while (entryIt.hasNext()) {
TableDataWrapper tableDataWrapper = entryIt.next().getValue();
@ -83,6 +83,8 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC
model.addElement(tableDataWrapper);
}
}
// 设置默认选项为空白
this.setSelectedItem(null);
if (dataWrapper != null) {
if (DesignTableDataManager.isDsNameChanged(dataWrapper.getTableDataName())) {
this.setSelectedTableDataByName(DesignTableDataManager.getChangedDsNameByOldDsName(dataWrapper.getTableDataName()));

19
designer-base/src/main/java/com/fr/design/dialog/BasicPane.java

@ -14,9 +14,9 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
@ -164,12 +164,17 @@ public abstract class BasicPane extends JPanel {
dg = new DIALOG((Dialog) window);
}
if (l != null) {
dg.addDialogActionListener(l);
}
dg.setBasicDialogSize(dimension);
GUICoreUtils.centerWindow(dg);
dg.setResizable(false);
SwingUtilities.invokeLater(() -> {
if (l != null) {
dg.addDialogActionListener(l);
}
dg.setBasicDialogSize(dimension);
GUICoreUtils.centerWindow(dg);
dg.setResizable(false);
dg.setVisible(true);
dg.toFront();
dg.requestFocus();
});
return dg;
}

8
designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java

@ -1,5 +1,7 @@
package com.fr.design.file;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.util.SystemInfo;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -8,6 +10,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.iscrollbar.UIScrollBarUI;
import com.fr.design.gui.itree.checkboxtree.NullTristateCheckBox;
import com.fr.design.gui.itree.checkboxtree.TristateCheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
@ -81,13 +84,16 @@ public class SaveSomeTemplatePane extends BasicPane {
this.add(tip, BorderLayout.NORTH);
templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane);
scrollPane.setBorder(new FineRoundBorder());
if (SystemInfo.isWindows) {
scrollPane.getVerticalScrollBar().setUI(new UIScrollBarUI());
}
this.add(scrollPane, BorderLayout.CENTER);
this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent;
}
private void initTemplatesChoosePane(boolean judgeJTemplateMustSave) {
templatesChoosePane.setBorder(BorderFactory.createTitledBorder(""));
for (int i = 0; i < unSavedTemplate.size(); i++) {
templateCheckBoxes[i] = new UICheckBox(unSavedTemplate.get(i).getEditingFILE().getName());
templateCheckBoxes[i].setSelected(true);

9
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -49,6 +49,7 @@ import java.awt.event.WindowEvent;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* Created by plough on 2017/7/21.
@ -200,7 +201,7 @@ public abstract class UIControlPane extends JControlPane {
PopupEditDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame());
setUndecorated(true);
pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
pane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
this.editPane = pane;
JPanel editPaneWrapper = new JPanel(new BorderLayout());
popupToolPane = new PopupToolPane(this);
@ -208,7 +209,7 @@ public abstract class UIControlPane extends JControlPane {
editPaneWrapper.add(editPane, BorderLayout.CENTER);
editPaneWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.POP_DIALOG_BORDER, 1));
this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER);
setSize(FineUIScale.scale(new Dimension(WIDTH, HEIGHT)));
setSize(scale(new Dimension(WIDTH, HEIGHT)));
this.setVisible(false);
initListener();
}
@ -376,7 +377,7 @@ public abstract class UIControlPane extends JControlPane {
titleLabel = new UILabel(title);
FineUIStyle.setStyle(titleLabel, FineUIStyle.LABEL_BOLD);
contentPane.add(titleLabel, BorderLayout.WEST);
contentPane.setBorder(new EmptyBorder(5, 14, 6, 0));
contentPane.setBorder(new ScaledEmptyBorder(5, 14, 6, 0));
setLayout(new BorderLayout());
add(contentPane, BorderLayout.CENTER);
@ -392,7 +393,7 @@ public abstract class UIControlPane extends JControlPane {
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 28);
return new Dimension(super.getPreferredSize().width, scale(28));
}
}
}

26
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java

@ -33,7 +33,13 @@ import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.BorderLayout;
import java.awt.AlphaComposite;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.lang.reflect.Constructor;
@ -44,6 +50,10 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* Created by kerry on 5/31/21
*/
@ -84,7 +94,7 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
@Override
protected JPanel getLeftTopPane(UIToolbar topToolBar) {
UIToolbar toolbar = getTopToolBar();
toolbar.setPreferredSize(FineUIScale.scale(new Dimension(160, 24)));
toolbar.setPreferredSize(scale(new Dimension(160, 24)));
return super.getLeftTopPane(topToolBar);
}
@ -555,13 +565,13 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
super.paint(g);
}
};
label.setBorder(BorderFactory.createMatteBorder(0, 0, FineUIScale.scale(1), 0, FineUIUtils.getUIColor("fill.hover", "fill.hover")));
label.setBorder(BorderFactory.createMatteBorder(scale(1), 0, scale(1), 0, FineUIUtils.getUIColor("fill.hover", "fill.hover")));
label.setForeground(UIManager.getColor("List.wrapper.text.fontColor"));
label.setFont(label.getFont().deriveFont(11F));
label.setPreferredSize(new Dimension(this.getPreferredSize().width, FineUIScale.scale(24)));
label.setFont(label.getFont().deriveFont(scale(11F)));
label.setPreferredSize(new Dimension(this.getPreferredSize().width, scale(24)));
this.nameEdList = nameEdList;
this.add(label, BorderLayout.NORTH);
this.add(this.nameEdList, BorderLayout.CENTER);
this.add(column(cell(label), cell(this.nameEdList)).getComponent());
}
public UINameEdList getNameEdList() {
@ -569,6 +579,4 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
}
}
}

44
designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

@ -58,10 +58,16 @@ import java.util.Set;
import static com.fine.theme.utils.FineUIScale.scale;
public class UICalendarPanel extends JPanel {
private static final Font FONT_UI = DesignUtils.getDefaultGUIFont().applySize(12);
private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"), Font.PLAIN, 12);
private static final Font FONT_UI = DesignUtils.getDefaultGUIFont().applySize(scale(12));
private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"), Font.PLAIN, scale(12));
private static final int WEEKDAY_COUNT = 7;
private static final int TOTAL_DAYS_COUNT = 42;
private static final int WIDTH = scale(31);
private static final int HEIGHT = scale(19);
private static final int START_X = scale(30);
private static final int START_Y = scale(19);
//卡顿日志所在地址
private static final String JOURNAL_FILE_PATH = StableUtils.pathJoin(ProductConstantsBase.getEnvHome(), "journal_log");
protected Color selectedBackground;
@ -432,7 +438,7 @@ public class UICalendarPanel extends JPanel {
gp.setBorder(null);
UIDayLabel label = new UIDayLabel(setupCalendar.getTime());
label.setHorizontalAlignment(SwingConstants.RIGHT);
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 9));
label.setBorder(new ScaledEmptyBorder(0, 0, 0, 9));
if ("1".equals(label.getText())) {
isCurrentMonth = !isCurrentMonth;
}
@ -655,12 +661,12 @@ public class UICalendarPanel extends JPanel {
public void paint(Graphics g) {
super.paint(g);
int width = 31;
int height = 19;
int width = UICalendarPanel.WIDTH;
int height = UICalendarPanel.HEIGHT;
Color oldColor = g.getColor();
g.setColor(new Color(0xDADADA));
int start_x = 30;
int start_y = 19;
int start_x = UICalendarPanel.START_X;
int start_y = UICalendarPanel.START_Y;
for (int i = 0; i < 6; i++) {
g.drawLine(start_x, 0, start_x, getHeight());
start_x += width;
@ -683,19 +689,19 @@ public class UICalendarPanel extends JPanel {
private void paintChindPane(Graphics g, int index) {
if (index % 7 == 0) {
int y1 = index / 7 * 19;
g.drawLine(0, y1, 30, y1);
g.drawLine(0, y1 + 19, 30, y1 + 19);
g.drawLine(30, y1, 30, y1 + 19);
int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawLine(0, y1, UICalendarPanel.START_X, y1);
g.drawLine(0, y1 + UICalendarPanel.HEIGHT, UICalendarPanel.START_X, y1 + UICalendarPanel.HEIGHT);
g.drawLine(UICalendarPanel.START_X, y1, UICalendarPanel.START_X, y1 + UICalendarPanel.HEIGHT);
} else if (index % 7 == 6) {
int y1 = index / 7 * 19;
g.drawLine(185, y1, 216, y1);
g.drawLine(185, y1 + 19, 216, y1 + 19);
g.drawLine(185, y1, 185, y1 + 19);
int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawLine(scale(185), y1, scale(216), y1);
g.drawLine(scale(185), y1 + UICalendarPanel.HEIGHT, scale(216), y1 + UICalendarPanel.HEIGHT);
g.drawLine(scale(185), y1, scale(185), y1 + UICalendarPanel.HEIGHT);
} else {
int x1 = index % 7 * 31 - 1;
int y1 = index / 7 * 19;
g.drawRect(x1, y1, 31, 19);
int x1 = index % 7 * UICalendarPanel.WIDTH - 1;
int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawRect(x1, y1, UICalendarPanel.WIDTH, UICalendarPanel.HEIGHT);
}
}
@ -833,7 +839,7 @@ public class UICalendarPanel extends JPanel {
uiLabel.setHorizontalAlignment(SwingConstants.CENTER);
uiLabel.setBackground(null);
uiLabel.setBorder(null);
uiLabel.setPreferredSize(new Dimension(6, 10));
uiLabel.setPreferredSize(scale(new Dimension(6, 10)));
return uiLabel;
}

22
designer-base/src/main/java/com/fr/design/gui/frpane/JTreeControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.data.impl.TreeNodeAttr;
import com.fr.data.impl.TreeNodeWrapper;
@ -16,17 +17,26 @@ import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ToolBarDef;
import com.fr.form.ui.TreeEditor;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.*;
import java.awt.*;
import javax.swing.JTree;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeCellRenderer;
import javax.swing.tree.DefaultTreeCellRenderer;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.List;
@ -178,7 +188,7 @@ public class JTreeControlPane extends ControlPane {
this.creator = creators[0];
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"));
this.setSmallIcon(new LazyIcon("add"));
}
public void actionPerformed(ActionEvent e) {
@ -209,7 +219,7 @@ public class JTreeControlPane extends ControlPane {
public RemoveTreeNodeAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
this.setSmallIcon(new LazyIcon("remove"));
}
public void actionPerformed(ActionEvent e) {

24
designer-base/src/main/java/com/fr/design/gui/frpane/TreeSettingPane.java

@ -1,7 +1,7 @@
package com.fr.design.gui.frpane;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.impl.TableDataDictionary;
import com.fr.data.impl.TreeAttr;
import com.fr.data.impl.TreeNodeAttr;
import com.fr.data.impl.TreeNodeWrapper;
import com.fr.design.data.DataCreatorUI;
@ -13,17 +13,18 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.TreeDataCardPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.TreeComboBoxEditor;
import com.fr.form.ui.TreeEditor;
import com.fr.form.ui.tree.LayerConfig;
import com.fr.general.NameObject;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Arrays;
import javax.swing.JPanel;
import javax.swing.JComponent;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
public class TreeSettingPane extends BasicPane implements DataCreatorUI {
/**
@ -58,19 +59,18 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel buildWayPanel = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane();
buildWayPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
UILabel buildWayLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Way") + " :");
buildWayPanel.add(buildWayLabel);
UILabel buildWayLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Build_Way"));
buildBox = new UIComboBox(buildWay);
buildBox.addItemListener(e -> {
cardChanged(buildBox.getSelectedIndex());
});
buildWayPanel.add(buildBox);
buildWayPanel.add(row(20, cell(buildWayLabel), cell(buildBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX))).getComponent());
controlPane = new JTreeControlPane(new NameableCreator[]{treeNode},
new TreeDataCardPane());
autoBuildPane = new JTreeAutoBuildPane();
layerDataControlPane = new LayerDataControlPane();
buildWayPanel.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
this.add(buildWayPanel, BorderLayout.NORTH);
cardChanged(0);
}

5
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.frpane.tree.layer.config;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
@ -146,7 +147,7 @@ public class LayerDataControlPane extends ControlPane {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"));
this.setSmallIcon(new LazyIcon("add"));
}
public void actionPerformed(ActionEvent e) {
@ -173,7 +174,7 @@ public class LayerDataControlPane extends ControlPane {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
this.setMnemonic('R');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
this.setSmallIcon(new LazyIcon("remove"));
}
public void actionPerformed(ActionEvent e) {

6
designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java

@ -252,7 +252,7 @@ public class ColorSchemeComboBox extends UIComboBox {
} else {
FontMetrics fontMetrics = comp.getFontMetrics(comp.getFont());
//宽度是5倍的高加上4倍的留白
double width = (HEIGHT - 2 * Y) * MAX_COUNT + BLANK * (MAX_COUNT - 1);
double width = FineUIScale.scale((float) ((HEIGHT - 2 * Y) * MAX_COUNT + BLANK * (MAX_COUNT - 1)));
String fill = BLANK_SPACE;
//图形和文字之间留的宽度大于3倍的X
while (fontMetrics.stringWidth(fill) < width + 3 * X) {
@ -285,7 +285,7 @@ public class ColorSchemeComboBox extends UIComboBox {
double width = height * MAX_COUNT + BLANK * (MAX_COUNT - 1);
LinearGradientPaint linearGradientPaint = new LinearGradientPaint((float) X, (float) Y, (float) (X + width), (float) Y, new float[]{0f, 1f}, colors.toArray(new Color[colors.size()]));
g2d.setPaint(linearGradientPaint);
Rectangle2D rec = new Rectangle2D.Double(X, Y, width, height);
Rectangle2D rec = new Rectangle2D.Double(FineUIScale.scale((float) X), FineUIScale.scale((float) Y), FineUIScale.scale((float) width), FineUIScale.scale((float) height));
g2d.fill(rec);
}
@ -296,7 +296,7 @@ public class ColorSchemeComboBox extends UIComboBox {
double width = ((height + BLANK) * MAX_COUNT - size) / size;
for (int i = 0; i < size; i++) {
g2d.setPaint(colors.get(i));
Rectangle2D rec = new Rectangle2D.Double(X + (width + BLANK) * i, Y, width, height);
Rectangle2D rec = new Rectangle2D.Double(FineUIScale.scale((float) (X + (width + BLANK) * i)), FineUIScale.scale((float) Y), FineUIScale.scale((float) width), FineUIScale.scale((float) height));
g2d.fill(rec);
}
}

3
designer-base/src/main/java/com/fr/design/gui/ilist/JNameEdList.java

@ -1,5 +1,6 @@
package com.fr.design.gui.ilist;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.NameInspector;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.general.GeneralUtils;
@ -256,7 +257,7 @@ public class JNameEdList extends UIList implements CellEditorListener {
}
public int getIconWidth() {
return ICON_WIDTH;
return FineUIScale.scale(ICON_WIDTH);
}
public Rectangle createRect(Rectangle rect, int iconWidth) {

1
designer-base/src/main/java/com/fr/design/gui/style/FormatPane.java

@ -129,6 +129,7 @@ public class FormatPane extends AbstractBasicStylePane implements GlobalNameObse
Component[][] components = getComponent(fontPane, centerPane, typePane);
this.add(createContentPane(components), BorderLayout.CENTER);
centerPane.setVisible(!isTextOrNull());
}
protected JPanel createContentPane (Component[][] components) {

14
designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java

@ -1,8 +1,10 @@
package com.fr.design.javascript;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.CommitTabbedPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.write.submit.DBManipulationPane;
import com.fr.js.Commit2DBJavaScript;
@ -15,6 +17,9 @@ import java.awt.Dimension;
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;
public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaScript> {
private List dbmPaneList = new ArrayList();
private CommitTabbedPane commitTabbedPane;
@ -50,13 +55,18 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaS
}
this.add(cardPane, BorderLayout.CENTER);
JPanel btPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
this.add(btPane, BorderLayout.SOUTH);
JPanel btPane = new JPanel(new BorderLayout());
btPane.setPreferredSize(createCallbackBtnPanePreferredSize());
this.add(row(cell(btPane), cell(new UILabel())).getComponent(), BorderLayout.SOUTH);
addCallbackButton = javaScriptActionPane.createCallButton();
btPane.add(addCallbackButton);
}
protected Dimension createCallbackBtnPanePreferredSize(){
return FineUIScale.scale(new Dimension(110, 20));
}
/**
* 更新DBManipulationPane
*/

6
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -301,9 +301,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
this.setDefaultEditor(ParameterCombobox.class, new ParameterCombobox());
this.setDefaultEditor(ParameterSettingButton.class, new ParameterSettingButton());
this.setDefaultRenderer(ParameterSettingButton.class, new ParameterSettingButton());
this.createTable().getColumnModel().getColumn(2).setMaxWidth(60);
this.createTable().getColumnModel().getColumn(4).setMaxWidth(60);
this.createTable().getColumnModel().getColumn(5).setMaxWidth(50);
this.createTable().getColumnModel().getColumn(2).setMaxWidth(FineUIScale.scale(60));
this.createTable().getColumnModel().getColumn(4).setMaxWidth(FineUIScale.scale(60));
this.createTable().getColumnModel().getColumn(5).setMaxWidth(FineUIScale.scale(50));
}
@Override

4
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java

@ -24,6 +24,8 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author zhou
* @since 2012-5-29下午1:12:06
@ -53,7 +55,7 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane {
previewPane = new ImagePreviewPane();
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
borderPane.setBorder(new FineRoundBorder());
borderPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 145)));
borderPane.setPreferredSize(new Dimension(super.getPreferredSize().width, scale(145)));
borderPane.add(previewPane, BorderLayout.CENTER);
this.add(borderPane, BorderLayout.NORTH);
previewPane.addChangeListener(imageSizeChangeListener);

3
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.GraphHelper;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
@ -109,7 +110,7 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
infoPane.setPreferredSize(new Dimension(CONTENT_WIDTH, INFO_HEIGHT));
infoPane.setBackground(Color.WHITE);
infoPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7));
infoPane.setBorder(new ScaledEmptyBorder(0, IntervalConstants.INTERVAL_L7,0,IntervalConstants.INTERVAL_L7));
UILabel titleLabel = new UILabel(name);
titleLabel.setToolTipText(name);

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.ScreenResolution;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.FormThemeConfig;
@ -73,16 +74,16 @@ public class TemplateThemeGridPagesPane extends JPanel {
private void initializePane(@Nullable Window window) {
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
setBorder(new ScaledEmptyBorder(10, 10, 0, 10));
breadcrumbBar = new BreadcrumbBar();
breadcrumbBar.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
breadcrumbBar.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
add(breadcrumbBar, BorderLayout.NORTH);
contentPane = new JPanel();
contentPane.setBorder(new CompoundBorder(
new TopLineBorder(new Color(0xE0E0E1), 1),
BorderFactory.createEmptyBorder(10, 0, 0, 0)));
new ScaledEmptyBorder(10, 0, 0, 0)));
cardLayout = new CardLayout();
contentPane.setLayout(cardLayout);
add(contentPane, BorderLayout.CENTER);

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.design.designer.IntervalConstants;
@ -35,9 +36,9 @@ import java.util.Map;
public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
public static final int BLOCK_COUNT_ROW_LINE = 3;
public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1;
public static final int CONTENT_WIDTH = FineUIScale.scale(TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10);
public static final int CONTENT_WIDTH = TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_COUNT_ROW_LINE - 1) + FineUIScale.scale(10);
public static final int BLOCK_ROWS_PER_PAGE = 3;
public static final int CONTENT_HEIGHT = FineUIScale.scale(Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1)));
public static final int CONTENT_HEIGHT = Math.min(FineUIScale.scale(527), TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + FineUIScale.scale(BLOCK_GAP) * (BLOCK_ROWS_PER_PAGE + 1));
public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10;
private final AsyncThemeFetcher<T> asyncThemeFetcher;
@ -73,7 +74,7 @@ public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
setLayout(FRGUIPaneFactory.createBorderLayout());
setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
contentListPane.setBorder(BorderFactory.createEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10));
contentListPane.setBorder(new ScaledEmptyBorder(BLOCK_GAP, 0, BLOCK_GAP, 10));
contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP));
fillContentListPane();

3
designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedCellStyle;
@ -145,7 +146,7 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<ThemedCellStyl
super.paint(g);
if (selected) {
SELECTEDMARK_ICON.paintIcon(this, g, getWidth() - SELECTEDMARK_ICON.getIconWidth(), 5);
SELECTEDMARK_ICON.paintIcon(this, g, getWidth() - SELECTEDMARK_ICON.getIconWidth(), FineUIScale.scale(5));
}
}
}

5
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.dialog;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.theme.TemplateTheme;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.ibutton.UIButton;
@ -27,8 +28,8 @@ import java.util.Set;
public class TemplateThemeProfileDialog<T extends TemplateTheme> extends TemplateThemeDialog {
public static TemplateThemeProfilePane<? extends TemplateTheme> currentVisibleProfilePane;
public static final int CONTENT_WIDTH = 1010;
public static final int CONTENT_HEIGHT = 542;
public static final int CONTENT_WIDTH = FineUIScale.scale(1010);
public static final int CONTENT_HEIGHT = FineUIScale.scale(542);
private final TemplateThemeProfilePane<T> profilePane;
public TemplateThemeProfileDialog(Window parent, TemplateThemeProfilePane<T> profilePane) {

6
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme.edit.chart;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
@ -30,11 +32,11 @@ public abstract class AbstractChartStylePane extends BasicPane {
protected void initPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
double labelWidth = 90;
double totalWidth = 155;
double totalWidth = 190;
double p = TableLayout.PREFERRED;
double[] columnSize = {labelWidth, totalWidth};
JPanel gapTableLayoutPane = TableLayoutHelper.createGapTableLayoutPane(getComponent(), getRows(p), columnSize, 5, LayoutConstants.VGAP_LARGE);
gapTableLayoutPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
gapTableLayoutPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 0));
UIScrollPane rightTopPane = new UIScrollPane(gapTableLayoutPane);
rightTopPane.setBorder(BorderFactory.createEmptyBorder());
this.add(rightTopPane, BorderLayout.CENTER);

2
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -78,7 +78,7 @@ public class ChartFontPane extends BasicPane {
protected JPanel getContentPane(JPanel buttonPane) {
double labelWidth = 90;
double totalWidth = 155;
double totalWidth = 190;
double p = TableLayout.PREFERRED;
double[] rows = {p, p, p};
double[] columnSize = {labelWidth, totalWidth};

6
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.edit.chart;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIColorButton;
@ -35,6 +36,11 @@ public class ChartLabelStylePane extends AbstractChartStylePane {
public String getUILabelText() {
return Toolkit.i18nText("Fine-Design_Chart_Label_Character");
}
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, FineUIScale.scale(100));
}
};
initListener();
}

8
designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe.theme.ui;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.BorderFactory;
@ -67,15 +69,15 @@ public class BreadcrumbBar extends JPanel {
protected Component createSeparator() {
UILabel separator = new UILabel("/");
separator.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8));
separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, 17));
separator.setBorder(new ScaledEmptyBorder(0, 8, 0, 8));
separator.setPreferredSize(new Dimension(separator.getPreferredSize().width, FineUIScale.scale(17)));
return separator;
}
protected JButton createBreadcrumb(String text) {
JButton button = new BreadcrumbButton(text);
button.setPreferredSize(new Dimension(button.getPreferredSize().width, 17));
button.setPreferredSize(new Dimension(button.getPreferredSize().width, FineUIScale.scale(17)));
return button;
}

61
designer-base/src/main/java/com/fr/design/present/dict/FormulaDictPane.java

@ -2,27 +2,26 @@ package com.fr.design.present.dict;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.data.impl.FormulaDictionary;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.event.DocumentListener;
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.fix;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private static final int EDITOR_COLUMN = 15;
private static final int LEFT_BORDER = 5;
private static final int MAX_WIDTH = 30;
private FormulaEditor keyFormulaEditor;
private FormulaEditor valueFormulaEditor;
@ -32,45 +31,27 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private void initComponents() {
keyFormulaEditor = new FormulaEditor();
keyFormulaEditor.setColumns(EDITOR_COLUMN);
JPanel keyFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
keyFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
Icon icon = new LazyIcon("formula");
keyFormulaContainer.add(new JLabel(icon));
keyFormulaContainer.add(keyFormulaEditor);
valueFormulaEditor = new FormulaEditor();
valueFormulaEditor.setColumns(EDITOR_COLUMN);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
// html多行提示待优化
UILabel tag = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Dictionary_Display_Examples_Html"));
tag.setForeground(new Color(143, 143, 146));
JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER);
BaseFormula vf = BaseFormula.createFormulaBuilder().build("$$$");
valueFormulaEditor = new FormulaEditor(StringUtils.EMPTY, vf);
JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
valueFormulaContainer.add(new JLabel(icon));
valueFormulaContainer.add(valueFormulaEditor);
Component[][] components = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Actual_Value"), MAX_WIDTH, UILabel.LEFT), keyFormulaContainer},
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value"), MAX_WIDTH, UILabel.LEFT), valueFormulaContainer},
new Component[]{tag, null}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE);
JPanel panel = column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Actual_Value"))).weight(1),
row(cell(new JLabel(new LazyIcon("formula"))), fix(4), cell(keyFormulaEditor).weight(1)).weight(2)
),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Display_Value"))).weight(1),
row(cell(new JLabel(new LazyIcon("formula"))), fix(4), cell(valueFormulaEditor).weight(1)).weight(2)
),
cell(tag)
).getComponent();
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}
public void addChangeListener(DocumentListener l) {

3
designer-base/src/main/java/com/fr/design/scrollruler/BaseRuler.java

@ -1,5 +1,6 @@
package com.fr.design.scrollruler;
import com.fine.theme.utils.FineUIScale;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@ -100,7 +101,7 @@ public abstract class BaseRuler extends JComponent {
protected abstract RulerUI getRulerUI();
public Dimension getPreferredSize() {
return new Dimension(_WIDTH, _HEIGHT);
return FineUIScale.scale(new Dimension(_WIDTH, _HEIGHT));
}
// class RulerUnitItem extends UICheckBoxMenuItem {

49
designer-base/src/main/java/com/fr/design/style/FRFontPane.java

@ -209,35 +209,7 @@ public class FRFontPane extends BasicPane {
*/
public void populate(FRFont frFont) {
this.fontNameComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
this.fontSizeStylePane.fontComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
this.fontSizeStylePane.fontSizeComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
//foreground.
this.foregroundColorPane.setSelectObject(frFont.getForeground());
//update frFont.
this.underlineCombo.setSelectedLineStyle(frFont.getUnderline());
//effects
this.isStrikethroughCheckBox.setSelected(frFont.isStrikethrough());
this.isShadowCheckBox.setSelected(frFont.isShadow());
this.isSuperscriptCheckBox.setSelected(frFont.isSuperscript());
this.isSubscriptCheckBox.setSelected(frFont.isSubscript());
populateFont(frFont);
//actionlistner
ActionListener updatePreviewActionListener = new ActionListener() {
@ -250,7 +222,7 @@ public class FRFontPane extends BasicPane {
this.isSuperscriptCheckBox.addActionListener(updatePreviewActionListener);
this.isSubscriptCheckBox.addActionListener(updatePreviewActionListener);
//underline
//underline
this.underlineCombo.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
@ -267,6 +239,23 @@ public class FRFontPane extends BasicPane {
updatePreviewLabel();
}
private void populateFont(FRFont frFont) {
this.fontNameComboBox.setSelectedItem(frFont.getName());
// 字体
this.fontSizeStylePane.populate(frFont);
//foreground.
this.foregroundColorPane.setSelectObject(frFont.getForeground());
//update frFont.
this.underlineCombo.setSelectedLineStyle(frFont.getUnderline());
//effects
this.isStrikethroughCheckBox.setSelected(frFont.isStrikethrough());
this.isShadowCheckBox.setSelected(frFont.isShadow());
this.isSuperscriptCheckBox.setSelected(frFont.isSuperscript());
this.isSubscriptCheckBox.setSelected(frFont.isSubscript());
}
/**
* Update pane to get new font.
*/

35
designer-base/src/main/java/com/fr/design/style/FontSizeStylePane.java

@ -1,45 +1,33 @@
package com.fr.design.style;
import javax.swing.Box;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.FRFont;
import com.fr.design.utils.gui.GUICoreUtils;
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.row;
public class FontSizeStylePane extends JPanel {
public UIComboBox fontComboBox;
public UIComboBox fontSizeComboBox;
private static final String[] STYLES = {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Plain"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Bold"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Italic"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Bold_Italic")};
public FontSizeStylePane() {
this.init();
}
private void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
String[] styles = {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Plain"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Bold"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Italic"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Bold_Italic")};
fontComboBox = new UIComboBox(styles);
fontComboBox = new UIComboBox(STYLES);
fontSizeComboBox = new UIComboBox(FRFontPane.Font_Sizes);
this.add(row(
@ -50,4 +38,13 @@ public class FontSizeStylePane extends JPanel {
flex(0.2)
).getComponent());
}
/**
* Populate
* @param frFont
*/
public void populate(FRFont frFont) {
fontComboBox.setSelectedItem(STYLES[frFont.getStyle()]);
fontSizeComboBox.setSelectedItem(frFont.getSize());
}
}

19
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java

@ -1,8 +1,15 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* Created with IntelliJ IDEA.
* User: zheng
@ -15,19 +22,19 @@ public class DBManipulationInWidgetEventPane extends DBManipulationPane {
super();
}
protected void setBorderAndLayout(JPanel jPanel){
jPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
}
protected void addComponent(JPanel mainPane,JScrollPane addPane){
}
protected Dimension createConditionPanePreferredSize(){
return new Dimension(454, 30);
return FineUIScale.scale(new Dimension(454, 20));
}
protected boolean setJpVisible() {
return false;
}
protected Dimension createControlBtnPanePreferredSize(){
return new Dimension(92, 20);
return FineUIScale.scale(new Dimension(110, 20));
}
protected String setControlBtnPanePosition(){

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

@ -169,7 +169,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// peter:编辑的TablePane
JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
Dimension editTableDimension = createEditTablePreferredSize();
editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height);
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIVerticalScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@ -181,18 +182,15 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))))
.getComponent());
JPanel bottomPane = initBottomPane();
this.add(new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(column(10,
cell(northPane),
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))),
cell(bottomPane))
.getComponent(), BorderLayout.CENTER);
return contentPane;
}
});
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(column(10,
cell(northPane),
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))),
cell(bottomPane))
.getComponent(), BorderLayout.CENTER);
this.add(new UIScrollPane(contentPane));
initJTableColumn();
@ -265,17 +263,17 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
UpdateCheckBox.setEnabled(b);
}
private JPanel initBottomPane() {
protected JPanel initBottomPane() {
JPanel eventPane = new JPanel(new BorderLayout());
eventPane.setPreferredSize(createControlBtnPanePreferredSize());
eventPane.add(addEventButton(), BorderLayout.WEST);
eventPane.add(addEventButton());
JPanel conditionPane = this.createConditionPane();
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
btPane.add(column(5,
cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))),
cell(eventPane)
row(cell(eventPane), cell(new UILabel()))
).getComponent());
return btPane;
}
@ -316,8 +314,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree);
jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40)));
addComponent(conditionPane, jp);
jp.setPreferredSize(createJpPreferredSize());
jp.setVisible(setJpVisible());
String submitCondition = Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition");
UIButton addSubmitConditionButton = new UIButton(submitCondition);
addSubmitConditionButton.setToolTipText(submitCondition);
@ -355,12 +353,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
});
JPanel controlBtnPane = new JPanel(new BorderLayout());
controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20)));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH);
conditionPane.add(row(
cell(jp).weight(1.0),
cell(new Spacer(122).add(controlBtnPane))
).getComponent());
conditionPane.setPreferredSize(createConditionPanePreferredSize());
conditionPane.add(controlBtnPane, setControlBtnPanePosition());
conditionPane.add(jp, BorderLayout.CENTER);
return conditionPane;
}
@ -373,13 +370,25 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
mainPane.add(addPane, BorderLayout.CENTER);
}
protected Dimension createEditTablePreferredSize() {
return FineUIScale.scale(new Dimension(280, 180));
}
protected Dimension createConditionPanePreferredSize() {
return FineUIScale.scale(new Dimension(454, 80));
return FineUIScale.scale(new Dimension(454, 60));
}
protected boolean setJpVisible() {
return true;
}
protected Dimension createJpPreferredSize() {
return FineUIScale.scale(new Dimension(280, 60));
}
protected Dimension createControlBtnPanePreferredSize() {
return new Dimension(110, 20);
return FineUIScale.scale(new Dimension(110, 20));
}
protected String setControlBtnPanePosition() {

5
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H27C27.5523 6 28 6.44772 28 7V9C28 9.55228 27.5523 10 27 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M10 23C10 22.4477 10.4477 22 11 22H21C21.5523 22 22 22.4477 22 23V25C22 25.5523 21.5523 26 21 26H11C10.4477 26 10 25.5523 10 25V23Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 15C12 14.4477 12.4477 14 13 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H13C12.4477 18 12 17.5523 12 17V15Z" fill="#5493F2"/>
<path d="M12 23C12 22.4477 12.4477 22 13 22H27C27.5523 22 28 22.4477 28 23V25C28 25.5523 27.5523 26 27 26H13C12.4477 26 12 25.5523 12 25V23Z" fill="#5493F2"/>
<path d="M12 7C12 6.44772 12.4477 6 13 6H27C27.5523 6 28 6.44772 28 7V9C28 9.55228 27.5523 10 27 10H13C12.4477 10 12 9.55228 12 9V7Z" fill="#5493F2"/>
<path d="M7 10C7.55228 10 8 10.4477 8 11L8 21C8 21.5523 7.55228 22 7 22L5 22C4.44771 22 4 21.5523 4 21L4 11C4 10.4477 4.44772 10 5 10L7 10Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 730 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H19C19.5523 14 20 14.4477 20 15V17C20 17.5523 19.5523 18 19 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 23C4 22.4477 4.44772 22 5 22H19C19.5523 22 20 22.4477 20 23V25C20 25.5523 19.5523 26 19 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H19C19.5523 6 20 6.44772 20 7V9C20 9.55228 19.5523 10 19 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M27 10C27.5523 10 28 10.4477 28 11L28 21C28 21.5523 27.5523 22 27 22L25 22C24.4477 22 24 21.5523 24 21L24 11C24 10.4477 24.4477 10 25 10L27 10Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 725 B

5
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 23C4 22.4477 4.44772 22 5 22H27C27.5523 22 28 22.4477 28 23V25C28 25.5523 27.5523 26 27 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 15C4 14.4477 4.44772 14 5 14H27C27.5523 14 28 14.4477 28 15V17C28 17.5523 27.5523 18 27 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M10 7C10 6.44772 10.4477 6 11 6H21C21.5523 6 22 6.44772 22 7V9C22 9.55228 21.5523 10 21 10H11C10.4477 10 10 9.55228 10 9V7Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

6
designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 15C4 14.4477 4.44772 14 5 14H19C19.5523 14 20 14.4477 20 15V17C20 17.5523 19.5523 18 19 18H5C4.44772 18 4 17.5523 4 17V15Z" fill="#5493F2"/>
<path d="M4 23C4 22.4477 4.44772 22 5 22H19C19.5523 22 20 22.4477 20 23V25C20 25.5523 19.5523 26 19 26H5C4.44772 26 4 25.5523 4 25V23Z" fill="#5493F2"/>
<path d="M4 7C4 6.44772 4.44772 6 5 6H19C19.5523 6 20 6.44772 20 7V9C20 9.55228 19.5523 10 19 10H5C4.44772 10 4 9.55228 4 9V7Z" fill="#5493F2"/>
<path d="M27 6C27.5523 6 28 6.44772 28 7L28 17C28 17.5523 27.5523 18 27 18L25 18C24.4477 18 24 17.5523 24 17L24 7C24 6.44771 24.4477 6 25 6L27 6Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 718 B

49
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -76,8 +76,16 @@
"chtFile": "filetree/filetype/chtFile.svg",
"classFile": "filetree/filetype/classFile.svg",
"cpt_locked": "filetree/filetype/cpt_locked.svg",
"excel_import": "filetree/filetype/excel_import.svg",
"excelFile": "filetree/filetype/excelFile.svg",
"excel_import": {
"normal": "filetree/filetype/excel_import.svg",
"disable": "filetree/filetype/excel_import_disable.svg",
"white": "filetree/filetype/excel_import_white.svg"
},
"excelFile": {
"normal": "filetree/filetype/excelFile.svg",
"disable": "filetree/filetype/excelFile_disable.svg",
"white": "filetree/filetype/excelFile_white.svg"
},
"flashFile": "filetree/filetype/flashFile.svg",
"frm_locked": "filetree/filetype/frm_locked.svg",
"fvs_locked": "filetree/filetype/fvs_locked.svg",
@ -88,15 +96,35 @@
"jpgFile": "filetree/filetype/jpgFile.svg",
"jsFile": "filetree/filetype/jsFile.svg",
"jspFile": "filetree/filetype/jspFile.svg",
"pdfFile": "filetree/filetype/pdfFile.svg",
"pdfFile": {
"normal": "filetree/filetype/pdfFile.svg",
"disable": "filetree/filetype/pdfFile_disable.svg",
"white": "filetree/filetype/pdfFile_white.svg"
},
"pngFile": "filetree/filetype/pngFile.svg",
"sqlFile": "filetree/filetype/sqlFile.svg",
"wordFile": "filetree/filetype/wordFile.svg",
"wordFile": {
"normal": "filetree/filetype/wordFile.svg",
"disable": "filetree/filetype/wordFile_disable.svg",
"white": "filetree/filetype/wordFile_white.svg"
},
"xlsFile": "filetree/filetype/xlsFile.svg",
"xmlFile": "filetree/filetype/xmlFile.svg",
"csvFile": "filetree/filetype/csvFile.svg",
"svgFile": "filetree/filetype/svgFile.svg",
"txtFile": "filetree/filetype/txtFile.svg",
"csvFile": {
"normal": "filetree/filetype/csvFile.svg",
"disable": "filetree/filetype/csvFile_disable.svg",
"white": "filetree/filetype/csvFile_white.svg"
},
"svgFile": {
"normal": "filetree/filetype/svgFile.svg",
"disable": "filetree/filetype/svgFile_disable.svg",
"white": "filetree/filetype/svgFile_white.svg"
},
"txtFile": {
"normal": "filetree/filetype/txtFile.svg",
"disable": "filetree/filetype/txtFile_disable.svg",
"white": "filetree/filetype/txtFile_white.svg"
},
"cellattr": "propertiestab/cellattr.svg",
"cellattr_disabled": "propertiestab/cellattr_disabled.svg",
"cellattr_selected": "propertiestab/cellattr_selected.svg",
@ -406,7 +434,12 @@
"information":"tip/information.svg",
"new_information":"tip/new_information.svg",
"success":"tip/success.svg",
"warning":"tip/warning.svg"
"warning":"tip/warning.svg",
"layout_top": "layout/layout_top.svg",
"layout_bottom": "layout/layout_bottom.svg",
"layout_left": "layout/layout_left.svg",
"layout_right": "layout/layout_right.svg",
"layout_top_right": "layout/layout_top_right.svg"
}
}

2
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -46,7 +46,7 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
this.setLayout(new BorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
// 外部轮廓大小固定,适配滚动面板
this.setPreferredSize(new Dimension(getWidth(), FineUIScale.scale(900)));
this.setPreferredSize(new Dimension(getWidth(), FineUIScale.scale(800)));
}
@Override

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java

@ -14,6 +14,8 @@ import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* Created by shine on 2019/08/30.
*/
@ -47,10 +49,10 @@ public class LineTypeComboBox extends UIComboBox {
switch (this.lineType) {
case SOLID:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2);
GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2);
break;
case DASHED:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2, Constants.LINE_DASH);
GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2, Constants.LINE_DASH);
break;
default:
break;
@ -59,7 +61,7 @@ public class LineTypeComboBox extends UIComboBox {
}
public Dimension getPreferredSize() {
return new Dimension(60, 16);
return scale(new Dimension(60, 16));
}
public Dimension getMinimumSize() {

11
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseUtils;
@ -186,11 +187,11 @@ public class VanChartPlotLegendPane extends BasicPane {
Integer[] valueArray = {Constants.TOP, Constants.BOTTOM, Constants.LEFT, Constants.RIGHT, Constants.RIGHT_TOP};
Icon[] iconArray = {
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top.png"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_bottom.png"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_left.png"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_right.png"),
BaseUtils.readIcon("/com/fr/design/images/chart/ChartLegend/layout_top_right.png")
new LazyIcon("layout_top"),
new LazyIcon("layout_bottom"),
new LazyIcon("layout_left"),
new LazyIcon("layout_right"),
new LazyIcon("layout_top_right")
};
location = new UIButtonGroup<Integer>(iconArray, valueArray);

7
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style;
import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
@ -51,9 +52,9 @@ import static com.fine.swing.ui.layout.Layouts.row;
public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
private static final long serialVersionUID = -2438898431228882682L;
private static final int WIDTH = 165;
private static final int HEIGHT = 100;
private static final int GAP = 20;
private static final int WIDTH = FineUIScale.scale(165);
private static final int HEIGHT = FineUIScale.scale(100);
private static final int GAP = FineUIScale.scale(20);
private UICheckBox isTitleVisible;
private JPanel titlePane;

13
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -9,6 +9,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
@ -46,7 +47,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private UIButtonGroup<Integer> position;
private UIButtonGroup<Boolean> autoAdjust;
private UIButtonGroup<Integer> orientation;
private UIToggleButton tractionLine;
private UICheckBox tractionLine;
private ColorSelectBox backgroundColor;
private VanChartBorderWithShapePane borderPane;
@ -242,8 +243,14 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
if (plot.isSupportLeadLine()) {
tractionLine = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
panel.add(tractionLine, BorderLayout.SOUTH);
tractionLine = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
Component[][] comps = new Component[1][2];
comps[0] = new Component[]{new UILabel(), tractionLine};
double[] row = new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] col = new double[]{TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
getLabelPositionPane(comps, row, col);
panel.add(getLabelPositionPane(comps, row, col), BorderLayout.SOUTH);
initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},

2
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java

@ -94,7 +94,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
@Override
protected Icon getButtonIcon() {
return new LazyIcon("delete");
return new LazyIcon("remove");
}
@Override

2
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java

@ -31,7 +31,7 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
protected UIObserverListener listener;
public TinyFormulaWithButtonPane(String text) {
this(text, new LazyIcon("delete"));
this(text, new LazyIcon("remove"));
}
public TinyFormulaWithButtonPane(String text, Icon icon) {

5
designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

@ -9,8 +9,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.CellWidgetCardPane;
import com.fr.design.widget.EastCellWidgetCardPane;
import com.fr.design.widget.WidgetManageCardPane;
import com.fr.design.widget.FloatWidgetManageCardPane;
import com.fr.design.widget.WidgetPane;
import com.fr.form.ui.*;
@ -48,7 +47,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
final WidgetPane widgetPane = new WidgetPane() {
@Override
protected CellWidgetCardPane initWidgetCardPane(ElementCasePane pane) {
return new EastCellWidgetCardPane(pane);
return new FloatWidgetManageCardPane(pane);
}
};
widgetPane.populate(widget);

4
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/DesensitizationCellPane.java

@ -119,8 +119,8 @@ public class DesensitizationCellPane extends BasicBeanPane {
private void setInsideBorder(Color borderColor) {
ruleButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, borderColor));
emptyTextField.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, borderColor));
ruleTextField.setBorder(FineBorderFactory.createDefaultUnderlineBorder());
emptyTextField.setBorder(FineBorderFactory.createBorderWithPadding(BorderFactory.createMatteBorder(0, 0, 0, 1, borderColor)));
ruleTextField.setBorder(FineBorderFactory.createBorderWithPadding(FineBorderFactory.createDefaultUnderlineBorder()));
}

7
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java

@ -4,6 +4,7 @@ import com.fine.theme.utils.FineUIScale;
import com.fr.base.CellBorderStyle;
import com.fr.base.NameStyle;
import com.fr.base.Style;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
@ -33,6 +34,9 @@ import java.text.Format;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class StylePane extends BasicPane implements UIObserver {
public static final String[] FOLLOWING_THEME_STRING_ARRAYS = new String[]{
Toolkit.i18nText("Fine-Design_Style_Follow_Theme"),
@ -158,9 +162,8 @@ public class StylePane extends BasicPane implements UIObserver {
JPanel container = new JPanel(new BorderLayout(0, IntervalConstants.INTERVAL_L1));
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Style_Applying"));
uiLabel.setPreferredSize(new Dimension(uiLabel.getPreferredSize().width, FineUIScale.scale(20)));
container.add(uiLabel, BorderLayout.NORTH);
nameStyleListPane.setBorder(BorderFactory.createEmptyBorder());
container.add(nameStyleListPane, BorderLayout.CENTER);
container.add(column(LayoutConstants.VERTICAL_GAP, cell(uiLabel), cell(nameStyleListPane)).getComponent());
return container;
}

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

@ -36,7 +36,7 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板
private ArrayList<JPanel> paneList;
private BaseLayoutContainer tabsHeaderIconPane;
protected BaseLayoutContainer tabsHeaderIconPane;
private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器
@ -55,6 +55,10 @@ public class CellWidgetCardPane extends BasicPane {
private ElementCasePane pane;
protected JPanel center;
protected CardLayout tabbedPane;
public CellWidgetCardPane(ElementCasePane pane) {
this.pane = pane;
}

6
designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java

@ -19,12 +19,6 @@ import java.awt.Component;
*/
public class EastCellWidgetCardPane extends CellWidgetCardPane {
private CardLayout tabbedPane;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
public EastCellWidgetCardPane(ElementCasePane pane) {
super(pane);
}

25
designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java

@ -0,0 +1,25 @@
package com.fr.design.widget;
import com.fr.design.mainframe.ElementCasePane;
/**
* 悬浮窗内嵌控件面板
* @author Renekton
* @since on 2024/08/16
* Created on 2024/08/16
*/
public class FloatWidgetManageCardPane extends EastCellWidgetCardPane {
/**
* 悬浮窗控件管理
* @param pane 面板
*/
public FloatWidgetManageCardPane(ElementCasePane pane) {
super(pane);
}
@Override
protected WidgetEventPane initWidgetEventPane(ElementCasePane pane){
return new WidgetEventPaneNoPop(pane);
}
}

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

@ -1,5 +1,7 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import javax.swing.*;
@ -17,19 +19,19 @@ public class SmartInsertDBManipulationInWidgetEventPane extends SmartInsertDBMan
super(ePane);
}
protected void setBorderAndLayout(JPanel jPanel){
jPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
}
protected void addComponent(JPanel mainPane,JScrollPane addPane){
}
protected Dimension createConditionPanePreferredSize(){
return new Dimension(454, 30);
return FineUIScale.scale(new Dimension(454, 20));
}
protected boolean setJpVisible() {
return false;
}
protected Dimension createControlBtnPanePreferredSize(){
return new Dimension(92, 20);
return FineUIScale.scale(new Dimension(110, 20));
}
protected String setControlBtnPanePosition(){

Loading…
Cancel
Save