|
|
|
@ -153,6 +153,16 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
} |
|
|
|
|
boolean needScroll = partitions.size() > 4; |
|
|
|
|
if (needScroll) { |
|
|
|
|
return generateScrollUnLimitContentPanel(workspaceDescWrapper, workspaceDescPanel); |
|
|
|
|
} |
|
|
|
|
workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return workspaceDescWrapper; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
|
private JPanel generateScrollUnLimitContentPanel(JPanel workspaceDescWrapper, JPanel workspaceDescPanel) { |
|
|
|
|
|
|
|
|
|
// 滚动条
|
|
|
|
|
UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
|
|
|
|
JViewport viewport = scrollPane.getViewport(); |
|
|
|
@ -167,10 +177,6 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
|
|
|
|
|
return workspaceDescWrapper; |
|
|
|
|
} |
|
|
|
|
workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return workspaceDescWrapper; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel generateLimitContentPanel(List<List<StartupWorkspaceBean>> partitions) { |
|
|
|
|
|
|
|
|
|