Browse Source

REPORT-58009 【主题切换】远程设置模板主题页面的,模板主题管理入口没有屏蔽

【问题原因】
链接至远程工作目录且无权限时,屏蔽主题管理对话框入口

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
5b4553eabf
  1. 27
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java

27
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java

@ -12,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.theme.TemplateThemeListPane;
import com.fr.design.mainframe.theme.ui.BorderUtils;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -26,7 +27,8 @@ import java.awt.event.ActionListener;
* @version 1.0
* Created by Starryi on 2021/8/13
*/
public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateThemeDialog {
public class
TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateThemeDialog {
public static final int CONTENT_WIDTH = 660;
public static final int CONTENT_HEIGHT = 515;
@ -107,19 +109,18 @@ public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateT
}
private UIButton createOpenThemeManagerButton() {
if (DesignModeContext.isAuthorityEditing()) {
// 权限编辑模式下,不显示打开主题管理对话框的按钮
return null;
if (WorkContext.getCurrent().isRoot()) {
UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this);
dialog.setVisible(true);
}
});
return button;
}
UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this);
dialog.setVisible(true);
}
});
return button;
return null;
}
private UIButton createUsingCurrentThemeButton() {

Loading…
Cancel
Save