syoki 7 years ago
parent
commit
fa45c7fdf8
  1. 1
      build.performance.gradle
  2. 8
      designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java
  3. 2
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  4. 22
      designer_base/src/com/fr/start/StartServer.java
  5. 45
      designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java
  6. 7
      designer_form/src/com/fr/design/mainframe/JForm.java

1
build.performance.gradle

@ -15,6 +15,7 @@ task appletJar<<{
fileset(dir:"${basicDir}/chart/build/classes/main")
fileset(dir:"${basicDir}/report/build/classes/main")
fileset(dir:"${basicDir}/platform/build/classes/main")
fileset(dir:"${basicDir}/performance/build/classes/main")
}
unjar(src:"${libDir}/3rd.jar",dest:"./tmp")
unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp")

8
designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.templateinfo;
import com.fr.base.parameter.ParameterUI;
import com.fr.main.impl.WorkBook;
import com.fr.main.parameter.ReportParameterAttr;
import com.fr.report.cellcase.CellCase;
import com.fr.report.poly.PolyWorkSheet;
import com.fr.report.worksheet.WorkSheet;
@ -68,7 +69,12 @@ public class JWorkBookProcessInfo extends TemplateProcessInfo<WorkBook> {
}
// 获取模板控件数
public int getWidgetCount() {
ParameterUI pui = template.getReportParameterAttr().getParameterUI();
ReportParameterAttr attr = template.getReportParameterAttr();
if (attr == null) {
return 0;
}
ParameterUI pui = attr.getParameterUI();
return pui == null ? 0 : (pui.getAllWidgets().length - 1);
}
}

2
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -1,7 +1,7 @@
package com.fr.design.editor.editor;
import com.fr.data.SimpleDSColumn;
import com.fr.design.data.DesignTableDataManager;
import com.fr.data.SimpleDSColumn;
import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox;

22
designer_base/src/com/fr/start/StartServer.java

@ -14,10 +14,7 @@ import com.fr.env.SignIn;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.*;
import com.fr.stable.project.ProjectConstants;
import com.fr.start.server.JettyHost;
@ -154,8 +151,7 @@ public class StartServer {
Desktop.getDesktop().browse(new URI(uri));
} catch (IOException e) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
startBrowserFromCommand(uri, e);
} catch (URISyntaxException e) {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
} catch (Exception e) {
@ -164,6 +160,20 @@ public class StartServer {
}
}
private static void startBrowserFromCommand(String uri, IOException e) {
if (OperatingSystem.isWindows()) {
try {
// win10 内存用到到80%左右的时候, Desktop.browser经常提示"存储空间不足, 无法处理改命令", 用rundll32可以打开.
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + uri);
} catch (IOException ee) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
} else {
FRContext.getLogger().errorWithServerLevel(e.getMessage(), e);
}
}
private static class InformationPane extends BasicPane {
private static final long serialVersionUID = 1L;

45
designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java

@ -1,34 +1,13 @@
package com.fr.design.chart.series.PlotSeries;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.*;
import javax.swing.BoxLayout;
import javax.swing.DefaultListModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import com.fr.base.*;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.chart.base.MapSvgAttr;
import com.fr.chart.base.MapSvgXMLHelper;
import com.fr.chart.chartglyph.MapShapeValue;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -37,13 +16,23 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.UISelectTable;
import com.fr.design.gui.itable.UITableNoOptionUI;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.GeneralPath;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
/**
* 地图 图片编辑界面 选中图片 编辑. 支持鼠标选中等事件

7
designer_form/src/com/fr/design/mainframe/JForm.java

@ -468,18 +468,21 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override
protected void applyUndoState(FormUndoState u) {
try {
if (this.index == FORM_TAB) {
//JForm的target重置
this.setTarget((Form) u.getForm().clone());
if (this.index == FORM_TAB) {
JForm.this.refreshRoot();
this.formDesign.getArea().setAreaSize(u.getAreaSize(), u.getHorizontalValue(), u.getVerticalValue(), u.getWidthValue(), u.getHeightValue(), u.getSlideValue());
//撤销的时候要重新选择的body布局
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
} else {
// 只在报表块里撤销是不需要修改外部form对象的, 因为编辑的是当前报表块.
// 修改了JForm的Target需要同步修改formDesign的Target.
Form undoForm = (Form) u.getForm().clone();
String widgetName = this.formDesign.getElementCaseContainerName();
//这儿太坑了,u.getForm() 与 getTarget内容不一样
FormElementCaseProvider dataTable = getTarget().getElementCaseByName(widgetName);
FormElementCaseProvider dataTable = undoForm.getElementCaseByName(widgetName);
this.reportComposite.setSelectedWidget(dataTable);
//下面这句话是防止撤销之后直接退出编辑再编辑撤销的东西会回来,因为撤销不会保存EC
formDesign.setElementCase(dataTable);

Loading…
Cancel
Save