Browse Source

Merge remote-tracking branch 'origin/release/9.0' into release/9.0

master
mengao 7 years ago
parent
commit
68b02f1c05
  1. 44
      designer_base/src/com/fr/design/file/HistoryTemplateListPane.java
  2. 47
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  3. 21
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

44
designer_base/src/com/fr/design/file/HistoryTemplateListPane.java

@ -1,31 +1,20 @@
package com.fr.design.file; package com.fr.design.file;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.*;
import java.util.List;
import java.util.logging.Level;
import javax.swing.*;
import com.fr.design.constants.UIConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList; import com.fr.design.gui.ilist.UIList;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
@ -33,9 +22,19 @@ import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.design.utils.gui.GUIPaintUtils;
public class HistoryTemplateListPane extends JPanel implements FileOperations { import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
public class HistoryTemplateListPane extends JPanel implements FileOperations, CallbackEvent{
private static final int LIST_BORDER = 4; private static final int LIST_BORDER = 4;
private List<JTemplate<?, ?>> historyList; private List<JTemplate<?, ?>> historyList;
private JTemplate<?, ?> editingTemplate; private JTemplate<?, ?> editingTemplate;
@ -228,6 +227,11 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
return ComparatorUtils.equals(filename, editingFileName); return ComparatorUtils.equals(filename, editingFileName);
} }
@Override
public void callback() {
getCurrentEditingTemplate().repaint();
}
private class HistoryListCellRender extends DefaultListCellRenderer { private class HistoryListCellRender extends DefaultListCellRenderer {

47
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -9,8 +9,25 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.IndependentChartUIProvider; import com.fr.design.chart.fun.IndependentChartUIProvider;
import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.chartinterface.*; import com.fr.design.chartinterface.AreaIndependentChartInterface;
import com.fr.design.chartinterface.BarIndependentChartInterface;
import com.fr.design.chartinterface.BubbleIndependentChartInterface;
import com.fr.design.chartinterface.ColumnIndependentChartInterface;
import com.fr.design.chartinterface.CustomIndependentChartInterface;
import com.fr.design.chartinterface.DonutIndependentChartInterface;
import com.fr.design.chartinterface.FunnelIndependentChartInterface;
import com.fr.design.chartinterface.GanttIndependentChartInterface;
import com.fr.design.chartinterface.GisMapIndependentChartInterface;
import com.fr.design.chartinterface.LineIndependentChartInterface;
import com.fr.design.chartinterface.MapIndependentChartInterface;
import com.fr.design.chartinterface.MeterIndependentChartInterface;
import com.fr.design.chartinterface.PieIndependentChartInterface;
import com.fr.design.chartinterface.RadarIndependentChartInterface;
import com.fr.design.chartinterface.RangeIndependentChartInterface;
import com.fr.design.chartinterface.StockIndependentChartInterface;
import com.fr.design.chartinterface.XYScatterIndependentChartInterface;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -60,22 +77,23 @@ import com.fr.plugin.chart.structure.VanChartStructurePlot;
import com.fr.plugin.chart.structure.desinger.StructureIndependentVanChartInterface; import com.fr.plugin.chart.structure.desinger.StructureIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.TreeMapIndependentVanChartInterface; import com.fr.plugin.chart.treemap.TreeMapIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot; import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import com.fr.plugin.chart.wordcloud.designer.WordCloudIndependentVanChartInterface; import com.fr.plugin.chart.wordcloud.designer.WordCloudIndependentVanChartInterface;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.injectable.PluginSingleInjection; import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.solution.closeable.CloseableContainedMap; import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*; import javax.swing.*;
import java.util.*; import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/** /**
* Created by eason on 14/12/29. * Created by eason on 14/12/29.
@ -100,20 +118,13 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
} }
static { static {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override @Override
public void on(PluginEvent event) { public void envChanged() {
//重新注册designModuleFactory //重新注册designModuleFactory
DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption());
} DesignImageEvent.registerDefaultCallbackEvent(HistoryTemplateListPane.getInstance());
}, new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraChartType);
} }
}); });
} }

21
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -1,6 +1,7 @@
package com.fr.plugin.chart.map.designer.type; package com.fr.plugin.chart.map.designer.type;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ParameterHolder;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -40,7 +41,12 @@ import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode; import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath; import javax.swing.tree.TreePath;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
@ -511,16 +517,9 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
return new String[0]; return new String[0];
} }
String[] params = new String[0]; String[] params = new String[0];
//区分是表单还是cpt if(jTemplate.getTarget() instanceof ParameterHolder){
//todo@shine9.0 params = getParamsName(((ParameterHolder)jTemplate.getTarget()).getParameters());
// if (jTemplate instanceof JWorkBook) { }
// ReportParameterAttr rpa = ((JWorkBook)jTemplate).getTarget().getReportParameterAttr();
// if (rpa != null) {
// params = getParamsName(rpa.getParameters());
// }
// }else if (jTemplate instanceof JForm){
// params = getParamsName(((JForm)jTemplate).getTarget().getParameters());
// }
return params; return params;
} }

Loading…
Cancel
Save