Browse Source

Pull request #14603: REPORT-130408 - 模板主题设置窗缩放问题 & REPORT-130959 - 多个待保存项 & REPORT-130849 - 设计器操作-控件设置-提交入库页面问题 有滚轮 & REPORT-130914 - 单元格元素-图表缩放问题合集

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

* commit 'b40ffe183acaf81343321c8289b7661770a886b2':
  边框问题
  边框问题
  修改width
  单元格元素-数据列-过滤普通未换行
  模板主题配置;单元格元素缩放,新增图标
newui
Renekton-张世豪 4 months ago
parent
commit
1175e393dc
  1. 8
      designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java
  2. 8
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  3. 9
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  4. 15
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  5. 44
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  6. 6
      designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java
  7. 14
      designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java
  8. 6
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  9. 4
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  10. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  11. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  12. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java
  13. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeProfileDialog.java
  14. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/AbstractChartStylePane.java
  15. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  16. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartLabelStylePane.java
  17. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/ui/BreadcrumbBar.java
  18. 19
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java
  19. 59
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  20. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_bottom.svg
  21. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_left.svg
  22. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_right.svg
  23. 5
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top.svg
  24. 6
      designer-base/src/main/resources/com/fine/theme/icon/layout/layout_top_right.svg
  25. 7
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  26. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java
  27. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  28. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  29. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  30. 5
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java
  31. 6
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  32. 6
      designer-realize/src/main/java/com/fr/design/widget/EastCellWidgetCardPane.java
  33. 25
      designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java
  34. 14
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

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

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.
@ -199,7 +200,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);
@ -207,7 +208,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();
}
@ -375,7 +376,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);
@ -391,7 +392,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));
}
}
}

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

@ -44,6 +44,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 +88,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 +559,12 @@ 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(0, 0, 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() {

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

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

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

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

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

@ -168,7 +168,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 UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@ -180,18 +181,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();
@ -264,17 +262,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;
}
@ -315,8 +313,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);
@ -354,12 +352,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;
}
@ -372,13 +369,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

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

@ -406,7 +406,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"
}
}

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},

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

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