From ca024a4f6b0d43a547db871ecfa0ce97571d65af Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 17 Aug 2022 19:22:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-76079=E3=80=90=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E3=80=91=E3=80=90=E8=B5=B7=E5=A7=8B=E9=A1=B5=E3=80=91=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E9=97=AE=E9=A2=98=201-=E5=A4=84=E7=90=86=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E9=97=AE=E9=A2=98=202-=E4=B8=8A=E4=B8=8B=E9=97=B4?= =?UTF-8?q?=E8=B7=9D=E6=94=B9=E5=8F=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metric/DesignerStartupPageStatistic.java | 71 ------------------- .../com/fr/startup/ui/StartupPageWindow.java | 12 +++- .../startup/ui/StartupPageWorkspacePanel.java | 8 ++- 3 files changed, 16 insertions(+), 75 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java diff --git a/designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java b/designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java deleted file mode 100644 index 412ee434cf..0000000000 --- a/designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.fr.startup.metric; - -/** - * 设计器启动页使用数据 - * - * created by Harrison on 2022/08/12 - **/ -public class DesignerStartupPageStatistic { - - /** - * operate:0-双击工作目录进入 或 点击蓝色箭头进入;1-切换其他工作目录;2-点击展开全部;3-点击工作目录中的模版直接打开 或 直接点击蓝色箭头进入 - */ - private int operate; - - /** - * workplace:工作目录名称,当operate为 0或1时记录 - */ - private String workspace; - - /** - * workplaceNumber:工作目录的个数,当operate为 0或1或2或3时记录 - */ - private String workspaceNum; - - /** - * template:模板名称,当operate为 3时记录 - */ - private String template; - - public DesignerStartupPageStatistic(int operate, String workspace, String workspaceNum, String template) { - this.operate = operate; - this.workspace = workspace; - this.workspaceNum = workspaceNum; - this.template = template; - } - - public DesignerStartupPageStatistic() { - } - - public int getOperate() { - return operate; - } - - public void setOperate(int operate) { - this.operate = operate; - } - - public String getWorkspace() { - return workspace; - } - - public void setWorkspace(String workspace) { - this.workspace = workspace; - } - - public String getWorkspaceNum() { - return workspaceNum; - } - - public void setWorkspaceNum(String workspaceNum) { - this.workspaceNum = workspaceNum; - } - - public String getTemplate() { - return template; - } - - public void setTemplate(String template) { - this.template = template; - } -} diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java index 1e5481cc26..709152524c 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java @@ -11,7 +11,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.ColorUtils; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.exit.DesignerExiter; import com.fr.general.GeneralUtils; import com.fr.log.FineLoggerFactory; @@ -68,7 +67,7 @@ public class StartupPageWindow extends JFrame { private static final int TITLE_FONT_SIZE = 24; private static final int ITEM_VERTICAL_GAP = 5; - private static final Dimension SCREEN_SIZE = new Dimension(1600, 820); + private static final Dimension SCREEN_SIZE = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); private StartupPageWorkspacePanel workspacePanel; @@ -147,7 +146,14 @@ public class StartupPageWindow extends JFrame { validate(); revalidate(); - GUICoreUtils.centerWindow(this); + setFullScreen(); + } + + private void setFullScreen() { + + Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); + this.setLocation(0, 0); + this.setSize(screenSize.width, screenSize.height); } private void addDefaultListeners() { diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java index e7d58a766f..1cc1805497 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java @@ -127,6 +127,10 @@ public class StartupPageWorkspacePanel extends JPanel { private JComponent generateUnLimitContentPanel(List> partitions) { + JPanel workspaceDescWrapper = new JPanel(); + workspaceDescWrapper.setLayout(new BorderLayout(0, 0)); + workspaceDescWrapper.setBorder(new EmptyBorder(20, 0, 0, 0)); + JPanel workspaceDescPanel = new JPanel(); workspaceDescPanel.setLayout(new GridLayout(partitions.size(), 1, 0, ITEM_VERTICAL_GAP)); for (List partition : partitions) { @@ -139,9 +143,11 @@ public class StartupPageWorkspacePanel extends JPanel { UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0)); scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT)); + workspaceDescWrapper.add(scrollPane, BorderLayout.CENTER); return scrollPane; } - return workspaceDescPanel; + workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER); + return workspaceDescWrapper; } private JPanel generateLimitContentPanel(List> partitions) {