Browse Source

REPORT-76079【迭代】【起始页】交互问题

1-处理全屏问题
2-上下间距改变的问题
feature/x
Harrison 2 years ago
parent
commit
ca024a4f6b
  1. 71
      designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java
  2. 12
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java
  3. 8
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java

71
designer-base/src/main/java/com/fr/startup/metric/DesignerStartupPageStatistic.java

@ -1,71 +0,0 @@
package com.fr.startup.metric;
/**
* 设计器启动页使用数据
*
* created by Harrison on 2022/08/12
**/
public class DesignerStartupPageStatistic {
/**
* operate0-双击工作目录进入 点击蓝色箭头进入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;
}
}

12
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.layout.VerticalFlowLayout;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory; 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 TITLE_FONT_SIZE = 24;
private static final int ITEM_VERTICAL_GAP = 5; 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; private StartupPageWorkspacePanel workspacePanel;
@ -147,7 +146,14 @@ public class StartupPageWindow extends JFrame {
validate(); validate();
revalidate(); 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() { private void addDefaultListeners() {

8
designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java

@ -127,6 +127,10 @@ public class StartupPageWorkspacePanel extends JPanel {
private JComponent generateUnLimitContentPanel(List<List<StartupWorkspaceBean>> partitions) { private JComponent generateUnLimitContentPanel(List<List<StartupWorkspaceBean>> partitions) {
JPanel workspaceDescWrapper = new JPanel();
workspaceDescWrapper.setLayout(new BorderLayout(0, 0));
workspaceDescWrapper.setBorder(new EmptyBorder(20, 0, 0, 0));
JPanel workspaceDescPanel = new JPanel(); JPanel workspaceDescPanel = new JPanel();
workspaceDescPanel.setLayout(new GridLayout(partitions.size(), 1, 0, ITEM_VERTICAL_GAP)); workspaceDescPanel.setLayout(new GridLayout(partitions.size(), 1, 0, ITEM_VERTICAL_GAP));
for (List<StartupWorkspaceBean> partition : partitions) { for (List<StartupWorkspaceBean> 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); UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0)); scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0));
scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT)); scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT));
workspaceDescWrapper.add(scrollPane, BorderLayout.CENTER);
return scrollPane; return scrollPane;
} }
return workspaceDescPanel; workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER);
return workspaceDescWrapper;
} }
private JPanel generateLimitContentPanel(List<List<StartupWorkspaceBean>> partitions) { private JPanel generateLimitContentPanel(List<List<StartupWorkspaceBean>> partitions) {

Loading…
Cancel
Save