Browse Source

Merging in latest from upstream (BA/design:refs/heads/master)

* commit '3082e43d1dcc9c1d146a38f33a739bc57410f184':
  修复不能自定义参数面板控件标签的bug
  调整布局
  还原代码
  调整布局
  还原代码
  REPORT-2171 表单里嵌套tab后, 滚动条丢失了, 所有自适应都这样
  REPORT-2242 填报提交设置的若干问题修改
  调整布局
  调整布局
  还原修改
  使用aspectJ构建
  REPORT-1858  frm组件隐藏
  REPORT-2052 压缩部署加载插件逻辑重构 design 设计器安装的时候实时改变pluginconfig
master
Mango 8 years ago
parent
commit
a7b1716be9
  1. 12
      designer/src/com/fr/design/webattr/EditToolBar.java
  2. 23
      designer_base/build.release.gradle
  3. 3
      designer_base/src/com/fr/design/extra/PluginHelper.java
  4. 20
      designer_chart/build.release.gradle
  5. 18
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  6. 2
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java
  7. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  8. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java
  9. 19
      designer_form/build.release.gradle
  10. 7
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  11. 7
      designer_form/src/com/fr/design/designer/creator/XElementCase.java
  12. 13
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  13. 1
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java
  14. 9
      designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java
  15. 3
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java
  16. 3
      designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java

12
designer/src/com/fr/design/webattr/EditToolBar.java

@ -329,15 +329,16 @@ public class EditToolBar extends BasicPane {
private JavaScriptActionPane javaScriptPane; private JavaScriptActionPane javaScriptPane;
private ExportToolBarProvider[] exportToolBarProviders; private ExportToolBarProvider[] exportToolBarProviders;
private ChangeListener changeListener = new ChangeListener() { private ActionListener actionListener = new ActionListener() {
public void stateChanged(ChangeEvent e) { @Override
public void actionPerformed(ActionEvent e) {
if (isVerify.isSelected()) { if (isVerify.isSelected()) {
failSubmit.setVisible(true); failSubmit.setVisible(true);
} else { } else {
failSubmit.setVisible(false); failSubmit.setVisible(false);
failSubmit.setSelected(false);
} }
} }
}; };
public ButtonPane() { public ButtonPane() {
@ -481,7 +482,7 @@ public class EditToolBar extends BasicPane {
submitPane.add(isVerify); submitPane.add(isVerify);
submitPane.add(failSubmit); submitPane.add(failSubmit);
submitPane.add(isCurSheet); submitPane.add(isCurSheet);
isVerify.addChangeListener(changeListener); isVerify.addActionListener(actionListener);
return submitPane; return submitPane;
} }
@ -573,6 +574,9 @@ public class EditToolBar extends BasicPane {
card.show(centerPane, "submit"); card.show(centerPane, "submit");
Submit submit = ((Submit) widget); Submit submit = ((Submit) widget);
this.isVerify.setSelected(submit.isVerify()); this.isVerify.setSelected(submit.isVerify());
if (!submit.isVerify()) {
this.failSubmit.setVisible(false);
}
this.failSubmit.setSelected(submit.isFailVerifySubmit()); this.failSubmit.setSelected(submit.isFailVerifySubmit());
this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); this.isCurSheet.setSelected(submit.isOnlySubmitSelect());
} }

23
designer_base/build.release.gradle

@ -1,8 +1,29 @@
apply plugin: 'java'
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
buildscript {
repositories {
maven {
url "http://www.eveoh.nl/files/maven2"
}
}
dependencies {
classpath "nl.eveoh:gradle-aspectj:1.2"
}
}
ext.aspectjVersion = '1.7.4'
apply plugin: 'aspectj'
repositories {
mavenCentral()
}
//jdk版本 //jdk版本
sourceCompatibility=1.8 sourceCompatibility=1.8
//jar包版本 //jar包版本

3
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -7,6 +7,7 @@ import com.fr.design.extra.plugindependence.DownLoadDependenceUI;
import com.fr.general.*; import com.fr.general.*;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.plugin.Plugin; import com.fr.plugin.Plugin;
import com.fr.plugin.PluginConfigManager;
import com.fr.stable.plugin.PluginConstants; import com.fr.stable.plugin.PluginConstants;
import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginLoader;
import com.fr.plugin.PluginManagerHelper; import com.fr.plugin.PluginManagerHelper;
@ -225,6 +226,8 @@ public class PluginHelper {
} }
// 删除放解压文件的临时文件夹 // 删除放解压文件的临时文件夹
StableUtils.deleteFile(new File(TEMP_PATH)); StableUtils.deleteFile(new File(TEMP_PATH));
PluginConfigManager.getProviderInstance().pushNewPlugin(plugin);
PluginConfigManager.getProviderInstance().syncPluginConfig();
new SwingWorker<String, Void>() { new SwingWorker<String, Void>() {
@Override @Override

20
designer_chart/build.release.gradle

@ -1,8 +1,26 @@
apply plugin: 'java'
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
buildscript {
repositories {
maven {
url "http://www.eveoh.nl/files/maven2"
}
}
dependencies {
classpath "nl.eveoh:gradle-aspectj:1.2"
}
}
ext.aspectjVersion = '1.7.4'
apply plugin: 'aspectj'
repositories {
mavenCentral()
}
//jdk版本 //jdk版本
sourceCompatibility=1.8 sourceCompatibility=1.8
//jar包的版本 //jar包的版本

18
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f }; double[] columnSize = { p, f };
double[] rowSize = { p, p, p, p, p, p, p, p}; double[] rowSize = { p, p, p, p};
Component[][] components = getPanelComponents(); Component[][] components = getPanelComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER); this.add(panel,BorderLayout.CENTER);
for(int i = 0; i < components.length; i+=2) { for(int i = 0; i < components.length; i++) {
((UICheckBox)components[i][0]).addActionListener(new ActionListener() { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() {
@Override @Override
@ -57,19 +57,15 @@ public class MinMaxValuePane extends JPanel {
checkBoxUse(); checkBoxUse();
} }
}); });
ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]); ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]);
} }
} }
protected Component[][] getPanelComponents() { protected Component[][] getPanelComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{minCheckBox}, new Component[]{minCheckBox, minValueField},
new Component[]{minValueField}, new Component[]{maxCheckBox, maxValueField},
new Component[]{maxCheckBox}, new Component[]{isCustomMainUnitBox, mainUnitField},
new Component[]{maxValueField}, new Component[]{isCustomSecUnitBox, secUnitField},
new Component[]{isCustomMainUnitBox},
new Component[]{mainUnitField},
new Component[]{isCustomSecUnitBox},
new Component[]{secUnitField},
}; };
} }

2
designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java

@ -45,7 +45,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane<ChartHyperPoplink> {
ChartCollection cc = createChartCollection(); ChartCollection cc = createChartCollection();
chartComponent = new ChartComponent(); chartComponent = new ChartComponent();
chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. chartComponent.setPreferredSize(new Dimension(200, 170));// 在单元格弹出时 需要调整保证属性表的大小.
chartComponent.setSupportEdit(false); chartComponent.setSupportEdit(false);
chartComponent.populate(cc); chartComponent.populate(cc);

2
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -79,7 +79,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
eastPane.setLayout(new BorderLayout()); eastPane.setLayout(new BorderLayout());
eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 10)); eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 5));
JPanel button = new JPanel(); JPanel button = new JPanel();
button.setPreferredSize(new Dimension(45, 20)); button.setPreferredSize(new Dimension(45, 20));
button.setLayout(new GridLayout(1, 2, 5, 0)); button.setLayout(new GridLayout(1, 2, 5, 0));

7
designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -151,11 +151,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f};
double[] rowSize = { p, p, p}; double[] rowSize = {p, p};
Component[][] component = new Component[][]{ Component[][] component = new Component[][]{
new Component[]{null,initMinMaxValue(),null}, new Component[]{null,initMinMaxValue(),null},
new Component[]{null, addLogarithmicPane2ValuePane(), null}, new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()},
new Component[]{null, null, addLogText()},
}; };
return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize);
} }

19
designer_form/build.release.gradle

@ -1,8 +1,25 @@
apply plugin: 'java'
tasks.withType(JavaCompile){ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
buildscript {
repositories {
maven {
url "http://www.eveoh.nl/files/maven2"
}
}
dependencies {
classpath "nl.eveoh:gradle-aspectj:1.2"
}
}
ext.aspectjVersion = '1.7.4'
apply plugin: 'aspectj'
repositories {
mavenCentral()
}
//jdk版本 //jdk版本
sourceCompatibility=1.7 sourceCompatibility=1.7
//jar包版本 //jar包版本

7
designer_form/src/com/fr/design/designer/creator/XChartEditor.java

@ -85,6 +85,13 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
return new CRPropertyDescriptor[] { return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("Form-Widget_Name")), .getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName( WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

7
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -83,6 +83,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{ CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetName", this.data.getClass()) new CRPropertyDescriptor("widgetName", this.data.getClass())
.setI18NName(Inter.getLocText("Form-Widget_Name")), .setI18NName(Inter.getLocText("Form-Widget_Name")),
new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName(
Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
makeVisible(toData().isVisible());}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setI18NName( WLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")

13
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -8,6 +8,7 @@ import java.awt.event.ContainerEvent;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
@ -16,6 +17,7 @@ import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter;
import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.form.layout.FRAbsoluteLayout; import com.fr.design.form.layout.FRAbsoluteLayout;
import com.fr.design.icon.IconPathConstants; import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
@ -154,8 +156,15 @@ public class XWAbsoluteLayout extends XLayoutContainer {
if (xCreator.acceptType(XWAbsoluteLayout.class)){ if (xCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) xCreator).updateBoundsWidget(); ((XWAbsoluteLayout) xCreator).updateBoundsWidget();
} }
BoundsWidget boundsWidget = (BoundsWidget) layout.getBoundsWidget(xCreator.toData()); // 如果子组件时tab布局,则tab布局内部的组件的wiget也要更新,否则保存后重新打开大小不对
Rectangle rectangle = dealWidgetBound(xCreator.getBounds()); ArrayList<?> childrenList = xCreator.getTargetChildrenList();
if(!childrenList.isEmpty()){
for(int i=0; i<childrenList.size(); i++){
XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(i);
tabLayout.updateBoundsWidget();
}
}
BoundsWidget boundsWidget = (BoundsWidget) layout.getBoundsWidget(xCreator.toData()); Rectangle rectangle = dealWidgetBound(xCreator.getBounds());
} }
private Rectangle calculateBound(Rectangle rec, double pw, double ph){ private Rectangle calculateBound(Rectangle rec, double pw, double ph){

1
designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

@ -759,6 +759,7 @@ public class XWFitLayout extends XLayoutContainer {
//如果子组件是绝对布局,则内部的widget也要更新 //如果子组件是绝对布局,则内部的widget也要更新
if (creator.acceptType(XWAbsoluteLayout.class)){ if (creator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) creator).updateBoundsWidget(); ((XWAbsoluteLayout) creator).updateBoundsWidget();
creator.setBackupBound(creator.getBounds());
} }
} }
layout.setContainerHeight(containerHeight); layout.setContainerHeight(containerHeight);

9
designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java

@ -146,6 +146,15 @@ public abstract class XWidgetCreator extends XCreator {
} }
} }
/**
* 渲染Painter
*/
public void paint(Graphics g) {
//不可见时,按钮.4f透明
AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY);
((Graphics2D)g).setComposite(composite);
super.paint(g);
}
/** /**
* 重命名 * 重命名
* *

3
designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

@ -53,6 +53,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){
creator.resetCreatorName(value.toString()); creator.resetCreatorName(value.toString());
} }
if(ComparatorUtils.equals("visible", properties[row].getName())){
creator.resetVisible((boolean) value);
}
properties[row].firePropertyChanged(); properties[row].firePropertyChanged();
return true; return true;
} catch (Exception e) { } catch (Exception e) {

3
designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java

@ -305,9 +305,12 @@ class MobileParaWidgetTable extends JTable {
/** /**
* cell改变相应的nametag改变 * cell改变相应的nametag改变
*/ */
private void firePropertyChange(){ private void firePropertyChange(){
((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(), ((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(),
cellData[getSelectedRow()][1]); cellData[getSelectedRow()][1]);
((WParameterLayout) designer.getParaComponent().toData()).setNameTagModified(cellData[getSelectedRow()][1],
true);
} }
@Override @Override

Loading…
Cancel
Save