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

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);
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency"));
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")
+ localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>");
label2.setPreferredSize(new Dimension(600,30));
@ -98,7 +98,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
this.add(topPanel,BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER);
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);
}

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){
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) {
VanChartMapPlot plot = chart.getPlot();
if (treeNodeAndItems == null) {
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level);
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level, plot.getMapType());
}
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.UIColorButtonWithAuto;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -11,9 +12,9 @@ import com.fr.general.GeneralUtils;
public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto");
private boolean isFontSizeAuto = false;
private boolean isColorAuto = false;
private FontAutoType type;
public static String[] FONT_SIZES_WITH_AUTO = new String[FONT_END - FONT_START + 2];
static {
FONT_SIZES_WITH_AUTO[0] = AUTO;
@ -22,28 +23,30 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
}
}
public ChartTextAttrPaneWithAuto() {
super();
public ChartTextAttrPaneWithAuto(FontAutoType type) {
this.type = type;
initState();
initComponents();
}
public ChartTextAttrPaneWithAuto(boolean isFontSizeAuto, boolean isColorAuto) {
this.isFontSizeAuto = isFontSizeAuto;
this.isColorAuto = isColorAuto;
private boolean isFontSizeAuto() {
return type == FontAutoType.SIZE || type == FontAutoType.SIZE_AND_COLOR;
}
initState();
initComponents();
private boolean isFontColorAuto() {
return type == FontAutoType.COLOR || type == FontAutoType.SIZE_AND_COLOR;
}
protected void initFontColorState() {
setFontColor(isColorAuto ? new UIColorButtonWithAuto() : new UIColorButton());
setFontColor(isFontColorAuto() ? new UIColorButtonWithAuto() : new UIColorButton());
}
protected Object[] getFontSizeComboBoxModel() {
return isFontSizeAuto ? FONT_SIZES_WITH_AUTO : FONT_SIZES;
return isFontSizeAuto() ? FONT_SIZES_WITH_AUTO : FONT_SIZES;
}
protected float updateFontSize() {
if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) {
if (isFontSizeAuto() && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) {
return ChartConstants.AUTO_FONT_SIZE;
}
@ -51,7 +54,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
}
protected void populateFontSize(FRFont frFont) {
if (getFontSizeComboBox() != null && isFontSizeAuto) {
if (getFontSizeComboBox() != null && isFontSizeAuto()) {
if (frFont.getSize() == ChartConstants.AUTO_FONT_SIZE) {
getFontSizeComboBox().setSelectedItem(AUTO);
} else {
@ -59,8 +62,8 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
}
}
if (getFontSizeComboBox() != null && !isFontSizeAuto) {
if (getFontSizeComboBox() != null && !isFontSizeAuto()) {
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.VanChartGaugeAxis;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane;
@ -101,7 +102,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
protected ChartTextAttrPane getChartTextAttrPane() {
if (isMulti(gaugeStyle)) {
return new ChartTextAttrPaneWithAuto(false, true);
return new ChartTextAttrPaneWithAuto(FontAutoType.SIZE_AND_COLOR);
} else {
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.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.stable.Constants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -69,9 +70,21 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
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() {
double p = TableLayout.PREFERRED;
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
public void actionPerformed(ActionEvent e) {
if (treeNodeAndItems == null) {
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level);
treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level, plot.getMapType());
}
final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems);

Loading…
Cancel
Save