Browse Source

CHART-2426 注册图表编辑器

master
zheng 6 years ago
parent
commit
694b6e266a
  1. 25
      designer-base/src/com/fr/design/actions/core/ActionFactory.java
  2. 7
      designer-realize/src/com/fr/design/module/DesignerModule.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.log.FineLoggerFactory;
import javax.swing.*;
import javax.swing.Action;
import javax.swing.KeyStroke;
import java.awt.event.KeyEvent;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
@ -139,28 +140,6 @@ public class ActionFactory {
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
*

7
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.process.ProcessOperator;
import com.fr.base.remote.RemoteDeziConstants;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager;
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.file.FILE;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter;
import com.fr.general.ModuleContext;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter;
import com.fr.io.utils.ResourceIOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.main.impl.WorkBook;
import com.fr.main.impl.WorkBookAdapter;
import com.fr.main.impl.WorkBookX;
@ -161,7 +162,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerCellEditor(BufferedImage.class, new CellImageQuickEditor());
ActionFactory.registerCellEditor(CellImagePainter.class, new CellImageQuickEditor());
//todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class);
ActionFactory.registerCellEditorClass(ChartCollection.class, BasicChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
@ -191,7 +192,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerFloatEditor(BufferedImage.class, new FloatImageQuickEditor());
ActionFactory.registerFloatEditor(CellImagePainter.class, new FloatImageQuickEditor());
//todo 图表编辑器populate没能实现刷新面板显示
ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class);
ActionFactory.registerFloatEditorClass(ChartCollection.class, FloatChartQuickEditor.class);
}
/**

Loading…
Cancel
Save