Browse Source

Merge pull request #14726 in DESIGN/design from fbp/release to fbp/feature

* commit '765e7d57ad8bcd4e352bc7b8427d698210e8ba84':
  REPORT-132524 FBP-普通预览-工具栏-工具栏上的邮件按钮无法正常显示
  REPORT-132480 【fr-fbp回归】数据集复制粘贴删除操作非常慢
  REPORT-132480 【fr-fbp回归】数据集复制粘贴删除操作非常慢
  REPORT-132159 fix: 修复国际化接口传参丢失了从请求获取的默认值
  无JIRA任务 改了前端bug,更新一波js
  无JIRA任务 改了前端bug,更新一波js
  REPORT-130034 - 邮件入口屏蔽
  REPORT-114392 FR-FBP版本本地设计适配 优化web资源读取
  REPORT-130034 - 邮件入口屏蔽
  REPORT-131064 设计器导出模板失败,报错模板解析错误  【问题原因】1、导出时,模版路径默认传的参数为以“reportlets”开始的,读取模板时会再次拼接“reportlets”,导致找不到模板文件。 2、当前的导出结果默认是返回字节数组,设计器启动的情况下,未将字节数组写入到流中。  【改动思路】1、判断存在“reportlets”时,删除。 2、将字节数组写入到流中
  REPORT-131068 远程设计权限校验不生效
  REPORT-114392 FR-FBP版本本地设计适配 优化关闭模板
  主题编辑图标命名修改
  newui缩放
  newui缩放
  newui缩放
fbp/feature
superman 3 months ago
parent
commit
5be56b66c4
  1. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  2. 20
      designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java
  3. 5
      designer-base/src/main/java/com/fr/design/backup/DesignContext.java
  4. 4
      designer-base/src/main/java/com/fr/design/condition/DSColumnLiteConditionPane.java
  5. 10
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  6. 4
      designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java
  7. 2
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java
  8. 10
      designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
  9. 3
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  10. 2
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  11. 4
      designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
  12. 1
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  13. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  14. 13
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java
  15. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java
  16. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  17. 2
      designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java
  18. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java
  19. 19
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  20. 15
      designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java
  21. 8
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  22. 5
      designer-base/src/main/resources/com/fine/theme/icon/theme_edit.svg
  23. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  24. 6
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  25. 102
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js
  26. 2
      designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java
  27. 41
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  28. 8
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

1
designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java

@ -51,6 +51,7 @@ public interface FineUIStyle {
String WHITE_BUTTON = "whiteButton";
String ORIGINAL_BUTTON = "originalButton";
String DETAIL_LABEL = "detailLabel";
String WIDGET_EVENT_LABEL = "widgetEventLabel";
/**

20
designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

@ -15,8 +15,8 @@ import com.fr.file.filter.ChooseFileFilter;
import com.fr.io.exporter.DesignExportType;
import com.fr.io.exporter.ExporterKey;
import com.fr.log.FineLoggerFactory;
import com.fanruan.product.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants;
import com.fr.third.jodd.io.FileNameUtil;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.exporter.TemplateExportOperator;
@ -211,19 +211,15 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT
}
private void dealExporter(OutputStream outputStream, String path, final Map<String, Object> para) throws Exception {
if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) {
path = path.substring(ProjectConstants.REPORTLETS_NAME.length());
}
// 没有办法处理这个 isLocal 判断,因为一个是修改参数传递结果,一个是返回值做结果
// todo 后续想想办法
if (WorkContext.getCurrent().isLocal()) {
WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportKey(), exportType(), outputStream, path, para);
} else {
byte[] contents =
WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportKey(), exportType(), null, path, para);
byte[] contents =
WorkContext.getCurrent().get(TemplateExportOperator.class)
.export(exportKey(), exportType(), null, path, para);
outputStream.write(contents);
}
outputStream.write(contents);
}
@Override

5
designer-base/src/main/java/com/fr/design/backup/DesignContext.java

@ -7,6 +7,7 @@ import com.fr.stable.StringUtils;
import javax.servlet.ServletContext;
import java.io.File;
import java.util.Properties;
/**
@ -17,7 +18,7 @@ import java.util.Properties;
* Created on 2024/5/14
*/
public class DesignContext extends CarinaApplicationContext {
public static final String WEB_INF = "\\WEB-INF";
public static final String WEB_INF = "WEB-INF";
private String designWebInfPath;
private String designDataPath;
@ -39,7 +40,7 @@ public class DesignContext extends CarinaApplicationContext {
public void setDesignWebInfPath(String designWebInfPath) {
this.designWebInfPath = designWebInfPath;
if (StringUtils.isNotEmpty(this.designWebInfPath)) {
this.designDataPath = this.designWebInfPath.replace(WEB_INF, StringUtils.EMPTY);
this.designDataPath = this.designWebInfPath.replace(File.separatorChar + WEB_INF, StringUtils.EMPTY);
}
FineLoggerFactory.getLogger().info("[DesignContext] designWebInfPath:{}, designDataPath:{}", this.designWebInfPath, this.designDataPath);
}

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

@ -123,8 +123,8 @@ 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, null},
{operatorLabel, conditionOPComboBox, conditionValuePane}};
{ columLabel, operatorLabel, null},
{ keyColumnPane,conditionOPComboBox, conditionValuePane}};
double p = TableLayout.PREFERRED;
double rowSize[] = { p, p };

10
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -11,6 +11,7 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.cache.DesignCacheManager;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.BasicTableDataUtils;
import com.fr.design.data.DesignTableDataManager;
@ -1120,6 +1121,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
BasicDialog basicDialog = basicPane.showSmallWindow(SwingUtilities.getWindowAncestor(TableDataTreePane.this), new DialogActionAdapter() {
@Override
public void doOk() {
DesignCacheManager.processByCacheTableData(this::processRemove);
}
private void processRemove() {
List selectedValues = tableDataCheckBoxPane.getSelectedObjects();
// 删除时如果正在搜索,跳回原树
if (TableDataTreeSearchManager.getInstance().isInSearchMode()) {
@ -1133,7 +1138,6 @@ public class TableDataTreePane extends BasicTableDataTreePane {
}
}
}
@Override
public void doCancel() {
super.doCancel();
@ -1191,6 +1195,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
@Override
public void actionPerformed(ActionEvent e) {
DesignCacheManager.processByCacheTableData(this::doPaste);
}
private void doPaste() {
// 粘贴时如果正在搜索,跳回原树
if (TableDataTreeSearchManager.getInstance().isInSearchMode()) {
TableDataTreeSearchManager.getInstance().outOfSearchMode();

4
designer-base/src/main/java/com/fr/design/env/HttpWorkspaceConnector.java vendored

@ -4,10 +4,10 @@ import com.fanruan.workplace.http.HttpConstants;
import com.fanruan.workplace.http.HttpServiceMap;
import com.fanruan.workplace.http.RepositoryManager;
import com.fanruan.workplace.http.info.Stub;
import com.fr.exception.RemoteDesignPermissionDeniedException;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.engine.exception.RemoteDesignConnectionException;
import com.fr.workspace.engine.exception.RemoteDesignNoAuthException;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import com.fr.workspace.server.repository.compatible.register.CompatibleRegister;
import com.fr.workspace.server.repository.connect.FineWorkspaceHttpClient;
@ -89,7 +89,7 @@ public class HttpWorkspaceConnector implements WorkspaceConnector {
// 检查远程权限
if (!checkRemoteAuthority(connection)) {
// 无权限则抛出无权限的错
throw new RemoteDesignPermissionDeniedException();
throw new RemoteDesignNoAuthException();
}
}

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

@ -847,7 +847,7 @@ public class MultiTemplateTabPane extends Row {
setIsCloseCurrent(true);
}
closeFormat(template);
closeSpecifiedTemplate(template);
DesignCacheManager.processByCacheTableData(() -> closeSpecifiedTemplate(template));
DesignerContext.getDesignerFrame().getContentFrame().repaint();
isShowList = false;
} else {

10
designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java

@ -32,6 +32,9 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class JavaEditorPane extends BasicPane {
private RSyntaxTextArea javaText;
@ -83,13 +86,12 @@ public class JavaEditorPane extends BasicPane {
}
UIScrollPane jt = new UIScrollPane(javaText);
JPanel toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
JPanel toolbarPane = new JPanel(new BorderLayout());
UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save"));
saveButton.setAction(new SaveAction());
UIButton compileButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Compile"));
compileButton.setAction(new CompilerAction());
toolbarPane.add(saveButton);
toolbarPane.add(compileButton);
toolbarPane.add(row(8, cell(saveButton), cell(compileButton)).getComponent());
this.add(toolbarPane, BorderLayout.NORTH);
this.add(jt, BorderLayout.CENTER);
@ -155,7 +157,7 @@ public class JavaEditorPane extends BasicPane {
private void saveTextToFile(String text) {
if (StringUtils.isEmpty(text)) {
return;
return;
}
if (StringUtils.isEmpty(className)) {
return;

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

@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
@ -567,7 +568,7 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
};
label.setBorder(BorderFactory.createMatteBorder(scale(1), 0, scale(1), 0, FineUIUtils.getUIColor("fill.hover", "fill.hover")));
label.setForeground(UIManager.getColor("List.wrapper.text.fontColor"));
FineUIStyle.setStyle(label, FineUIStyle.WIDGET_EVENT_LABEL);
label.setFont(label.getFont().deriveFont(scale(11F)));
label.setPreferredSize(new Dimension(this.getPreferredSize().width, scale(24)));
this.nameEdList = nameEdList;

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

@ -159,7 +159,7 @@ public class UICalendarPanel extends JPanel {
private JPanel createNorthPane() {
JPanel pNorth = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
pNorth.setBackground(new Color(0xFFFFFF));
pNorth.setPreferredSize(new Dimension(1, 22));
pNorth.setPreferredSize(scale(new Dimension(1, 22)));
pNorth.add(Box.createHorizontalStrut(5));
pNorth.add(createSkipButton(Calendar.YEAR, -1, new Icon[]{

4
designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java

@ -7,6 +7,8 @@ import java.awt.Dimension;
import java.text.SimpleDateFormat;
import java.util.Date;
import static com.fine.theme.utils.FineUIScale.scale;
public class UIDayLabel extends UILabel {
@ -29,7 +31,7 @@ public class UIDayLabel extends UILabel {
setHorizontalAlignment(UILabel.CENTER);
setFont(DesignUtils.getDefaultGUIFont());
this.date = date;
setPreferredSize(new Dimension(30, 18));
setPreferredSize(scale(new Dimension(30, 18)));
if (isSmallLabel) {
setText(dayFormat.format(date));
} else {

1
designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java

@ -48,7 +48,6 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
contentDBManiPane = new ArrayList();
contentDBManiPane.add(createDBManipulationPane());
paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane));
paneList.add(initEmaiPane());
if (isWorkBookValid()) {
paneList.add(new ExportJavaScriptPane());
}

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

@ -1,5 +1,6 @@
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.GraphHelper;
@ -50,7 +51,7 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
private final TemplateThemeProfilePane<T> profilePane;
private final Icon theme4currentTemplateMarkIcon = IOUtils.readIcon("/com/fr/design/form/images/theme4currentTemplate.png");
private final Icon theme4NewTemplateMarkIcon= IOUtils.readIcon("/com/fr/design/form/images/theme4newTemplate.png");
private final Icon profileIcon = IOUtils.readIcon("/com/fr/design/icon/icon_edit.png");
private final Icon profileIcon = new LazyIcon("theme_edit");
private final boolean displayTheme4NewTemplateMarker;
private final ThumbnailPane thumbnailPane;

13
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.dialog;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -14,17 +15,19 @@ import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author Starryi
* @version 1.0
* Created by Starryi on 2021/8/16
*/
public abstract class TemplateThemeDialog extends JDialog {
public static final int DIALOG_TITLE_HEIGHT = 28;
public static final int DIALOG_TITLE_HEIGHT = scale(28);
public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = 30;
public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = 10;
public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = 20;
public static final int DIALOG_BOTTOM_ACTION_BAR_HEIGHT = scale(30);
public static final int DIALOG_BOTTOM_ACTION_BUTTON_GAP = scale(10);
public static final int DIALOG_BOTTOM_ACTION_BUTTON_HEIGHT = scale(20);
private final JPanel contentContainer;
private final JPanel actionContainer;
@ -97,7 +100,7 @@ public abstract class TemplateThemeDialog extends JDialog {
private JPanel createActionsContainer(int align, UIButton... buttons) {
JPanel container = new JPanel(new FlowLayout(align, DIALOG_BOTTOM_ACTION_BUTTON_GAP, 0));
int paddingVertical = getPaddingVertical();
container.setBorder(BorderFactory.createEmptyBorder(paddingVertical, 0, paddingVertical, 0));
container.setBorder(new ScaledEmptyBorder(paddingVertical, 0, paddingVertical, 0));
if (buttons == null || buttons.length == 0) {
return container;

6
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java

@ -9,14 +9,16 @@ import com.fr.design.mainframe.theme.TemplateThemeGridPane;
import javax.swing.JPanel;
import java.awt.Window;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author Starryi
* @version 1.0
* Created by Starryi on 2021/8/13
*/
public class TemplateThemeGridPagesDialog extends TemplateThemeDialog implements TemplateThemeGridPagesPane.PageChangeListener {
public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 48;
public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37;
public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + scale(48);
public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + scale(37);
protected TemplateThemeGridPagesPane overallPane;

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

@ -89,7 +89,7 @@ public class ChartFontPane extends BasicPane {
new Component[]{null, buttonPane}
};
return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 0);
return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 10);
}
public String getUILabelText() {

2
designer-base/src/main/java/com/fr/design/style/color/ColorChooserPreview.java

@ -30,7 +30,7 @@ public class ColorChooserPreview extends JPanel {
private String sampleText;
private static final int SWATH_WIDTH = 50;
private static final int SWATH_WIDTH = FineUIScale.scale(50);
private Color oldColor = null;

4
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java

@ -16,6 +16,8 @@ import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* 颜色选择器更多颜色对话框
@ -85,7 +87,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
private void initComponent() {
this.setLayout(new BorderLayout());
this.add(pane,BorderLayout.NORTH);
this.setBasicDialogSize(545,500);
this.setBasicDialogSize(scale(545),scale(500));
this.setResizable(false);
this.applyClosingAction();

19
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -38,6 +38,7 @@ import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/**
@ -124,17 +125,17 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
/**
* The default width of the gradient image.
*/
private static final int IMG_WIDTH = 180;
private static final int IMG_WIDTH = scale(180);
/**
* The default height of the gradient image.
*/
private static final int IMG_HEIGHT = 180;
private static final int IMG_HEIGHT = scale(180);
/**
* The default width of the track gradient.
*/
private static final int TRACK_WIDTH = 12;
private static final int TRACK_WIDTH = scale(12);
/**
* The UILabel for Red.
@ -597,7 +598,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
*/
protected void buildChooser() {
setLayout(new BorderLayout(10, 0));
setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), FineUIScale.scale(180)));
setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), scale(180)));
add(buildRightPanel(), BorderLayout.CENTER);
JPanel container = new JPanel();
container.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0));
@ -623,9 +624,9 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
container.add(gradientPanel);
container.add(layeredPane);
layeredPane.setPreferredSize(FineUIScale.scale(new Dimension(12, 180)));
slider.setSize(FineUIScale.scale(new Dimension(12, 180)));
trackPanel.setSize(FineUIScale.scale(new Dimension(12, 180)));
layeredPane.setPreferredSize(scale(new Dimension(12, 180)));
slider.setSize(scale(new Dimension(12, 180)));
trackPanel.setSize(scale(new Dimension(12, 180)));
add(container, BorderLayout.WEST);
slider.addChangeListener(new SliderChangeListener());
@ -638,7 +639,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createGradientPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return FineUIScale.scale(new Dimension(IMG_WIDTH, IMG_HEIGHT));
return scale(new Dimension(IMG_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {
@ -657,7 +658,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private JPanel createTrackPanel() {
return new JPanel() {
public Dimension getPreferredSize() {
return FineUIScale.scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT));
return scale(new Dimension(TRACK_WIDTH, IMG_HEIGHT));
}
public void paint(Graphics g) {

15
designer-base/src/main/java/com/fr/design/style/color/SwatchChooserPanel.java

@ -19,6 +19,7 @@ import javax.swing.JColorChooser;
import javax.swing.JPanel;
import javax.swing.colorchooser.AbstractColorChooserPanel;
import static com.fine.theme.utils.FineUIScale.scale;
public class SwatchChooserPanel extends AbstractColorChooserPanel{
@ -35,13 +36,13 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
abstract static class SwatchPanel extends JPanel
{
/** The width of each block. */
protected int cellWidth = 16;
protected int cellWidth = scale(16);
/** The height of each block. */
protected int cellHeight = 16;
protected int cellHeight = scale(16);
/** The gap between blocks. */
protected int gap = 1;
protected int gap = scale(1);
/** The number of rows in the swatch panel. */
protected int numRows;
@ -70,8 +71,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
int width = numCols * cellWidth + (numCols - 1) * gap;
Insets insets = getInsets();
return FineUIScale.scale(new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom));
return new Dimension(width + insets.left + insets.right,
height + insets.top + insets.bottom);
}
/**
@ -511,8 +512,8 @@ public class SwatchChooserPanel extends AbstractColorChooserPanel{
Insets insets = parent.getInsets();
return FineUIScale.scale(new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax));
return new Dimension(insets.left + insets.right + xmax,
insets.top + insets.bottom + ymax);
}

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

@ -309,7 +309,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
conditionsTree = new JTree(new DefaultTreeModel(new ExpandMutableTreeNode()));
conditionsTree.setRootVisible(false);
conditionsTree.setShowsRootHandles(true);
conditionsTree.setBackground(UIConstants.NORMAL_BACKGROUND);
conditionsTree.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal"));
conditionsTree.setForeground(UIConstants.NORMAL_BACKGROUND);
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
@ -740,7 +740,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return super.stopCellEditing();
}
});
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2);
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(1);
//设置Column 2的Editor
column2.setCellEditor(new ColumnValueEditor());
@ -949,12 +949,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
/*
* 击以编辑
* 击以编辑
*/
@Override
public boolean isCellEditable(EventObject anEvent) {
if (anEvent instanceof MouseEvent) {
return ((MouseEvent) anEvent).getClickCount() >= 2;
return ((MouseEvent) anEvent).getClickCount() >= 1;
}
return true;
}

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

@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.43978 2.32136C9.39096 2.27255 9.39096 2.1934 9.43978 2.14459L10.0585 1.52587C10.1073 1.47705 10.1865 1.47705 10.2353 1.52587L14.4779 5.76851C14.5267 5.81733 14.5267 5.89647 14.4779 5.94529L13.8592 6.56401C13.8104 6.61282 13.7312 6.61282 13.6824 6.56401L9.43978 2.32136Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.24264 14.1806C6.19576 14.2275 6.13217 14.2538 6.06586 14.2538H2C1.86193 14.2538 1.75 14.1419 1.75 14.0038V9.93793C1.75 9.87163 1.77634 9.80804 1.82322 9.76116L8.20235 3.38203C8.29998 3.2844 8.45827 3.2844 8.5559 3.38203L12.6218 7.44789C12.7194 7.54552 12.7194 7.70382 12.6218 7.80145L6.24264 14.1806ZM2.91161 10.2638L2.86742 13.1364L5.74004 13.0922L11.2076 7.62467L8.37913 4.79624L2.91161 10.2638Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M9.125 13.125C9.05596 13.125 9 13.1809 9 13.25V14.125C9 14.194 9.05596 14.25 9.125 14.25H14.375C14.444 14.25 14.5 14.194 14.5 14.125V13.25C14.5 13.1809 14.444 13.125 14.375 13.125H9.125Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

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

@ -443,7 +443,8 @@
"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"
"layout_top_right": "layout/layout_top_right.svg",
"theme_edit": "theme_edit.svg"
}
}

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

@ -305,7 +305,7 @@ ComboBox.maximumRowCount = 15
ComboBox.buttonStyle = auto
ComboBox.background = #FFF
ComboBox.buttonBackground = $ComboBox.background
ComboBox.buttonEditableBackground = darken($ComboBox.background,2%)
ComboBox.buttonEditableBackground = $ComboBox.background
ComboBox.buttonSeparatorColor = $ComboBox.background
ComboBox.buttonDisabledSeparatorColor = $Component.disabledBorderColor
ComboBox.buttonArrowColor = @buttonArrowColor
@ -1398,3 +1398,7 @@ chart.selectedBorderColor = #2576EF
[style]Label.detailLabel = \
foreground: fade(@foreground, 90%); \
background: $fill.normal;
[style]Label.widgetEventLabel = \
foreground: $List.wrapper.text.fontColor; \
background: $fill.normal;

102
designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js

File diff suppressed because one or more lines are too long

2
designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java

@ -174,7 +174,7 @@ public class DesignPreLoadComponent {
);
// WebLocaleProvider插件接口适配
LocaleUtils.registerLocaleParser(localeStr -> {
LocaleUtils.registerLocaleParser((localeStr, defaulVal) -> {
ExtraClassManagerProvider provider = StableFactory.getMarkedObject(ExtraClassManagerProvider.XML_TAG, ExtraClassManagerProvider.class);
if (provider != null) {
Set<WebLocaleProvider> set = provider.getArray(WebLocaleProvider.XML_TAG);

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

@ -93,12 +93,11 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
outReportEnginePane.add(createReportEnginePane());
JPanel outAdvicePane = new JPanel();
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout());
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane());
this.add(column(20,
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))),
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
.getComponent());
}
@ -123,8 +122,6 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
createEngineXSettingPane();
createLineEngineSettingPane();
outLineEngineSettingPane.setVisible(false);
outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220)));
outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220)));
engineSettingPane.add(box(cell(outEngineXSettingPane),
cell(outLineEngineSettingPane)).getComponent()
, BorderLayout.WEST);
@ -157,18 +154,18 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
rowCountPanel.add(rowCountBox);
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"));
engineXSettingPane.add(row(20,
column(10,
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel()),
cell(new UILabel())
column(
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel()),
cell(new UILabel())
),
column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip)))
column(
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip)))
.getComponent());
outEngineXSettingPane.add(engineXSettingPane);
}
@ -189,14 +186,14 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane));
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
lineEngineSettingPane.add(row(20,
column(10,
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel())),
column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane)))
column(
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel())),
column(
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane)))
.getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane);
}

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

@ -63,7 +63,7 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getFeatureNamePane(){
JPanel featureNamePane = new JPanel(new BorderLayout());
featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT);
UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER);
UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER);
@ -75,7 +75,7 @@ public class WriteShortCutsPane extends JPanel{
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(24,
centerPane.add(column(10,
row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)),
row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45))
).getComponent());
@ -96,7 +96,7 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getHintsPane(){
JPanel hintsPane = new JPanel(new BorderLayout());
hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT);
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER);
@ -107,7 +107,7 @@ public class WriteShortCutsPane extends JPanel{
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(24,
centerPane.add(column(10,
row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)),
row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64))
).getComponent());

Loading…
Cancel
Save