Browse Source

Merge pull request #118 in BA/design from ~NEIL/design:release to release

* commit '8ce32a4fffdb348e71f7a1d186a62245713b1d5c':
  1
  1
  1
  冲突
  冲突
  1
  1
  冲突
master
superman 9 years ago
parent
commit
a27d9aee82
  1. 4
      designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java
  2. 4
      designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java
  3. 100
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  4. 2
      designer_base/src/com/fr/design/condition/LiteConditionPane.java
  5. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java
  6. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java
  7. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java
  8. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java
  9. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java
  10. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java
  11. 88
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

4
designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java

@ -1,11 +1,11 @@
package com.fr.design.report.mobile; package com.fr.design.report.mobile;
import com.fr.base.mobile.MobileFitAttrState;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.base.mobile.MobileFitAttrState;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -17,7 +17,7 @@ import java.util.List;
/** /**
* Created by Administrator on 2016/5/16/0016. * Created by Administrator on 2016/5/16/0016.
*/ */
public class MobileRadioGroupPane extends BasicBeanPane<MobileFitAttrState>{ public class MobileRadioGroupPane extends BasicBeanPane<MobileFitAttrState> {
private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>(); private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>();

4
designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java

@ -1,10 +1,10 @@
package com.fr.design.report.mobile; package com.fr.design.report.mobile;
import com.fr.base.mobile.MobileFitAttrState;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr; import com.fr.report.mobile.ElementCaseMobileAttr;
import com.fr.base.mobile.MobileFitAttrState;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -12,7 +12,7 @@ import java.awt.*;
/** /**
* Created by Administrator on 2016/5/12/0012. * Created by Administrator on 2016/5/12/0012.
*/ */
public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr> {
//横屏设置面板 //横屏设置面板
private MobileRadioGroupPane horizionPane; private MobileRadioGroupPane horizionPane;

100
designer_base/src/com/fr/design/ExtraDesignClassManager.java

@ -126,7 +126,7 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
private DesignerEnvProcessor envProcessor; private DesignerEnvProcessor envProcessor;
private TableDataPaneProcessor tableDataPaneProcessor; private TableDataTreePaneProcessor tableDataTreePaneProcessor;
private Set<ElementUIProvider> elementUIProviders; private Set<ElementUIProvider> elementUIProviders;
@ -134,17 +134,23 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
private Set<ExportAttrTabProvider> exportAttrTabProviders; private Set<ExportAttrTabProvider> exportAttrTabProviders;
private Set<BackgroundQuickUIProvider> backgroundQuickUIProviders; private WidgetDesignHandler widgetDesignHandler;
private Set<BackgroundUIProvider> backgroundUIProviders; public WidgetDesignHandler getWidgetDesignHandler() {
return widgetDesignHandler;
}
public void setWidgetDesignHandler(Level level, PluginSimplify simplify) throws Exception {
widgetDesignHandler = (WidgetDesignHandler) level;
}
public TableDataPaneProcessor getTableDataPaneProcessor() { public TableDataTreePaneProcessor getTableDataTreePaneProcessor() {
return tableDataPaneProcessor; return tableDataTreePaneProcessor;
} }
public void setTableDataPaneProcessor(Level level, PluginSimplify simplify) { public void setTableDataSourceOPProcessor(Level level, PluginSimplify simplify) {
validAPILevel(level, TableDataPaneProcessor.CURRENT_LEVEL, simplify.getPluginName()); validAPILevel(level, TableDataTreePaneProcessor.CURRENT_LEVEL, simplify.getPluginName());
tableDataPaneProcessor = (TableDataPaneProcessor) level; tableDataTreePaneProcessor = (TableDataTreePaneProcessor) level;
} }
public DesignerEnvProcessor getEnvProcessor() { public DesignerEnvProcessor getEnvProcessor() {
@ -759,51 +765,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
widgetAttrProviders.add((WidgetPropertyUIProvider) level); widgetAttrProviders.add((WidgetPropertyUIProvider) level);
} }
public ExportAttrTabProvider[] getExportAttrTabProviders() {
if (exportAttrTabProviders == null) {
return new ExportAttrTabProvider[0];
}
return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]);
}
public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception {
if (exportAttrTabProviders == null) {
exportAttrTabProviders = new HashSet<ExportAttrTabProvider>();
}
validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName());
exportAttrTabProviders.add((ExportAttrTabProvider) level);
}
public BackgroundQuickUIProvider[] getBackgroundQuickUIProviders() {
if (backgroundQuickUIProviders == null) {
return new BackgroundQuickUIProvider[0];
}
return backgroundQuickUIProviders.toArray(new BackgroundQuickUIProvider[backgroundQuickUIProviders.size()]);
}
public void addBackgroundQuickUIProvider(Level level, PluginSimplify simplify) throws Exception {
if (backgroundQuickUIProviders == null) {
backgroundQuickUIProviders = new HashSet<>();
}
validAPILevel(level, BackgroundQuickUIProvider.CURRENT_LEVEL, simplify.getPluginName());
backgroundQuickUIProviders.add((BackgroundQuickUIProvider) level);
}
public BackgroundUIProvider[] getBackgroundUIProviders() {
if (backgroundUIProviders == null) {
return new BackgroundUIProvider[0];
}
return backgroundUIProviders.toArray(new BackgroundUIProvider[backgroundUIProviders.size()]);
}
public void addBackgroundUIProvider(Level level, PluginSimplify simplify) throws Exception {
if (backgroundUIProviders == null) {
backgroundUIProviders = new HashSet<>();
}
validAPILevel(level, BackgroundUIProvider.CURRENT_LEVEL, simplify.getPluginName());
backgroundUIProviders.add((BackgroundUIProvider) level);
}
/** /**
* 文件名 * 文件名
* *
@ -858,8 +819,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
readWidgetRelated(tagName, impl, simplify); readWidgetRelated(tagName, impl, simplify);
//数据集, 数据连接 //数据集, 数据连接
readTableDataRelated(tagName, className, simplify); readTableDataRelated(tagName, className, simplify);
// 样式相关的
readStyleRelated(tagName, impl, simplify);
if (tagName.equals(ParameterWidgetOptionProvider.XML_TAG)) { if (tagName.equals(ParameterWidgetOptionProvider.XML_TAG)) {
addParameterWidgetOption(impl, simplify); addParameterWidgetOption(impl, simplify);
} else if (tagName.equals(PreviewProvider.MARK_STRING)) { } else if (tagName.equals(PreviewProvider.MARK_STRING)) {
@ -894,11 +853,13 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
addSupportDesignApps(impl, simplify); addSupportDesignApps(impl, simplify);
} else if (tagName.equals(DesignerEnvProcessor.XML_TAG)) { } else if (tagName.equals(DesignerEnvProcessor.XML_TAG)) {
setEnvProcessor(impl, simplify); setEnvProcessor(impl, simplify);
} else if (tagName.equals(TableDataPaneProcessor.XML_TAG)) { } else if (tagName.equals(TableDataTreePaneProcessor.XML_TAG)) {
setTableDataPaneProcessor(impl, simplify); setTableDataSourceOPProcessor(impl, simplify);
} else if (tagName.equals(ElementUIProvider.MARK_STRING)) { } else if (tagName.equals(ElementUIProvider.MARK_STRING)) {
addElementUIProvider(impl, simplify); addElementUIProvider(impl, simplify);
} else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) { } else if (tagName.equals(WidgetDesignHandler.XML_TAG)) {
setWidgetDesignHandler(impl, simplify);
}else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) {
addWidgetAttrProvider(impl, simplify); addWidgetAttrProvider(impl, simplify);
} else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) { } else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) {
addExportAttrTabProvider(impl, simplify); addExportAttrTabProvider(impl, simplify);
@ -910,6 +871,21 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
} }
} }
public ExportAttrTabProvider[] getExportAttrTabProviders() {
if (exportAttrTabProviders == null) {
return new ExportAttrTabProvider[0];
}
return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]);
}
public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception {
if (exportAttrTabProviders == null) {
exportAttrTabProviders = new HashSet<ExportAttrTabProvider>();
}
validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName());
exportAttrTabProviders.add((ExportAttrTabProvider) level);
}
private void readTableDataRelated(String tagName, String className, PluginSimplify simplify) { private void readTableDataRelated(String tagName, String className, PluginSimplify simplify) {
if (tagName.equals(TableDataCreatorProvider.XML_TAG)) { if (tagName.equals(TableDataCreatorProvider.XML_TAG)) {
setTableDataCreatorProvider(className); setTableDataCreatorProvider(className);
@ -934,14 +910,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
} }
} }
private void readStyleRelated(String tagName, Level impl, PluginSimplify simplify) throws Exception {
if (tagName.equals(BackgroundQuickUIProvider.MARK_STRING)) {
addBackgroundQuickUIProvider(impl, simplify);
} else if (tagName.equals(BackgroundUIProvider.MARK_STRING)) {
addBackgroundUIProvider(impl, simplify);
}
}
/** /**
* 写xml * 写xml
* *

2
designer_base/src/com/fr/design/condition/LiteConditionPane.java

@ -517,6 +517,8 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
// formulaPane // formulaPane
JPanel formulaPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel formulaPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 95106 公式区域限定宽高, 显示两行即可, 在新窗口编辑.
formulaPane.setPreferredSize(new Dimension(450, 40));
formulaConditionPane.add(formulaPane, BorderLayout.CENTER); formulaConditionPane.add(formulaPane, BorderLayout.CENTER);
formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2)); formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2));
formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST); formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);

2
designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java

@ -18,7 +18,7 @@ import java.util.ArrayList;
/** /**
* Created by Administrator on 2016/5/16/0016. * Created by Administrator on 2016/5/16/0016.
*/ */
public class ElementCasePropertyTable extends AbstractPropertyTable{ public class ElementCasePropertyTable extends AbstractPropertyTable {
private XCreator xCreator; private XCreator xCreator;
private FormDesigner designer; private FormDesigner designer;

2
designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java

@ -9,7 +9,7 @@ import com.fr.general.Inter;
/** /**
* Created by Administrator on 2016/5/16/0016. * Created by Administrator on 2016/5/16/0016.
*/ */
public class ElementCasePropertyUI extends AbstractWidgetPropertyUIProvider{ public class ElementCasePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator; private XCreator xCreator;

2
designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java

@ -4,7 +4,7 @@ import com.fr.base.mobile.MobileFitAttrState;
import com.fr.design.designer.properties.items.Item; import com.fr.design.designer.properties.items.Item;
import com.fr.design.designer.properties.items.ItemProvider; import com.fr.design.designer.properties.items.ItemProvider;
public class MobileFitAlignmentItems implements ItemProvider{ public class MobileFitAlignmentItems implements ItemProvider {
private static Item[] VALUE_ITEMS; private static Item[] VALUE_ITEMS;

2
designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java

@ -6,7 +6,7 @@ import com.fr.design.mainframe.widget.editors.ComboEditor;
import java.util.Vector; import java.util.Vector;
public class MobileFitEditor extends ComboEditor{ public class MobileFitEditor extends ComboEditor {
public MobileFitEditor() { public MobileFitEditor() {
this(new MobileFitAlignmentItems()); this(new MobileFitAlignmentItems());
} }

2
designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java

@ -2,7 +2,7 @@ package com.fr.design.designer.properties.mobile;
import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer; import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer;
public class MobileFitRender extends EncoderCellRenderer{ public class MobileFitRender extends EncoderCellRenderer {
public MobileFitRender(){ public MobileFitRender(){
super(new MobileFitWrapper()); super(new MobileFitWrapper());

2
designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java

@ -2,7 +2,7 @@ package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.properties.ItemWrapper; import com.fr.design.designer.properties.ItemWrapper;
public class MobileFitWrapper extends ItemWrapper{ public class MobileFitWrapper extends ItemWrapper {
public MobileFitWrapper(){ public MobileFitWrapper(){
super(new MobileFitAlignmentItems()); super(new MobileFitAlignmentItems());
} }

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

@ -17,16 +17,16 @@ import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
public class PropertyGroupModel extends AbstractPropertyGroupModel { public class PropertyGroupModel extends AbstractPropertyGroupModel {
private FormDesigner designer; private FormDesigner designer;
public PropertyGroupModel(String name, XCreator creator, CRPropertyDescriptor[] propArray, public PropertyGroupModel(String name, XCreator creator, CRPropertyDescriptor[] propArray,
FormDesigner designer) { FormDesigner designer) {
super(name, creator, propArray); super(name, creator, propArray);
this.designer = designer; this.designer = designer;
} }
@Override @Override
public Object getValue(int row, int column) { public Object getValue(int row, int column) {
if (column == 0) { if (column == 0) {
return properties[row].getDisplayName(); return properties[row].getDisplayName();
@ -49,9 +49,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
try { try {
Method m = properties[row].getWriteMethod(); Method m = properties[row].getWriteMethod();
m.invoke(dealCreatorData(), value); m.invoke(dealCreatorData(), value);
//属性名称为控件名时,单独处理下 //属性名称为控件名时,单独处理下
if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){
creator.resetCreatorName(value.toString()); creator.resetCreatorName(value.toString());
} }
properties[row].firePropertyChanged(); properties[row].firePropertyChanged();
return true; return true;
@ -103,49 +103,49 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel {
PROPERTIES.add("Properties"); PROPERTIES.add("Properties");
PROPERTIES.add("Others"); PROPERTIES.add("Others");
} }
/** /**
* 控件属性赋值和取值时针对scale和title做下处理 * 控件属性赋值和取值时针对scale和title做下处理
* @return * @return
*/ */
private Object dealCreatorData() { private Object dealCreatorData() {
return creator.getPropertyDescriptorCreator().toData(); return creator.getPropertyDescriptorCreator().toData();
} }
@Override @Override
protected void initEditor(final int row) throws Exception { protected void initEditor(final int row) throws Exception {
ExtendedPropertyEditor editor = (ExtendedPropertyEditor) properties[row].createPropertyEditor(dealCreatorData()); ExtendedPropertyEditor editor = (ExtendedPropertyEditor) properties[row].createPropertyEditor(dealCreatorData());
if (editor == null) { if (editor == null) {
Class propType = properties[row].getPropertyType(); Class propType = properties[row].getPropertyType();
editor = TableUtils.getPropertyEditorClass(propType).newInstance(); editor = TableUtils.getPropertyEditorClass(propType).newInstance();
} }
if (editor != null) { if (editor != null) {
final ExtendedPropertyEditor extendEditor = editor; final ExtendedPropertyEditor extendEditor = editor;
editors[row] = new PropertyCellEditor(editor); editors[row] = new PropertyCellEditor(editor);
extendEditor.addPropertyChangeListener(new PropertyChangeListener() { extendEditor.addPropertyChangeListener(new PropertyChangeListener() {
@Override @Override
public void propertyChange(PropertyChangeEvent evt) { public void propertyChange(PropertyChangeEvent evt) {
if(ComparatorUtils.equals(extendEditor.getValue(),getValue(row,1))) { if(ComparatorUtils.equals(extendEditor.getValue(),getValue(row,1))) {
return; return;
} }
if (extendEditor.refreshInTime()) { if (extendEditor.refreshInTime()) {
editors[row].stopCellEditing(); editors[row].stopCellEditing();
} else { } else {
setValue(extendEditor.getValue(), row, 1); setValue(extendEditor.getValue(), row, 1);
if (designer == null) { if (designer == null) {
return; return;
} }
if ("widgetName".equals(properties[row].getName())) { if ("widgetName".equals(properties[row].getName())) {
designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_RENAMED); designer.getEditListenerTable().fireCreatorModified(creator, DesignerEvent.CREATOR_RENAMED);
} else { } else {
designer.fireTargetModified(); designer.fireTargetModified();
} }
designer.refreshDesignerUI(); designer.refreshDesignerUI();
} }
} }
}); });
} }
} }
} }
Loading…
Cancel
Save