Browse Source

Merge branch 'release/10.0' of https://cloud.finedevelop.com/scm/~hades/design into release/10.0

feature/big-screen
hades 5 years ago
parent
commit
58546cfa97
  1. 16
      designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java
  2. 2
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java
  3. 4
      designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java
  4. 2
      designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java
  5. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java
  6. 33
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java
  7. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  8. 17
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  9. 2
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java

16
designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java vendored

@ -2,10 +2,9 @@ package com.fr.design.env;
import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.cluster.engine.base.FineClusterConfig;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.invoke.ReflectException;
import com.fr.log.FineLoggerFactory;
import com.fr.base.operator.common.CommonOperator; import com.fr.base.operator.common.CommonOperator;
import com.fr.rpc.ExceptionHandler; import com.fr.rpc.ExceptionHandler;
import com.fr.rpc.RPCInvokerExceptionInfo;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace; import com.fr.workspace.Workspace;
@ -51,13 +50,12 @@ public class RemoteWorkspace implements Workspace {
@Override @Override
public boolean isWarDeploy() { public boolean isWarDeploy() {
return WorkContext.getCurrent().get(CommonOperator.class, new ExceptionHandler<Boolean>() {
try { @Override
return WorkContext.getCurrent().get(CommonOperator.class).isWarDeploy(); public Boolean callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) {
} catch (ReflectException e) { return false;
FineLoggerFactory.getLogger().error(e.getMessage(), e); }
return false; }).isWarDeploy();
}
} }
@Override @Override

2
designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java

@ -35,4 +35,4 @@ public class UIColorButtonWithAuto extends UIColorButton {
return getPopupWin(); return getPopupWin();
} }
} }

4
designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java

@ -54,7 +54,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
font = font.applySize(15).applyStyle(1); font = font.applySize(15).applyStyle(1);
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency")); JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency"));
label.setFont(font); label.setFont(font);
label.setPreferredSize(new Dimension(600,30)); label.setPreferredSize(new Dimension(650,30));
JLabel label2 = new JLabel("<html>"+Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer") JLabel label2 = new JLabel("<html>"+Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer")
+ localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>"); + localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>");
label2.setPreferredSize(new Dimension(600,30)); label2.setPreferredSize(new Dimension(600,30));
@ -98,7 +98,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
this.add(topPanel,BorderLayout.NORTH); this.add(topPanel,BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER); this.add(centerPanel, BorderLayout.CENTER);
this.add(buttonPanel,BorderLayout.SOUTH); this.add(buttonPanel,BorderLayout.SOUTH);
this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 700:600, 500)); this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 750:600, 500));
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
} }

2
designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java

@ -257,7 +257,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
if (resolution == 0){ if (resolution == 0){
resolution = ScreenResolution.getScreenResolution(); resolution = ScreenResolution.getScreenResolution();
} }
painter.paint(g2d, chartWidth, chartHeight, resolution, null); painter.paint(g2d, chartWidth, chartHeight, resolution, null, this);
} }
} }

2
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java

@ -63,7 +63,7 @@ public abstract class MapDataSetFieldsPane<T extends ColumnFieldCollectionWithSe
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
VanChartMapPlot plot = chart.getPlot(); VanChartMapPlot plot = chart.getPlot();
if (treeNodeAndItems == null) { if (treeNodeAndItems == null) {
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level); treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level, plot.getMapType());
} }
final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems); final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems);

33
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java

@ -4,6 +4,7 @@ import com.fr.chart.base.ChartConstants;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIColorButtonWithAuto; import com.fr.design.gui.ibutton.UIColorButtonWithAuto;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
@ -11,9 +12,9 @@ import com.fr.general.GeneralUtils;
public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto"); private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto");
private boolean isFontSizeAuto = false; private FontAutoType type;
private boolean isColorAuto = false;
public static String[] FONT_SIZES_WITH_AUTO = new String[FONT_END - FONT_START + 2]; public static String[] FONT_SIZES_WITH_AUTO = new String[FONT_END - FONT_START + 2];
static { static {
FONT_SIZES_WITH_AUTO[0] = AUTO; FONT_SIZES_WITH_AUTO[0] = AUTO;
@ -22,28 +23,30 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
} }
} }
public ChartTextAttrPaneWithAuto() { public ChartTextAttrPaneWithAuto(FontAutoType type) {
super(); this.type = type;
initState();
initComponents();
} }
public ChartTextAttrPaneWithAuto(boolean isFontSizeAuto, boolean isColorAuto) { private boolean isFontSizeAuto() {
this.isFontSizeAuto = isFontSizeAuto; return type == FontAutoType.SIZE || type == FontAutoType.SIZE_AND_COLOR;
this.isColorAuto = isColorAuto; }
initState(); private boolean isFontColorAuto() {
initComponents(); return type == FontAutoType.COLOR || type == FontAutoType.SIZE_AND_COLOR;
} }
protected void initFontColorState() { protected void initFontColorState() {
setFontColor(isColorAuto ? new UIColorButtonWithAuto() : new UIColorButton()); setFontColor(isFontColorAuto() ? new UIColorButtonWithAuto() : new UIColorButton());
} }
protected Object[] getFontSizeComboBoxModel() { protected Object[] getFontSizeComboBoxModel() {
return isFontSizeAuto ? FONT_SIZES_WITH_AUTO : FONT_SIZES; return isFontSizeAuto() ? FONT_SIZES_WITH_AUTO : FONT_SIZES;
} }
protected float updateFontSize() { protected float updateFontSize() {
if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) { if (isFontSizeAuto() && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) {
return ChartConstants.AUTO_FONT_SIZE; return ChartConstants.AUTO_FONT_SIZE;
} }
@ -51,7 +54,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
} }
protected void populateFontSize(FRFont frFont) { protected void populateFontSize(FRFont frFont) {
if (getFontSizeComboBox() != null && isFontSizeAuto) { if (getFontSizeComboBox() != null && isFontSizeAuto()) {
if (frFont.getSize() == ChartConstants.AUTO_FONT_SIZE) { if (frFont.getSize() == ChartConstants.AUTO_FONT_SIZE) {
getFontSizeComboBox().setSelectedItem(AUTO); getFontSizeComboBox().setSelectedItem(AUTO);
} else { } else {
@ -59,8 +62,8 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
} }
} }
if (getFontSizeComboBox() != null && !isFontSizeAuto) { if (getFontSizeComboBox() != null && !isFontSizeAuto()) {
getFontSizeComboBox().setSelectedItem(frFont.getSize()); getFontSizeComboBox().setSelectedItem(frFont.getSize());
} }
} }
} }

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java

@ -13,6 +13,7 @@ import com.fr.design.style.color.ColorSelectBox;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartGaugeAxis; import com.fr.plugin.chart.attr.axis.VanChartGaugeAxis;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
@ -101,7 +102,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
protected ChartTextAttrPane getChartTextAttrPane() { protected ChartTextAttrPane getChartTextAttrPane() {
if (isMulti(gaugeStyle)) { if (isMulti(gaugeStyle)) {
return new ChartTextAttrPaneWithAuto(false, true); return new ChartTextAttrPaneWithAuto(FontAutoType.SIZE_AND_COLOR);
} else { } else {
return new ChartTextAttrPane(); return new ChartTextAttrPane();
} }

17
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -13,6 +13,7 @@ import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -69,9 +70,21 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
return false; return false;
} }
protected ChartTextAttrPane initTextFontPane() { private FontAutoType getFontAutoType() {
if (isFontSizeAuto() && isFontColorAuto()) {
return FontAutoType.SIZE_AND_COLOR;
}
if (isFontSizeAuto()) {
return FontAutoType.SIZE;
}
if (isFontColorAuto()) {
return FontAutoType.COLOR;
}
return FontAutoType.NONE;
}
return new ChartTextAttrPaneWithAuto(isFontSizeAuto(), isFontColorAuto()) { protected ChartTextAttrPane initTextFontPane() {
return new ChartTextAttrPaneWithAuto(getFontAutoType()) {
protected double[] getRowSize() { protected double[] getRowSize() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
return new double[]{p, p}; return new double[]{p, p};

2
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java

@ -63,7 +63,7 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (treeNodeAndItems == null) { if (treeNodeAndItems == null) {
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level); treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level, plot.getMapType());
} }
final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems); final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems);

Loading…
Cancel
Save