Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~zack/design

feature/big-screen
zack 5 years ago
parent
commit
486443fd8d
  1. 2
      designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java
  2. 12
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  3. 5
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  4. 12
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  5. 10
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  6. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java
  7. 15
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  8. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

2
designer-base/src/main/java/com/fr/design/actions/help/AboutDialog.java

@ -76,7 +76,7 @@ public class AboutDialog extends JDialog implements ActionListener {
this.getRootPane().setDefaultButton(okButton);
this.setSize(new Dimension(660, 600));
this.setSize(defaultPane.getPreferredSize().width, 600);
GUICoreUtils.centerWindow(this);
}

12
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -4,6 +4,7 @@
package com.fr.design.actions.help;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper;
import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -36,9 +37,13 @@ public class AboutPane extends JPanel {
private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("help.compNo");
private static final String PRESIDENT_PHONE = CloudCenter.getInstance().acquireUrlByKind("help.PNo");
private int maxWidth;
public AboutPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.maxWidth = GraphHelper.getWidth(getBuildTitle() + GeneralUtils.readFullBuildNO() +
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO") +
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO_OK"));
//center panel
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
@ -90,6 +95,11 @@ public class AboutPane extends JPanel {
}
}
@Override
public Dimension getPreferredSize() {
return new Dimension(this.maxWidth, super.getPreferredSize().height);
}
private void addPhoneAndQQPane(JPanel contentPane) {
BoxCenterAligmentPane boxCenterAlignmentPane;
// 英文版不显示服务电话和QQ

5
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -60,7 +60,10 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
if (StringUtils.isEmpty(tempName)) {
isNamePermitted = false;
nameableList.stopEditing();
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"));
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this),
Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"),
Toolkit.i18nText("Fine-Design_Report_Alert"),
JOptionPane.WARNING_MESSAGE);
setIllegalIndex(editingIndex);
return;
}

12
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -18,6 +18,10 @@ import java.awt.event.MouseMotionListener;
*/
public class UIEastResizableContainer extends JPanel {
private static final long serialVersionUID = 1854340560790476907L;
public static final int MAX_CONTAINER_WIDTH = 500;
public static final int MIN_CONTAINER_WIDTH = 286;
private int containerWidth = 240;
private int preferredWidth = 240;
private int topToolPaneHeight = 25;
@ -262,7 +266,13 @@ public class UIEastResizableContainer extends JPanel {
@Override
public void mouseDragged(MouseEvent e) {
// do nothing
containerWidth = UIEastResizableContainer.this.getWidth() + (UIEastResizableContainer.this.getLocationOnScreen().x - e.getXOnScreen());
containerWidth = Math.min(containerWidth, MAX_CONTAINER_WIDTH);
containerWidth = Math.max(containerWidth, MIN_CONTAINER_WIDTH);
refreshContainer();
if ( DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize();
}
}
});
addMouseListener(new MouseAdapter() {

10
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@ -66,7 +67,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel leftPane;
private JPanel rightPane;
private FixedPopupPane currentPopupPane;
private static final int CONTAINER_WIDTH = 286;
private static final int CONTAINER_WIDTH = containerWidth();
private static final int TAB_WIDTH = 38;
private static final int TAB_BUTTON_WIDTH = 32;
private static final int TAB_BUTTON_HEIGHT = 28;
@ -107,6 +108,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板)
private static int containerWidth() {
if (FRContext.isChineseEnv()) {
return UIEastResizableContainer.MIN_CONTAINER_WIDTH;
}
return UIEastResizableContainer.MAX_CONTAINER_WIDTH;
}
/**
* 得到实例
*

11
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java

@ -1,11 +1,11 @@
package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.type.GradientType;
import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane;
import javax.swing.JPanel;
@ -13,7 +13,7 @@ import javax.swing.JPanel;
/**
* 面积图填充色
*/
public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLineConditionPane {
public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLineConditionPane {
private Plot plot;
private static final long serialVersionUID = -4148284851967140012L;
private VanChartAreaSeriesFillColorPane fillColorBackground;
@ -40,6 +40,7 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine
/**
* 条件属性item的名称
*
* @return item的名称
*/
public String nameForPopupMenuItem() {
@ -54,13 +55,13 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine
public void setDefault() {
//下面这句话是给各组件一个默认值
fillColorBackground.populate(new AttrAreaSeriesFillColorBackground());
fillColorBackground.checkoutAlpha(!(plot != null && plot.getPlotStyle() == ChartConstants.STYLE_SHADE));
fillColorBackground.checkoutAlpha(plot != null && ((VanChartPlot) plot).getGradientStyle().getGradientType() == GradientType.NONE);
}
public void populate(DataSeriesCondition condition) {
if (condition instanceof AttrAreaSeriesFillColorBackground) {
fillColorBackground.populate((AttrAreaSeriesFillColorBackground) condition);
fillColorBackground.checkoutAlpha(!(plot != null && plot.getPlotStyle() == ChartConstants.STYLE_SHADE));
fillColorBackground.checkoutAlpha(plot != null && ((VanChartPlot) plot).getGradientStyle().getGradientType() == GradientType.NONE);
}
}

15
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -5,7 +5,6 @@ import com.fr.base.chart.chartdata.model.LargeDataModel;
import com.fr.base.chart.chartdata.model.NormalDataModel;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBorder;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
@ -90,7 +89,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
JPanel panel = new JPanel(new BorderLayout());
JPanel colorPane = getColorPane();
if(colorPane != null) {
if (colorPane != null) {
panel.add(colorPane, BorderLayout.NORTH);
}
panel.add(getContentInPlotType(), BorderLayout.CENTER);
@ -279,7 +278,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
checkoutMapType(plot);
if(vanChartFillStylePane != null) { //配色
if (vanChartFillStylePane != null) { //配色
vanChartFillStylePane.populateBean(plot.getPlotFillStyle());
}
@ -310,7 +309,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
populateCondition(plot.getConditionCollection().getDefaultAttr());
checkAreaSeriesFillColorPane(plot.getPlotStyle());
checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle());
checkCompsEnabledWithLarge(plot);
}
@ -340,7 +339,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//更新之前先更新界面的map类型属性
checkoutMapType(plot);
if(vanChartFillStylePane != null) {//配色
if (vanChartFillStylePane != null) {//配色
plot.setPlotFillStyle(vanChartFillStylePane.updateBean());
}
@ -369,16 +368,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
updateCondition(plot.getConditionCollection().getDefaultAttr());
checkAreaSeriesFillColorPane(plot.getPlotStyle());
checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle());
}
protected void checkoutMapType(Plot plot) {
}
protected void checkAreaSeriesFillColorPane(int plotStyle) {
protected void checkAreaSeriesFillColorPane(GradientStyle gradientStyle) {
if (areaSeriesFillColorPane != null) {
areaSeriesFillColorPane.checkoutAlpha(plotStyle == ChartConstants.STYLE_NONE);
areaSeriesFillColorPane.checkoutAlpha(gradientStyle.getGradientType() == GradientType.NONE);
}
}

4
designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

@ -11,6 +11,7 @@ import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.fun.ChartWidgetOptionProvider;
import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.fun.ParameterWidgetOptionProvider;
import com.fr.design.module.DesignModuleFactory;
@ -102,7 +103,8 @@ public class XCreatorUtils {
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraDesign, ParameterWidgetOptionProvider.XML_TAG)
|| context.contain(PluginModule.ExtraDesign, FormWidgetOptionProvider.XML_TAG);
|| context.contain(PluginModule.ExtraDesign, FormWidgetOptionProvider.XML_TAG)
|| context.contain(PluginModule.ExtraDesign, ChartWidgetOptionProvider.XML_TAG);
}
});
}

Loading…
Cancel
Save