|
|
|
@ -194,17 +194,7 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
if (showMore) { |
|
|
|
|
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Collapse_Workspace")); |
|
|
|
|
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_less.svg")); |
|
|
|
|
showMoreContent(); |
|
|
|
|
showMore = !showMore; |
|
|
|
|
} else { |
|
|
|
|
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Expand_All")); |
|
|
|
|
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_more.svg")); |
|
|
|
|
showLessContent(); |
|
|
|
|
showMore = !showMore; |
|
|
|
|
} |
|
|
|
|
doShowAllAction(fontLabel, iconLabel); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
tailPanel.add(showAllPanel); |
|
|
|
@ -382,13 +372,10 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
|
|
|
|
|
int clickCount = e.getClickCount(); |
|
|
|
|
if (clickCount == DOUBLE_CLICK_COUNT) { |
|
|
|
|
pageModel.setSelectWorkspaceInfo(workspaceInfo); |
|
|
|
|
openEmptyTemplateRunnable.run(); |
|
|
|
|
doOpenEmptyTemplate(workspaceInfo); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// selectWorkspaceRunnable
|
|
|
|
|
pageModel.setSelectWorkspaceInfo(workspaceInfo); |
|
|
|
|
selectWorkspaceRunnable.run(); |
|
|
|
|
doSwitchWorkspace(workspaceInfo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
@ -415,7 +402,7 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
openEmptyTemplateRunnable.run(); |
|
|
|
|
doOpenEmptyTemplate(workspaceInfo); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
descPanel.add(arrowLabel, BorderLayout.EAST); |
|
|
|
@ -515,4 +502,30 @@ public class StartupPageWorkspacePanel extends JPanel {
|
|
|
|
|
this.selectWorkspaceRunnable = selectWorkspaceRunnable; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doOpenEmptyTemplate(StartupWorkspaceBean workspaceInfo) { |
|
|
|
|
|
|
|
|
|
pageModel.setSelectWorkspaceInfo(workspaceInfo); |
|
|
|
|
openEmptyTemplateRunnable.run(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doSwitchWorkspace(StartupWorkspaceBean workspaceInfo) { |
|
|
|
|
// selectWorkspaceRunnable
|
|
|
|
|
pageModel.setSelectWorkspaceInfo(workspaceInfo); |
|
|
|
|
selectWorkspaceRunnable.run(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doShowAllAction(UILabel fontLabel, UILabel iconLabel) { |
|
|
|
|
|
|
|
|
|
if (showMore) { |
|
|
|
|
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Collapse_Workspace")); |
|
|
|
|
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_less.svg")); |
|
|
|
|
showMoreContent(); |
|
|
|
|
showMore = !showMore; |
|
|
|
|
} else { |
|
|
|
|
fontLabel.setText(Toolkit.i18nText("Fine-Design_Startup_Page_Expand_All")); |
|
|
|
|
iconLabel.setIcon(IconUtils.readIcon("/com/fr/design/startup/show_more.svg")); |
|
|
|
|
showLessContent(); |
|
|
|
|
showMore = !showMore; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|