Browse Source

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

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
6bf07a28be
  1. 4
      designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java
  2. 1
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  3. 2
      designer-base/src/main/java/com/fr/env/TestConnectionResult.java
  4. 18
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java
  6. 30
      designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java
  7. 6
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

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

@ -159,9 +159,9 @@ public enum SupportLocaleImpl implements SupportLocale {
}, },
/** /**
* 更新升级-社区菜单下 * 更新升级-帮助菜单下
*/ */
UPDATE_COMMUNITY { UPDATE_HELP {
@Override @Override
public Set<Locale> support() { public Set<Locale> support() {
Set<Locale> set = new HashSet<>(); Set<Locale> set = new HashSet<>();

1
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -600,6 +600,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
TestConnectionResult result = get(); TestConnectionResult result = get();
if (result.isVerifyResult()) { if (result.isVerifyResult()) {
dialog.dispose(); dialog.dispose();
FineLoggerFactory.getLogger().error(result.getText().replaceAll(TestConnectionResult.WRAP, StringUtils.EMPTY) + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Modify_PassWord"));
FineJOptionPane.showMessageDialog(RemoteEnvPane.this, FineJOptionPane.showMessageDialog(RemoteEnvPane.this,
new MessageWithLink(result.getText(), Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Modify_PassWord"), connection.getUrl() + RemoteWorkspaceURL.SYSTEM_LOGIN_PATH), new MessageWithLink(result.getText(), Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Modify_PassWord"), connection.getUrl() + RemoteWorkspaceURL.SYSTEM_LOGIN_PATH),
Toolkit.i18nText("Fine-Design_Basic_Dialog_Message_Title"), Toolkit.i18nText("Fine-Design_Basic_Dialog_Message_Title"),

2
designer-base/src/main/java/com/fr/env/TestConnectionResult.java vendored

@ -200,6 +200,8 @@ public enum TestConnectionResult {
return false; return false;
} }
public static final String WRAP = "<br/>";
public static TestConnectionResult parse(Boolean value, WorkspaceConnectionInfo info) { public static TestConnectionResult parse(Boolean value, WorkspaceConnectionInfo info) {
if (value == null) { if (value == null) {
return AUTH_FAILED; return AUTH_FAILED;

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

@ -9,11 +9,16 @@ import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.GradientStyle; import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane; import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
@ -39,9 +44,11 @@ import com.fr.van.chart.pie.RadiusCardLayoutPane;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component;
/** /**
* 图表样式-系列抽象界面 * 图表样式-系列抽象界面
@ -183,7 +190,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//半径界面 //半径界面
protected JPanel createRadiusPane(String title) { protected JPanel createRadiusPane(String title) {
radiusPane = initRadiusPane(); radiusPane = initRadiusPane();
radiusPaneWithTitle = TableLayout4VanChartHelper.createGapTableLayoutPane(title, radiusPane); double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
double[] rowSize = {p};
UILabel label = FRWidgetFactory.createLineWrapLabel(title);
label.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{label, radiusPane},
};
radiusPaneWithTitle = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, TableLayout4VanChartHelper.COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle; return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle;
} }

2
designer-chart/src/main/java/com/fr/van/chart/gauge/VanChartGaugeSeriesPane.java

@ -68,7 +68,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createGaugeLayoutPane()}, new Component[]{createGaugeLayoutPane()},
new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})}, new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})},

30
designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java

@ -6,15 +6,18 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.xtable.TableUtils; import com.fr.design.gui.xtable.TableUtils;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.editors.ExtendedPropertyEditor; import com.fr.design.mainframe.widget.editors.ExtendedPropertyEditor;
import com.fr.design.mainframe.widget.editors.StringEditor; import com.fr.design.mainframe.widget.editors.StringEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Component; import java.awt.Component;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
@ -136,12 +139,37 @@ public class CRPropertyDescriptorPane {
try { try {
Object value = propertyEditor.getValue(); Object value = propertyEditor.getValue();
Method m = crPropertyDescriptor.getWriteMethod(); Method m = crPropertyDescriptor.getWriteMethod();
if (ComparatorUtils.equals(m.getName(), "setWidgetName")) {
if (!isWidgetNameValid(value, widget)) {
value = widget.getWidgetName();
}
}
m.invoke(widget, value); m.invoke(widget, value);
crPropertyDescriptor.firePropertyChanged(); crPropertyDescriptor.firePropertyChanged();
} catch (Exception e) { } catch (Exception e) {
} }
} }
/**
* 设置控件名之前校验一下不能为空不能重名
*/
private boolean isWidgetNameValid(Object value, Widget widget) {
String toSetWidgetName;
if (value != null) {
toSetWidgetName = value.toString();
} else {
return false;
}
String currentWidgetName = widget.getWidgetName();
boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
if (toSetWidgetName.isEmpty()) {
return false;
} else if (exist) {
//控件重名,弹出提示
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), JOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png"));
return false;
}
return true;
}
} }

6
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -42,7 +42,6 @@ import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
/** /**
* Created by ibm on 2017/7/25. * Created by ibm on 2017/7/25.
*/ */
@ -219,7 +218,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
String toSetWidgetName = widgetNameField.getText(); String toSetWidgetName = widgetNameField.getText();
String currentWidgetName = widget.getWidgetName(); String currentWidgetName = widget.getWidgetName();
boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
if (exist) { if (toSetWidgetName.isEmpty()) {
widgetNameField.setText(currentWidgetName);
return;
} else if (exist) {
widgetNameField.setText(currentWidgetName); widgetNameField.setText(currentWidgetName);
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), JOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png")); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), JOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png"));
return; return;

Loading…
Cancel
Save