package com.fr.startup.ui; import com.fr.base.svg.SVGIcon; import com.fr.design.env.DesignerWorkspaceType; import javax.swing.Icon; /** * created by Harrison on 2022/07/11 **/ public class StartupPageUtil { /** * 获取最近区域的 ICON * * @param workspaceBean 工作目录 * @return 图标 */ public static Icon getIcon4RecentAreaByWorkspace(StartupWorkspaceBean workspaceBean) { if (workspaceBean.getType() == DesignerWorkspaceType.Local) { return SVGIcon.readSVGIcon("/com/fr/design/startup/local_server_background_36.svg", 36, 36); } return SVGIcon.readSVGIcon("/com/fr/design/startup/remote_server_background_36.svg", 36, 36); } /** * 获取工作目录描述区域的 ICON * * @param workspaceBean 工作目录 * @return 图标 */ public static Icon getIcon4DescAreaByWorkspace(StartupWorkspaceBean workspaceBean) { if (workspaceBean.getType() == DesignerWorkspaceType.Local) { return SVGIcon.readSVGIcon("/com/fr/design/startup/local_server_background_28.svg", 28, 28); } return SVGIcon.readSVGIcon("/com/fr/design/startup/remote_server_background_28.svg", 28, 28); } }