Browse Source

Merge pull request #155 in DESIGN/design from ~ZHENG/c-design:release/10.0 to release/10.0

* commit '4f20da587e7dfa481149d14e142f76f03ee41f88':
  update
  CHART-2426 注册图表编辑器
master
zheng 7 years ago
parent
commit
f1fc23bdfb
  1. 25
      designer-base/src/com/fr/design/actions/core/ActionFactory.java
  2. 27
      designer-realize/src/com/fr/design/module/DesignerModule.java
  3. 1
      designer-realize/src/com/fr/start/module/DesignerModuleActivator.java

25
designer-base/src/com/fr/design/actions/core/ActionFactory.java

@ -9,7 +9,8 @@ import com.fr.design.menu.MenuKeySet;
import com.fr.design.selection.QuickEditor; import com.fr.design.selection.QuickEditor;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import javax.swing.*; import javax.swing.Action;
import javax.swing.KeyStroke;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.util.ArrayList; import java.util.ArrayList;
@ -139,28 +140,6 @@ public class ActionFactory {
chartPreStyleAction = action; chartPreStyleAction = action;
} }
/**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
*
* @param editorClass 悬浮元素图表编辑器类
*/
public static void registerChartFloatEditorInEditor(Class<? extends QuickEditor> editorClass) {
if (chartCollectionClass != null) {
registerFloatEditorClass(chartCollectionClass, editorClass);
}
}
/**
* kunsnat: 图表注册 单元格元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
*
* @param editorClass 单元格元素图表编辑器类
*/
public static void registerChartCellEditorInEditor(Class<? extends QuickEditor> editorClass) {
if (chartCollectionClass != null) {
registerCellEditorClass(chartCollectionClass, editorClass);
}
}
/** /**
* 图表预定义样式Action * 图表预定义样式Action
* *

27
designer-realize/src/com/fr/design/module/DesignerModule.java

@ -13,6 +13,7 @@ import com.fr.base.frpx.exception.InvalidWorkBookException;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.base.process.ProcessOperator; import com.fr.base.process.ProcessOperator;
import com.fr.base.remote.RemoteDeziConstants; import com.fr.base.remote.RemoteDeziConstants;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -49,13 +50,13 @@ import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.general.xml.GeneralXMLTools; import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter; import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter; import com.fr.io.importer.ExcelReportImporter;
import com.fr.io.utils.ResourceIOUtils; import com.fr.io.utils.ResourceIOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.main.impl.WorkBookAdapter; import com.fr.main.impl.WorkBookAdapter;
import com.fr.main.impl.WorkBookX; import com.fr.main.impl.WorkBookX;
@ -130,25 +131,27 @@ public class DesignerModule extends DesignModule {
GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder(); GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder();
addAdapterForPlate(); addAdapterForPlate();
registerCellEditor();
registerFloatEditor();
registerData4Form();
registerOtherPane();
InformationCollector.getInstance().collectStartTime(); InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance());
} }
private void registerOtherPane() { public static void register() {
registerCellEditor();
registerFloatEditor();
registerData4Form();
registerOtherPane();
}
private static void registerOtherPane() {
StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class); StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class);
} }
/** /**
* kunsnat:注册单元格选中Editor * kunsnat:注册单元格选中Editor
*/ */
private void registerCellEditor() { private static void registerCellEditor() {
ActionFactory.registerCellEditor(String.class, new CellStringQuickEditor()); ActionFactory.registerCellEditor(String.class, new CellStringQuickEditor());
ActionFactory.registerCellEditor(Number.class, new CellStringQuickEditor()); ActionFactory.registerCellEditor(Number.class, new CellStringQuickEditor());
@ -161,7 +164,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerCellEditor(BufferedImage.class, new CellImageQuickEditor()); ActionFactory.registerCellEditor(BufferedImage.class, new CellImageQuickEditor());
ActionFactory.registerCellEditor(CellImagePainter.class, new CellImageQuickEditor()); ActionFactory.registerCellEditor(CellImagePainter.class, new CellImageQuickEditor());
//todo 图表编辑器populate没能实现刷新面板显示 //todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class); ActionFactory.registerCellEditorClass(ChartCollection.class, BasicChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { for (ElementUIProvider provider : providers) {
@ -183,7 +186,7 @@ public class DesignerModule extends DesignModule {
/** /**
* kunnat: 注册悬浮选中Editor * kunnat: 注册悬浮选中Editor
*/ */
private void registerFloatEditor() { private static void registerFloatEditor() {
ActionFactory.registerFloatEditor(String.class, new FloatStringQuickEditor()); ActionFactory.registerFloatEditor(String.class, new FloatStringQuickEditor());
ActionFactory.registerFloatEditor(Formula.class, new FloatStringQuickEditor()); ActionFactory.registerFloatEditor(Formula.class, new FloatStringQuickEditor());
@ -191,7 +194,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerFloatEditor(BufferedImage.class, new FloatImageQuickEditor()); ActionFactory.registerFloatEditor(BufferedImage.class, new FloatImageQuickEditor());
ActionFactory.registerFloatEditor(CellImagePainter.class, new FloatImageQuickEditor()); ActionFactory.registerFloatEditor(CellImagePainter.class, new FloatImageQuickEditor());
//todo 图表编辑器populate没能实现刷新面板显示 //todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class); ActionFactory.registerFloatEditorClass(ChartCollection.class, FloatChartQuickEditor.class);
} }
/** /**
@ -493,7 +496,7 @@ public class DesignerModule extends DesignModule {
} }
private void registerData4Form() { private static void registerData4Form() {
StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class); StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class);
StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class); StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class);
DesignModuleFactory.registerParameterReader(new WorkBookParameterReader()); DesignModuleFactory.registerParameterReader(new WorkBookParameterReader());

1
designer-realize/src/com/fr/start/module/DesignerModuleActivator.java

@ -19,6 +19,7 @@ public class DesignerModuleActivator extends Activator implements Prepare {
ModuleContext.startModule(DesignerModule.class.getName()); ModuleContext.startModule(DesignerModule.class.getName());
DesignerModule.register();
ChartDesignerModule.register(); ChartDesignerModule.register();
} }

Loading…
Cancel
Save