Browse Source

冲突

master
neil 9 years ago
parent
commit
9e607e097c
  1. 97
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  2. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java
  3. 2
      designer_form/src/com/fr/design/designer/properties/mobile/ElementCasePropertyUI.java
  4. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java
  5. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitEditor.java
  6. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitRender.java
  7. 2
      designer_form/src/com/fr/design/designer/properties/mobile/MobileFitWrapper.java
  8. 88
      designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java

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

@ -126,11 +126,13 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
private DesignerEnvProcessor envProcessor;
private TableDataPaneProcessor tableDataPaneProcessor;
private TableDataTreePaneProcessor tableDataTreePaneProcessor;
private Set<ElementUIProvider> elementUIProviders;
private Set<WidgetAttrProvider> widgetAttrProviders;
private Set<WidgetPropertyUIProvider> widgetAttrProviders;
private Set<ExportAttrTabProvider> exportAttrTabProviders;
private WidgetDesignHandler widgetDesignHandler;
@ -142,17 +144,13 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
widgetDesignHandler = (WidgetDesignHandler) level;
}
private Set<BackgroundQuickUIProvider> backgroundQuickUIProviders;
private Set<BackgroundUIProvider> backgroundUIProviders;
public TableDataPaneProcessor getTableDataPaneProcessor() {
return tableDataPaneProcessor;
public TableDataTreePaneProcessor getTableDataTreePaneProcessor() {
return tableDataTreePaneProcessor;
}
public void setTableDataPaneProcessor(Level level, PluginSimplify simplify) {
validAPILevel(level, TableDataPaneProcessor.CURRENT_LEVEL, simplify.getPluginName());
tableDataPaneProcessor = (TableDataPaneProcessor) level;
public void setTableDataSourceOPProcessor(Level level, PluginSimplify simplify) {
validAPILevel(level, TableDataTreePaneProcessor.CURRENT_LEVEL, simplify.getPluginName());
tableDataTreePaneProcessor = (TableDataTreePaneProcessor) level;
}
public DesignerEnvProcessor getEnvProcessor() {
@ -752,49 +750,19 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
elementUIProviders.add((ElementUIProvider) level);
}
public WidgetAttrProvider[] getWidgetAttrProviders() {
public WidgetPropertyUIProvider[] getWidgetAttrProviders() {
if (widgetAttrProviders == null) {
return new WidgetAttrProvider[0];
return new WidgetPropertyUIProvider[0];
}
return widgetAttrProviders.toArray(new WidgetAttrProvider[widgetAttrProviders.size()]);
return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]);
}
public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception {
if (widgetAttrProviders == null) {
widgetAttrProviders = new HashSet<WidgetAttrProvider>();
}
validAPILevel(level, WidgetAttrProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetAttrProviders.add((WidgetAttrProvider) 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<>();
widgetAttrProviders = new HashSet<WidgetPropertyUIProvider>();
}
validAPILevel(level, BackgroundUIProvider.CURRENT_LEVEL, simplify.getPluginName());
backgroundUIProviders.add((BackgroundUIProvider) level);
validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetAttrProviders.add((WidgetPropertyUIProvider) level);
}
/**
@ -851,8 +819,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
readWidgetRelated(tagName, impl, simplify);
//数据集, 数据连接
readTableDataRelated(tagName, className, simplify);
// 样式相关的
readStyleRelated(tagName, impl, simplify);
if (tagName.equals(ParameterWidgetOptionProvider.XML_TAG)) {
addParameterWidgetOption(impl, simplify);
} else if (tagName.equals(PreviewProvider.MARK_STRING)) {
@ -887,14 +853,16 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
addSupportDesignApps(impl, simplify);
} else if (tagName.equals(DesignerEnvProcessor.XML_TAG)) {
setEnvProcessor(impl, simplify);
} else if (tagName.equals(TableDataPaneProcessor.XML_TAG)) {
setTableDataPaneProcessor(impl, simplify);
} else if (tagName.equals(TableDataTreePaneProcessor.XML_TAG)) {
setTableDataSourceOPProcessor(impl, simplify);
} else if (tagName.equals(ElementUIProvider.MARK_STRING)) {
addElementUIProvider(impl, simplify);
} else if (tagName.equals(WidgetAttrProvider.XML_TAG)) {
addWidgetAttrProvider(impl, simplify);
} else if (tagName.equals(WidgetDesignHandler.XML_TAG)) {
setWidgetDesignHandler(impl, simplify);
}else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) {
addWidgetAttrProvider(impl, simplify);
} else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) {
addExportAttrTabProvider(impl, simplify);
}
} catch (PluginInvalidLevelException e) {
PluginMessage.remindUpdate(e.getMessage());
@ -903,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) {
if (tagName.equals(TableDataCreatorProvider.XML_TAG)) {
setTableDataCreatorProvider(className);
@ -927,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
*

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