Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design_10.0 into release/10.0

master
kerry 6 years ago
parent
commit
e4ca82b81d
  1. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java
  2. 97
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartPreFillStylePane.java
  3. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  4. 165
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  5. 4
      designer-chart/src/main/java/com/fr/design/module/ChartPreStyleAction.java
  6. 36
      designer-chart/src/main/java/com/fr/design/module/ChartPreStyleManagerPane.java
  7. 23
      designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java
  8. 16
      designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java
  9. 10
      designer-form/src/main/java/com/fr/design/mainframe/actions/FormMobileAttrAction.java
  10. 12
      designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java
  11. 10
      designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java
  12. 8
      designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java
  13. 2
      designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  14. 5
      designer-realize/src/main/java/com/fr/start/Designer.java

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

@ -1,10 +1,11 @@
package com.fr.design.mainframe.chart.gui.style; package com.fr.design.mainframe.chart.gui.style;
import com.fr.base.ChartColorMatching;
import com.fr.base.ChartPreStyleConfig; import com.fr.base.ChartPreStyleConfig;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.AttrFillStyle; import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.ChartPreStyle; import com.fr.chart.base.ChartUtils;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -199,8 +200,8 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
} else if(styleSelectBox.getSelectedIndex() < styleSelectBox.getItemCount() - 1){ } else if(styleSelectBox.getSelectedIndex() < styleSelectBox.getItemCount() - 1){
ChartPreStyleConfig manager = ChartPreStyleConfig.getInstance(); ChartPreStyleConfig manager = ChartPreStyleConfig.getInstance();
Object preStyle = manager.getPreStyle(styleSelectBox.getSelectedItem()); Object preStyle = manager.getPreStyle(styleSelectBox.getSelectedItem());
if(preStyle instanceof ChartPreStyle) { if (preStyle instanceof ChartColorMatching) {
AttrFillStyle def = ((ChartPreStyle) preStyle).getAttrFillStyle(); AttrFillStyle def = ChartUtils.chartColorMatching2AttrFillStyle((ChartColorMatching) preStyle);
def.setFillStyleName(Utils.objectToString(styleSelectBox.getSelectedItem())); def.setFillStyleName(Utils.objectToString(styleSelectBox.getSelectedItem()));
return def; return def;
}else{ }else{

97
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartPreFillStylePane.java

@ -1,97 +0,0 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.*;
import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
/**
* 预定义的图表配色界面, 其中和属性表中ChartFillStylePane 主要的不同就是标签的位置.
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-8-21 下午03:16:27
*/
public class ChartPreFillStylePane extends ChartFillStylePane {
public ChartPreFillStylePane() {
}
protected void initLayout() {// 仅仅是服务器预定 风格界面布局, 和属性表 有所不同.
customPane.setPreferredSize(new Dimension(200, 200));
colorGradient.setPreferredSize(new Dimension(120, 30));
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p };
double[] rowSize = { p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(" " + Inter.getLocText("ColorMatch")), null},
new Component[]{null, customPane},
};
this.add(TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize), BorderLayout.WEST);
}
public void populateBean(AttrFillStyle condition) {
styleSelectBox.setSelectedIndex(styleSelectBox.getItemCount()-1);
if(condition == null || condition.getColorStyle() == ChartConstants.COLOR_DEFAULT) {
colorAcc.populateBean(ChartConstants.CHART_COLOR_ARRAY);// 新建时 保持默认样式
accButton.setSelected(true);
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc");
colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE);
colorGradient.getSelectColorPointBtnP2().setColorInner(Color.black);// 控件中的位置无效.
} else {
int colorStyle = condition.getColorStyle();
gradientButton.setSelected(colorStyle == ChartConstants.COLOR_GRADIENT);
accButton.setSelected(colorStyle == ChartConstants.COLOR_ACC);
int colorSize = condition.getColorSize();
if(colorSize == 2 && gradientButton.isSelected() ) {
cardLayout.show(changeColorSetPane, "gradient");
Color endColor = condition.getColorIndex(1);
Color startColor = condition.getColorIndex(0);
colorGradient.getSelectColorPointBtnP1().setColorInner(startColor);
colorGradient.getSelectColorPointBtnP2().setColorInner(endColor);
colorGradient.repaint();
} else if(colorSize > 2 && accButton.isSelected()){
cardLayout.show(changeColorSetPane, "acc");
Color[] colors = new Color[colorSize];
for(int i = 0; i < colorSize; i++) {
colors[i] = condition.getColorIndex(i);
}
colorAcc.populateBean(colors);
}
}
}
@Override
public AttrFillStyle updateBean() {
AttrFillStyle condition = new AttrFillStyle();
condition.clearColors();
if(gradientButton.isSelected()) {
condition.setColorStyle(ChartConstants.COLOR_GRADIENT);
Color start = colorGradient.getSelectColorPointBtnP1().getColorInner();
Color end = colorGradient.getSelectColorPointBtnP2().getColorInner();
condition.addFillColor(start);
condition.addFillColor(end);
} else {
condition.setColorStyle(ChartConstants.COLOR_ACC);
Color[] colors = colorAcc.updateBean();
for(int i = 0, length = colors.length; i < length; i++) {
condition.addFillColor(colors[i]);
}
}
return condition;
}
}

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -1,12 +1,13 @@
package com.fr.design.mainframe.chart.gui.type; package com.fr.design.mainframe.chart.gui.type;
import com.fr.base.ChartColorMatching;
import com.fr.base.ChartPreStyleConfig; import com.fr.base.ChartPreStyleConfig;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.chart.base.AttrContents; import com.fr.chart.base.AttrContents;
import com.fr.chart.base.AttrFillStyle; import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.ChartPreStyle; import com.fr.chart.base.ChartUtils;
import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Axis;
@ -243,7 +244,7 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
if(preStyle == null){ if(preStyle == null){
plot.getPlotFillStyle().setColorStyle(ChartConstants.COLOR_DEFAULT); plot.getPlotFillStyle().setColorStyle(ChartConstants.COLOR_DEFAULT);
}else{ }else{
AttrFillStyle fillStyle = ((ChartPreStyle)preStyle).getAttrFillStyle(); AttrFillStyle fillStyle = ChartUtils.chartColorMatching2AttrFillStyle((ChartColorMatching) preStyle);
fillStyle.setFillStyleName(name); fillStyle.setFillStyleName(name);
plot.setPlotFillStyle(fillStyle); plot.setPlotFillStyle(fillStyle);
} }

165
designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java

@ -0,0 +1,165 @@
package com.fr.design.module;
import com.fr.base.ChartColorMatching;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartAccColorPane;
import com.fr.design.style.background.gradient.FixedGradientBar;
import com.fr.general.Inter;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
* 预定义的图表配色界面.
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-8-21 下午03:16:27
*/
public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
private JPanel changeColorSetPane;
private CardLayout cardLayout;
private UIButton accButton;
private UIButton gradientButton;
private ChartAccColorPane colorAcc;
private FixedGradientBar colorGradient;
public ChartPreFillStylePane() {
initComponents();
initListener();
}
private void initComponents() {
JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.LEFT));
buttonPane.add(accButton = new UIButton(Inter.getLocText("FR-Designer_Chart_Acc_Set")));
buttonPane.add(gradientButton = new UIButton(Inter.getLocText("FR-Designer_Gradient-Color")));
customPane.add(buttonPane, BorderLayout.NORTH);
changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 130), "gradient");
changeColorSetPane.add(colorAcc = new ChartAccColorPane(), "acc");
cardLayout.show(changeColorSetPane, "acc");
customPane.add(changeColorSetPane, BorderLayout.CENTER);
accButton.setSelected(true);
customPane.setPreferredSize(new Dimension(200, 200));
colorGradient.setPreferredSize(new Dimension(120, 30));
colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE);
colorGradient.getSelectColorPointBtnP2().setColorInner(Color.black);
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(" " + Inter.getLocText("ColorMatch")), null},
new Component[]{null, customPane},
};
this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize), BorderLayout.WEST);
}
private void initListener() {
accButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
accButton.setSelected(true);
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc");
}
});
gradientButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
gradientButton.setSelected(true);
accButton.setSelected(false);
cardLayout.show(changeColorSetPane, "gradient");
}
});
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("ServerM-Predefined_Styles");
}
public void populateBean(ChartColorMatching condition) {
if (condition == null) {
return;
}
boolean isGradient = condition.getGradient();
List<Color> colorList = condition.getColorList();
if (isGradient) {
gradientButton.setSelected(true);
accButton.setSelected(false);
cardLayout.show(changeColorSetPane, "gradient");
if (colorList.size() == 2) {
colorGradient.getSelectColorPointBtnP1().setColorInner(colorList.get(0));
colorGradient.getSelectColorPointBtnP2().setColorInner(colorList.get(1));
colorGradient.repaint();
}
} else {
accButton.setSelected(true);
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc");
if (colorList.size() > 0) {
colorAcc.populateBean(colorList.toArray(new Color[colorList.size()]));
}
}
}
@Override
public ChartColorMatching updateBean() {
ChartColorMatching chartColorMatching = new ChartColorMatching();
List<Color> colorList = new ArrayList<Color>();
if(gradientButton.isSelected()) {
chartColorMatching.setGradient(true);
Color start = colorGradient.getSelectColorPointBtnP1().getColorInner();
Color end = colorGradient.getSelectColorPointBtnP2().getColorInner();
colorList.add(start);
colorList.add(end);
} else {
chartColorMatching.setGradient(false);
Color[] colors = colorAcc.updateBean();
for(Color color : colors) {
colorList.add(color);
}
}
chartColorMatching.setColorList(colorList);
return chartColorMatching;
}
}

4
designer-chart/src/main/java/com/fr/design/module/ChartPreStyleAction.java

@ -39,14 +39,10 @@ public class ChartPreStyleAction extends UpdateAction {
@Override @Override
public void doOk() { public void doOk() {
pane.updateBean(); pane.updateBean();
// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance();
// manager.setStyleEditing(null);
} }
@Override @Override
public void doCancel() { public void doCancel() {
// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance();
// manager.setStyleEditing(null);
} }
}); });

36
designer-chart/src/main/java/com/fr/design/module/ChartPreStyleManagerPane.java

@ -1,8 +1,9 @@
package com.fr.design.module; package com.fr.design.module;
import com.fr.base.ChartColorMatching;
import com.fr.base.ChartPreStyleConfig; import com.fr.base.ChartPreStyleConfig;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.ChartPreStyle; import com.fr.config.Configuration;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
@ -10,8 +11,9 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@ -32,7 +34,7 @@ public class ChartPreStyleManagerPane extends JListControlPane {
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{ return new NameableCreator[]{
new NameObjectCreator(Inter.getLocText("FR-Designer_PreStyle"), new NameObjectCreator(Inter.getLocText("FR-Designer_PreStyle"),
ChartPreStyle.class, ChartPreStylePane.class) ChartColorMatching.class, ChartPreStylePane.class)
}; };
} }
@ -42,14 +44,13 @@ public class ChartPreStyleManagerPane extends JListControlPane {
} }
public void populateBean() { public void populateBean() {
ChartPreStyleConfig config = ChartPreStyleConfig.getInstance(); ChartPreStyleConfig config = ChartPreStyleConfig.getInstance().mirror();
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
Iterator keys = config.names(); Iterator keys = config.names();
while(keys.hasNext()) { while(keys.hasNext()) {
Object key = keys.next(); Object key = keys.next();
ChartPreStyle value = (ChartPreStyle)config.getPreStyle(key); ChartColorMatching value = (ChartColorMatching) config.getPreStyle(key);
list.add(new NameObject(Utils.objectToString(key), value)); list.add(new NameObject(Utils.objectToString(key), value));
} }
@ -63,17 +64,18 @@ public class ChartPreStyleManagerPane extends JListControlPane {
} }
public void updateBean() { public void updateBean() {
Configurations.update(new Worker() {
@Override
public void run() {
ChartPreStyleConfig config = ChartPreStyleConfig.getInstance(); ChartPreStyleConfig config = ChartPreStyleConfig.getInstance();
config.setPreStyleMap(new ListMap());
Nameable[] values = this.update();
config.setCurrentStyle(getSelectedName()); config.setCurrentStyle(getSelectedName());
for(int i = 0; i < values.length; i++) { Nameable[] values = update();
Nameable value = values[i]; config.clearAllPreStyle();
config.putPreStyle(value.getName(), ((NameObject)value).getObject());
for(Nameable value : values) {
config.putPreStyle(value.getName(), ((NameObject) value).getObject());
} }
// 通知报表整个刷新. // 通知报表整个刷新.
@ -83,4 +85,12 @@ public class ChartPreStyleManagerPane extends JListControlPane {
} }
} }
@Override
public Class<? extends Configuration>[] targets() {
return new Class[]{ChartPreStyleConfig.class};
}
});
}
} }

23
designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java

@ -1,16 +1,17 @@
package com.fr.design.module; package com.fr.design.module;
import com.fr.chart.base.ChartPreStyle; import com.fr.base.ChartColorMatching;
import com.fr.chart.base.ChartUtils;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.gui.style.ChartPreFillStylePane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -25,7 +26,7 @@ import java.awt.FlowLayout;
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-8-20 下午05:02:00 * @version 创建时间2013-8-20 下午05:02:00
*/ */
public class ChartPreStylePane extends BasicBeanPane<ChartPreStyle>{ public class ChartPreStylePane extends BasicBeanPane<ChartColorMatching> {
private ChartPreFillStylePane fillStylePane; private ChartPreFillStylePane fillStylePane;
private ChartComponent chartComponent; private ChartComponent chartComponent;
@ -79,27 +80,25 @@ public class ChartPreStylePane extends BasicBeanPane<ChartPreStyle>{
} }
} }
private void refreshWhenStyleChange(ChartPreStyle preStyle) { private void refreshWhenStyleChange(ChartColorMatching preStyle) {
// ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance();
// manager.setStyleEditing(preStyle);
if(chartComponent != null) { if(chartComponent != null) {
Plot plot = (Plot) chartComponent.getEditingChart().getBasePlot();
plot.setPlotFillStyle(ChartUtils.chartColorMatching2AttrFillStyle(preStyle));
chartComponent.reset(); chartComponent.reset();
} }
} }
@Override @Override
public void populateBean(ChartPreStyle preStyle) { public void populateBean(ChartColorMatching preStyle) {
fillStylePane.populateBean(preStyle.getAttrFillStyle()); fillStylePane.populateBean(preStyle);
refreshWhenStyleChange(preStyle); refreshWhenStyleChange(preStyle);
} }
@Override @Override
public ChartPreStyle updateBean() { public ChartColorMatching updateBean() {
ChartPreStyle preStyle = new ChartPreStyle(); return fillStylePane.updateBean();
preStyle.setAttrFillStyle(fillStylePane.updateBean());
return preStyle;
} }
@Override @Override

16
designer-form/src/main/java/com/fr/design/designer/beans/actions/FormWidgetEditAction.java

@ -3,12 +3,7 @@ package com.fr.design.designer.beans.actions;
import com.fr.design.actions.TemplateComponentAction; import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.designer.beans.actions.behavior.UpdateBehavior; import com.fr.design.designer.beans.actions.behavior.UpdateBehavior;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.general.Inter;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
public abstract class FormWidgetEditAction extends TemplateComponentAction<FormDesigner> { public abstract class FormWidgetEditAction extends TemplateComponentAction<FormDesigner> {
@ -32,17 +27,6 @@ public abstract class FormWidgetEditAction extends TemplateComponentAction<FormD
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
super.actionPerformed(evt); super.actionPerformed(evt);
// 记录功能点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
FunctionProcessor functionProcessor;
if (evt.getSource() instanceof JButton) {
functionProcessor = ReportFunctionProcessor.FORM_WIDGET_EDIT_TOOLBAR;
} else {
functionProcessor = ReportFunctionProcessor.FORM_WIDGET_EDIT_POPUPMENU;
}
processor.recordFunction(functionProcessor);
}
} }
public void setUpdateBehavior(UpdateBehavior updateBehavior) { public void setUpdateBehavior(UpdateBehavior updateBehavior) {

10
designer-form/src/main/java/com/fr/design/mainframe/actions/FormMobileAttrAction.java

@ -15,11 +15,8 @@ import com.fr.file.FILE;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.form.main.mobile.FormMobileAttr; import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.KeyStroke; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
/** /**
@ -67,11 +64,6 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
// 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加 // 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加
jf.getTarget().addAttrMark(new MobileOnlyTemplateAttrMark()); jf.getTarget().addAttrMark(new MobileOnlyTemplateAttrMark());
} }
// 记录功能点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(ReportFunctionProcessor.MOBILE_TEMPLATE_FRM);
}
// 设置移动端属性并刷新界面 // 设置移动端属性并刷新界面
formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后 formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后
((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified(); ((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified();

12
designer-form/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleBodyWatermarkEditor.java

@ -7,12 +7,9 @@ import com.fr.design.mainframe.widget.editors.ITextComponent;
import com.fr.design.mainframe.widget.renderer.WatermarkRenderer; import com.fr.design.mainframe.widget.renderer.WatermarkRenderer;
import com.fr.design.mainframe.widget.wrappers.WatermarkWrapper; import com.fr.design.mainframe.widget.wrappers.WatermarkWrapper;
import com.fr.design.report.WatermarkPane; import com.fr.design.report.WatermarkPane;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.SwingUtilities; import javax.swing.*;
import java.awt.Dimension; import java.awt.*;
/** /**
* Created by plough on 2018/5/15. * Created by plough on 2018/5/15.
@ -43,11 +40,6 @@ public class AccessibleBodyWatermarkEditor extends UneditableAccessibleEditor {
public void doOk() { public void doOk() {
setValue(watermarkPane.update()); setValue(watermarkPane.update());
fireStateChanged(); fireStateChanged();
// 功能点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(ReportFunctionProcessor.WATERMARK);
}
} }
}); });
watermarkPane.populate((WatermarkAttr) getValue()); watermarkPane.populate((WatermarkAttr) getValue());

10
designer-realize/src/main/java/com/fr/design/actions/report/ReportMobileAttrAction.java

@ -12,12 +12,9 @@ import com.fr.file.FILE;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.main.TemplateWorkBook; import com.fr.main.TemplateWorkBook;
import com.fr.plugin.ExtraClassManager;
import com.fr.report.mobile.ElementCaseMobileAttr; import com.fr.report.mobile.ElementCaseMobileAttr;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.KeyStroke; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
/** /**
@ -67,11 +64,6 @@ public class ReportMobileAttrAction extends JWorkBookAction{
// 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加 // 放到后面。如果提前 return 了,则仍然处于未设置状态,不要添加
wbTpl.addAttrMark(new MobileOnlyTemplateAttrMark()); wbTpl.addAttrMark(new MobileOnlyTemplateAttrMark());
} }
// 记录功能点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(ReportFunctionProcessor.MOBILE_TEMPLATE_CPT);
}
// 设置移动端属性并刷新界面 // 设置移动端属性并刷新界面
wbTpl.setReportMobileAttr(elementCaseMobileAttr); // 会同时修改页面设置,放到最后 wbTpl.setReportMobileAttr(elementCaseMobileAttr); // 会同时修改页面设置,放到最后
jwb.fireTargetModified(); jwb.fireTargetModified();

8
designer-realize/src/main/java/com/fr/design/actions/report/ReportWatermarkAction.java

@ -9,10 +9,7 @@ import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.design.report.WatermarkPane; import com.fr.design.report.WatermarkPane;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.plugin.ExtraClassManager;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -45,11 +42,6 @@ public class ReportWatermarkAction extends JWorkBookAction {
public void doOk() { public void doOk() {
wbTpl.addAttrMark(watermarkPane.update()); wbTpl.addAttrMark(watermarkPane.update());
jwb.fireTargetModified(); jwb.fireTargetModified();
// 功能点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(ReportFunctionProcessor.WATERMARK);
}
} }
}).setVisible(true); }).setVisible(true);
} }

2
designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

@ -107,7 +107,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }
String bookPath = infor.getBookPath(); String bookPath = infor.getRelativePath();
// 这个iofile只读一个templateid, 其他以后有需要再读. // 这个iofile只读一个templateid, 其他以后有需要再读.
IOFile file = new IOFile() { IOFile file = new IOFile() {
@Override @Override

5
designer-realize/src/main/java/com/fr/start/Designer.java

@ -47,6 +47,7 @@ import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.lifecycle.LifecycleFatalError;
import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLTools;
import com.fr.start.fx.SplashFx; import com.fr.start.fx.SplashFx;
import com.fr.start.jni.SplashMac; import com.fr.start.jni.SplashMac;
@ -107,7 +108,11 @@ public class Designer extends BaseDesigner {
Module designerRoot = ModuleContext.parseRoot("designer-startup.xml"); Module designerRoot = ModuleContext.parseRoot("designer-startup.xml");
//传递启动参数 //传递启动参数
designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args)); designerRoot.setSingleton(StartupArgs.class, new StartupArgs(args));
try {
designerRoot.start(); designerRoot.start();
} catch (LifecycleFatalError fatal) {
System.exit(0);
}
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
//初始化一下serverTray //初始化一下serverTray

Loading…
Cancel
Save