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
b7a987807d
  1. 29
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java
  2. 2
      designer-base/src/main/java/com/fr/env/EnvListPane.java
  3. BIN
      designer-base/src/main/resources/com/fr/design/images/m_file/repeatAndFrozen.png
  4. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  5. 4
      designer-realize/src/main/java/com/fr/design/actions/report/ReportPageAttrAction.java
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  7. 4
      designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java
  8. 37
      designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java
  9. 3
      designer-realize/src/main/java/com/fr/poly/PolyDesigner.java
  10. 1
      designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java

29
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java

@ -44,6 +44,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
private JPanel centerPane;
protected MobileTemplatePreviewPane previewPane;
private WCardTagLayout tagLayout;
private MobileTemplateStyle customTempStyle;
public MobileTemplatePreviewPane getPreviewPane() {
@ -87,6 +88,14 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
custom.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
// 自定义 -> 标准
if (custom.getSelectedIndex() == 0) {
customTempStyle = getCustomMobileTemplateStyle();
}
// 标准 -> 自定义
if (custom.getSelectedIndex() == 1 && customTempStyle != null) {
populateBean(customTempStyle);
}
boolean isCustom = custom.getSelectedIndex() == 1;
centerPane.setVisible(isCustom);
updatePreviewPane();
@ -182,8 +191,24 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
protected abstract MobileTemplatePreviewPane createPreviewPane();
public MobileTemplateStyle getCustomMobileTemplateStyle() {
MobileTemplateStyle ob = updateSubStyle();
ob.setCustom(true);
if (initialColorBox != null) {
ob.setInitialColor(initialColorBox.getSelectObject());
}
if (fontConfPane != null) {
TabFontConfig config = new TabFontConfig();
config.setSelectColor(ob.getTabFontConfig().getSelectColor());
config.setFont(fontConfPane.update());
ob.setTabFontConfig(config);
}
return ob;
}
@Override
public void populateBean(MobileTemplateStyle ob) {
customTempStyle = ob.getCustomTemplateStyle();
centerPane.setVisible(ob.isCustom());
populateSubStyle(ob);
custom.setSelectedItem(!ob.isCustom() ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default") :
@ -211,7 +236,9 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
public MobileTemplateStyle updateConfig(){
if (custom.getSelectedIndex() == 0) {
return getDefaultTemplateStyle();
MobileTemplateStyle mobileTemplateStyle = getDefaultTemplateStyle();
mobileTemplateStyle.setCustomTemplateStyle(customTempStyle);
return mobileTemplateStyle;
}
MobileTemplateStyle ob = updateSubStyle();
ob.setCustom(custom.getSelectedIndex() == 1);

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

@ -34,7 +34,7 @@ public class EnvListPane extends JListControlPane {
public void propertyChange() {
String tempName = getEditingName();
String[] allListNames = nameableList.getAllNames();
allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY;
allListNames[editingIndex] = StringUtils.EMPTY;
if (StringUtils.isEmpty(tempName)) {
nameableList.stopEditing();
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text"));

BIN
designer-base/src/main/resources/com/fr/design/images/m_file/repeatAndFrozen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -270,7 +270,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
} else if (content.getSelectedIndex() == RICH_EDITOR_INDEX) {
return editorPanel.getPreferredSize();
} else {
return new Dimension(commonPanel.getPreferredSize().width, htmlLabelPane.getPreferredSize().height);
return new Dimension(editorPanel.getPreferredSize().width, htmlLabelPane.getPreferredSize().height);
}
}
};

4
designer-realize/src/main/java/com/fr/design/actions/report/ReportPageAttrAction.java

@ -27,7 +27,7 @@ public class ReportPageAttrAction extends ReportComponentAction<WorkSheetDesigne
this.setMenuKeySet(KeySetUtils.REPORT_PAGE);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/pageSetup.png"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/repeatAndFrozen.png"));
this.generateAndSetSearchText(RepeatAndFreezeSettingPane.class.getName());
}
@ -58,4 +58,4 @@ public class ReportPageAttrAction extends ReportComponentAction<WorkSheetDesigne
dlg.setVisible(true);
return returnValue;
}
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -131,7 +131,7 @@ public class DesignerSocketIO {
private static final Emitter.Listener failRetry = new Emitter.Listener() {
@Override
public void call(Object... args) {
FineLoggerFactory.getLogger().error("failed args: {}", Arrays.toString(args));
FineLoggerFactory.getLogger().warn("failed args: {}", Arrays.toString(args));
status = Status.Disconnecting;
socket.close();
count++;

4
designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java

@ -40,6 +40,10 @@ public class PolyBlockProperPane extends DockingView {
polyBlockProperTable.populate(designer);
}
public void update(){
polyBlockProperTable.update();
}
@Override
public String getViewTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Property_Table");

37
designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java

@ -1,17 +1,24 @@
package com.fr.poly;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.widget.BasicPropertyPane;
import com.fr.design.widget.WidgetBoundsPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.poly.group.PolyBoundsGroup;
import com.fr.report.poly.TemplateBlock;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.*;
import java.awt.*;
public class PolyBlockProperTable extends JPanel {
private PolyDesigner designer;
@ -104,7 +111,12 @@ public class PolyBlockProperTable extends JPanel {
if (isPopulating || block == null) {
return;
}
block.setBlockName(blockPropertyPane.getWidgetNameField().getText());
if (blockPropertyPane.getWidgetNameField() != null) {
String toSetWidgetName = blockPropertyPane.getWidgetNameField().getText();
if (isBlockNameValid(toSetWidgetName, block.getBlockName())) {
block.setBlockName(toSetWidgetName);
}
}
PolyBoundsGroup boundsgroup = new PolyBoundsGroup(block, designer.getTarget());
boundsgroup.setValue(x.getValue(), 0, 1);
boundsgroup.setValue(y.getValue(), 1, 1);
@ -112,4 +124,23 @@ public class PolyBlockProperTable extends JPanel {
boundsgroup.setValue(height.getValue(), 3, 1);
firePropertyEdit();
}
/**
*校验一下要设置的名称不能为空不能重名
*
*/
private boolean isBlockNameValid(String toSetWidgetName, String currentWidgetName) {
if (toSetWidgetName == null || toSetWidgetName.isEmpty()) {
blockPropertyPane.getWidgetNameField().setText(currentWidgetName);
return false;
}
for (int i = 0; i < this.designer.getTarget().getBlockCount(); i++) {
if (!ComparatorUtils.equals(currentWidgetName, toSetWidgetName) && ComparatorUtils.equals(toSetWidgetName, this.designer.getTarget().getBlock(i).getBlockName())) {
blockPropertyPane.getWidgetNameField().setText(currentWidgetName);
FineJOptionPane.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"), FineJOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png"));
return false;
}
}
return true;
}
}

3
designer-realize/src/main/java/com/fr/poly/PolyDesigner.java

@ -623,6 +623,9 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
// 在停止编辑的时候,要把编辑器的值赋值给显示器
TemplateBlock block = selection.getValue();
selection.setValue(block);
if (isChooseBlock()){
((PolyBlockProperPane) this.getEastDownPane()).update();
}
this.removeEditor(selection.getEditor());
selection = null;
this.repaint();

1
designer-realize/src/main/java/com/fr/start/preload/ImagePreLoader.java

@ -317,6 +317,7 @@ public class ImagePreLoader {
"com/fr/web/images/print.png",
"com/fr/design/images/m_report/watermark.png",
"com/fr/design/images/m_file/pageSetup.png",
"com/fr/design/images/m_file/repeatAndFrozen.png",
"com/fr/design/images/m_report/header.png",
"com/fr/design/images/m_report/footer.png",
"com/fr/design/images/m_report/background.png",

Loading…
Cancel
Save