Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Yvan 4 years ago
parent
commit
74a6126df3
  1. 17
      designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java
  2. 34
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  3. 23
      designer-base/src/main/java/com/fr/design/upm/UpmFinder.java
  4. 12
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

17
designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java

@ -156,7 +156,20 @@ public enum SupportLocaleImpl implements SupportLocale {
set.add(Locale.TAIWAN); set.add(Locale.TAIWAN);
return set; return set;
} }
} },
/**
* 更新升级-帮助菜单下
*/
UPDATE_HELP {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<>();
set.add(Locale.US);
set.add(Locale.KOREA);
set.add(Locale.CHINA);
set.add(Locale.TAIWAN);
return set;
}
}
} }

34
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -528,35 +528,18 @@ public abstract class ToolBarMenuDock {
* @return 帮组菜单的子菜单 * @return 帮组菜单的子菜单
*/ */
public ShortCut[] createHelpShortCuts() { public ShortCut[] createHelpShortCuts() {
final java.util.List<ShortCut> shortCuts = new ArrayList<ShortCut>(); final java.util.List<ShortCut> shortCuts = new ArrayList<>();
Locale locale = GeneralContext.getLocale();
LocaleCenter.buildAction(new LocaleAction() { LocaleCenter.buildAction(() -> shortCuts.add(new VideoAction()), SupportLocaleImpl.VIDEO);
@Override
public void execute() {
shortCuts.add(new VideoAction());
}
}, SupportLocaleImpl.VIDEO);
LocaleCenter.buildAction(new LocaleAction() { LocaleCenter.buildAction(() -> shortCuts.add(new TutorialAction()), SupportLocaleImpl.TUTORIAL_HELP);
@Override
public void execute() {
shortCuts.add(new TutorialAction());
}
}, SupportLocaleImpl.TUTORIAL_HELP);
LocaleCenter.buildAction(new LocaleAction() { LocaleCenter.buildAction(() -> shortCuts.add(new TechSupportAction()), SupportLocaleImpl.TECH_SUPPORT_HELP);
@Override
public void execute() {
shortCuts.add(new TechSupportAction());
}
}, SupportLocaleImpl.TECH_SUPPORT_HELP);
//远程不使用更新升级,产品演示 //远程不使用更新升级,产品演示
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
shortCuts.add(new WebDemoAction()); shortCuts.add(new WebDemoAction());
shortCuts.add(new SoftwareUpdateAction()); LocaleCenter.buildAction(() -> shortCuts.add(new SoftwareUpdateAction()), SupportLocaleImpl.UPDATE_HELP);
} }
if (AlphaFineConfigManager.isALPHALicAvailable()) { if (AlphaFineConfigManager.isALPHALicAvailable()) {
shortCuts.add(new AlphaFineAction()); shortCuts.add(new AlphaFineAction());
@ -564,12 +547,7 @@ public abstract class ToolBarMenuDock {
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
if (DesignerEnvManager.getEnvManager().isOpenDebug()) { if (DesignerEnvManager.getEnvManager().isOpenDebug()) {
OSSupportCenter.buildAction(new OSBasedAction() { OSSupportCenter.buildAction(objects -> shortCuts.add(new FineUIAction()), SupportOSImpl.FINEUI);
@Override
public void execute(Object... objects) {
shortCuts.add(new FineUIAction());
}
}, SupportOSImpl.FINEUI);
} }
shortCuts.add(new AboutAction()); shortCuts.add(new AboutAction());

23
designer-base/src/main/java/com/fr/design/upm/UpmFinder.java

@ -10,6 +10,7 @@ import com.fr.design.update.ui.dialog.UpdateMainDialog;
import com.fr.event.Event; import com.fr.event.Event;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.event.Listener; import com.fr.event.Listener;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.workspace.Workspace; import com.fr.workspace.Workspace;
@ -17,6 +18,7 @@ import com.fr.workspace.WorkspaceEvent;
import javax.swing.*; import javax.swing.*;
import java.io.File; import java.io.File;
import java.util.Locale;
/** /**
* @author richie * @author richie
@ -27,6 +29,7 @@ public class UpmFinder {
private static final String UPM_DIR = "/upm"; private static final String UPM_DIR = "/upm";
private static final String MAIN_RESOURCE_PATH = UPM_DIR + "/plugin_design.html"; private static final String MAIN_RESOURCE_PATH = UPM_DIR + "/plugin_design.html";
private static final String JXBROWSER = "com.teamdev.jxbrowser.chromium.Browser";
public static String installHome = FRContext.getCommonOperator().getWebRootPath(); public static String installHome = FRContext.getCommonOperator().getWebRootPath();
@ -56,13 +59,20 @@ public class UpmFinder {
} }
public static void showUPMDialog() { public static void showUPMDialog() {
boolean flag = true; boolean hasJxBrowser = true;
try { try {
Class.forName("com.teamdev.jxbrowser.chromium.Browser"); Class.forName(JXBROWSER);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
flag = false; hasJxBrowser = false;
} }
if (flag) { if (hasJxBrowser) {
showUpmPane();
} else {
showUpdatePane();
}
}
private static void showUpmPane() {
if (!checkUPMResourcesExist()){ if (!checkUPMResourcesExist()){
// upm下载 // upm下载
int val = FineJOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"), int val = FineJOptionPane.showConfirmDialog(null, Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Need_Install"),
@ -87,8 +97,11 @@ public class UpmFinder {
} }
dialog.setVisible(true); dialog.setVisible(true);
} }
} else { }
private static void showUpdatePane() {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Update_Info_Plugin_Message")); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Update_Info_Plugin_Message"));
if (!GeneralContext.getLocale().equals(Locale.JAPAN)) {
UpdateMainDialog dialog = new UpdateMainDialog(DesignerContext.getDesignerFrame()); UpdateMainDialog dialog = new UpdateMainDialog(DesignerContext.getDesignerFrame());
dialog.setAutoUpdateAfterInit(); dialog.setAutoUpdateAfterInit();
dialog.showDialog(); dialog.showDialog();

12
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java

@ -22,8 +22,16 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
AttrTooltipContent content = detail.getContent(); AttrTooltipContent content = detail.getContent();
UIButtonGroup<Integer> orientation = getOrientation(); UIButtonGroup<Integer> orientation = getOrientation();
if (orientation != null) { if (orientation != null && content != null) {
orientation.setEnabled(content != null && !content.isRichText()); if (content.isRichText()) {
orientation.setSelectedIndex(HORIZONTAL_INDEX);
detail.setHorizontal(true);
orientation.setEnabled(false);
} else {
orientation.setEnabled(true);
}
} }
} }

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -36,7 +36,7 @@ import java.awt.Component;
public class VanChartPlotLabelDetailPane extends BasicPane { public class VanChartPlotLabelDetailPane extends BasicPane {
private static final long serialVersionUID = -22438250307946275L; private static final long serialVersionUID = -22438250307946275L;
private static final int HORIZONTAL_INDEX = 0; public static final int HORIZONTAL_INDEX = 0;
private BasicBeanPane<AttrTooltipContent> dataLabelContentPane; private BasicBeanPane<AttrTooltipContent> dataLabelContentPane;

Loading…
Cancel
Save