Browse Source

Merge pull request #815 in DESIGN/design from ~RICHIE/design:release/10.0 to release/10.0

* commit '841741e6eebe712a3497bd288c70f35c6389e679':
  KERNEL-442 配合测试新版本插件商店
bugfix/10.0
richie 6 years ago
parent
commit
d9bce50572
  1. 19
      designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
  2. 27
      designer-base/src/main/java/com/fr/design/upm/UPMPane.java

19
designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java

@ -1,9 +1,16 @@
package com.fr.design.actions.server;
import com.fr.base.BaseUtils;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.ShopDialog;
import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.upm.UPMPane;
import com.fr.general.IOUtils;
import javax.swing.*;
@ -20,12 +27,20 @@ public class PluginManagerAction extends UpdateAction {
this.setMenuKeySet(PLUGIN_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/server/plugin.png"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/server/plugin.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
WebViewDlgHelper.createPluginDialog();
// 可以启用新版本的插件商店(使用JxBrowser作为容器)
if (DesignerEnvManager.getEnvManager().isOpenDebug()
||ServerPreferenceConfig.getInstance().isUseOptimizedUPM()) {
UPMPane upmPane = new UPMPane();
UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), upmPane);
dlg.setVisible(true);
} else {
WebViewDlgHelper.createPluginDialog();
}
}
public static final MenuKeySet PLUGIN_MANAGER = new MenuKeySet() {

27
designer-base/src/main/java/com/fr/design/upm/UPMPane.java

@ -0,0 +1,27 @@
package com.fr.design.upm;
import com.fr.design.dialog.BasicPane;
import com.fr.design.ui.ModernUIPane;
import java.awt.*;
/**
* @author richie
* @version 10.0
* Created by richie on 2019-04-12
* Update Plugin Manager容器
*/
public class UPMPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return "UPM";
}
public UPMPane() {
setLayout(new BorderLayout());
ModernUIPane<Void> modernUIPane = new ModernUIPane.Builder<Void>()
.withURL("https://market.fanruan.com")
.build();
add(modernUIPane, BorderLayout.CENTER);
}
}
Loading…
Cancel
Save