Browse Source

修改代码中存在的一些问题。

修改文件名,删除多余的类,修改一些方法。
master
mengao 8 years ago
parent
commit
b306c9d5fe
  1. 4
      designer/src/com/fr/quickeditor/ChartQuickEditor.java
  2. 3
      designer_base/src/com/fr/design/gui/chart/BaseChartPropertyPane.java
  3. 256
      designer_base/src/com/fr/design/module/DesignModuleFactory.java
  4. 6
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  5. 4
      designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java
  6. 2
      designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java
  7. 12
      designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java
  8. 10
      designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java
  9. 20
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  10. 28
      designer_chart/src/com/fr/design/mainframe/chart/ThirdChartEditPane.java
  11. 11
      designer_chart/src/com/fr/design/mainframe/chart/ThirdChartInterface.java

4
designer/src/com/fr/quickeditor/ChartQuickEditor.java

@ -46,9 +46,9 @@ public class ChartQuickEditor extends QuickEditor<TargetComponent>{
element = ((ElementCasePane)tc).getEditingElementCase().getFloatElement(fs.getSelectedFloatName());
}
collection = (BaseChartCollection) element.getValue();
//将chartCollection存在DesignModuleFactory
DesignModuleFactory.setChartCollection((ChartCollection) collection);
add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER);
editingPropertyPane.addChartEditPane(((ChartCollection)collection).getSelectedChart().getPlot().getPlotID());
editingPropertyPane.setSupportCellData(true);
}
editingPropertyPane.populateChartPropertyPane(collection, tc);

3
designer_base/src/com/fr/design/gui/chart/BaseChartPropertyPane.java

@ -2,7 +2,6 @@ package com.fr.design.gui.chart;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.designer.TargetComponent;
import com.fr.design.mainframe.BaseWidgetPropertyPane;
import com.fr.design.mainframe.DockingView;
/**
@ -23,5 +22,7 @@ public abstract class BaseChartPropertyPane extends DockingView {
public abstract ChartEditPaneProvider getChartEditPane();
public abstract void addChartEditPane(String plotID);
//public abstract void clear();
}

256
designer_base/src/com/fr/design/module/DesignModuleFactory.java

File diff suppressed because one or more lines are too long

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

@ -12,10 +12,10 @@ import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.chartinterface.*;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.extra.ChartTypeInterfaceCloseableHandler;
import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
@ -415,7 +415,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
}
//获取指定图表的编辑面板
public ChartEditPane getChartConfigPane(String plotID) {
public ChartEditPaneProvider getChartConfigPane(String plotID) {
Iterator iterator = chartTypeInterfaces.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry entry = (Map.Entry) iterator.next();
@ -427,7 +427,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
return getChartConfigPane(ChartTypeManager.CHART_PRIORITY, plotID);
}
private ChartEditPane getChartConfigPane(String priority, String plotID) {
private ChartEditPaneProvider getChartConfigPane(String priority, String plotID) {
return chartTypeInterfaces.get(priority).get(plotID).getChartConfigPane(plotID);
}

4
designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

@ -3,9 +3,9 @@ package com.fr.design.chart.fun;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
@ -90,6 +90,6 @@ public interface IndependentChartUIProvider extends Level {
*/
String getPlotTypeTitle4PopupWindow();
ChartEditPane getChartConfigPane(String plotID);
ChartEditPaneProvider getChartConfigPane(String plotID);
}

2
designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI4Custom.java

@ -21,7 +21,7 @@ import com.fr.general.ComparatorUtils;
*/
public abstract class AbstractIndependentChartUI4Custom implements IndependentChartUIProvider {
int CURRENT_API_LEVEL = 3;
int CURRENT_API_LEVEL = 100000;
@Override
public AbstractChartTypePane getPlotTypePane() {
return new PiePlotPane();

12
designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java

@ -3,15 +3,11 @@
*/
package com.fr.design.mainframe;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.SwingConstants;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.*;
import java.awt.*;
public class ChartPropertyPane extends MiddleChartPropertyPane{
/**
@ -21,8 +17,6 @@ public class ChartPropertyPane extends MiddleChartPropertyPane{
if(singleton == null) {
singleton = new ChartPropertyPane();
}
singleton.setSureProperty();
return singleton;
}

10
designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -14,7 +14,6 @@ import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itabpane.TitleChangeListener;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.general.Inter;
import javax.swing.*;
@ -26,9 +25,6 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
protected UILabel nameLabel;
protected ChartEditPane chartEditPane;
//获取ChartCollection和当前图表的plotID,用来获取对应的面板
protected ChartCollection chartCollection = DesignModuleFactory.getChartCollection();
protected String plotID = chartCollection.getSelectedChart().getPlot().getPlotID();
public MiddleChartPropertyPane() {
initComponenet();
@ -40,9 +36,13 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
createNameLabel();
this.add(createNorthComponent(), BorderLayout.NORTH);
chartEditPane = ChartTypeInterfaceManager.getInstance().getChartConfigPane(plotID);
}
public void addChartEditPane(String plotID){
chartEditPane = (ChartEditPane) ChartTypeInterfaceManager.getInstance().getChartConfigPane(plotID);
chartEditPane.setSupportCellData(true);
this.createMainPane();
setSureProperty();
}
protected abstract void createNameLabel();

20
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -5,10 +5,10 @@ import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ibutton.UIHeadGroup;
@ -31,7 +31,7 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class ChartEditPane extends BasicBeanPane implements AttributeChange,Prepare4DataSourceChange, ChartEditPaneProvider {
public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4DataSourceChange, ChartEditPaneProvider {
private final static int CHANGE_MIN_TIME = 80;
@ -49,10 +49,8 @@ public class ChartEditPane extends BasicBeanPane implements AttributeChange,Prep
private ChartCollection lastCollection;
protected CardLayout card;
protected JPanel center;
protected TargetComponentContainer container = null;
protected TitleChangeListener titleChangeListener = null;
protected ChartEditPane chartEditPane =this;
private TargetComponentContainer container = null;
private TitleChangeListener titleChangeListener = null;
private Calendar lastTime;
protected ChartEditPane() {
@ -348,14 +346,4 @@ public class ChartEditPane extends BasicBeanPane implements AttributeChange,Prep
}
});
}
//添加populate和update方法,第三方图表继承使用
@Override
public void populateBean(Object ob) {
}
@Override
public Object updateBean() {
return null;
}
}

28
designer_chart/src/com/fr/design/mainframe/chart/CustomChartEditPane.java → designer_chart/src/com/fr/design/mainframe/chart/ThirdChartEditPane.java

@ -3,9 +3,9 @@ package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.itabpane.TitleChangeListener;
import com.fr.design.mainframe.TargetComponentContainer;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -15,7 +15,7 @@ import java.awt.*;
/**
* Created by mengao on 2017/5/3.
*/
public class CustomChartEditPane extends ChartEditPane {
public abstract class ThirdChartEditPane extends ChartEditPane implements ChartEditPaneProvider, ThirdChartInterface {
//构建主面板
protected void createTabsPane() {
Icon[] iconArray = new Icon[paneList.size()];
@ -34,7 +34,7 @@ public class CustomChartEditPane extends ChartEditPane {
AttributeChangeListener listener = new AttributeChangeListener() {
@Override
public void attributeChange() {
chartEditPane.updateBean(collection.getSelectedChart());
updateBean(collection.getSelectedChart());
}
};
@ -72,16 +72,6 @@ public class CustomChartEditPane extends ChartEditPane {
int index = Math.min(tabsHeaderIconPane.getSelectedIndex(), paneList.size() - 1);
return paneList.get(index).title4PopupWindow();
}
/**
* 添加标题变化监听事件.
*
* @param titleChangeListener 标题的ChangeListener
*/
public void addTitleChangeListener(TitleChangeListener titleChangeListener) {
this.titleChangeListener = titleChangeListener;
}
/**
* 设置容器.
*/
@ -92,7 +82,7 @@ public class CustomChartEditPane extends ChartEditPane {
public void populate(ChartCollection collection) {
chartEditPane.populateBean(collection.getSelectedChart());
populateBean(collection.getSelectedChart());
}
protected ChartEditPane getCurrentChartEditPane() {
@ -145,7 +135,7 @@ public class CustomChartEditPane extends ChartEditPane {
}
protected void dealWithStyleChange(){
chartEditPane.populateBean(collection.getSelectedChart());
populateBean(collection.getSelectedChart());
}
/**
@ -160,7 +150,7 @@ public class CustomChartEditPane extends ChartEditPane {
* 图表设计器显示选中的面板
*/
public void populateSelectedTabPane() {
chartEditPane.populateBean(collection.getSelectedChart());
populateBean(collection.getSelectedChart());
}
/**
@ -169,4 +159,10 @@ public class CustomChartEditPane extends ChartEditPane {
public void registerDSChangeListener() {
}
@Override
protected String title4PopupWindow() {
return null;
}
}

11
designer_chart/src/com/fr/design/mainframe/chart/ThirdChartInterface.java

@ -0,0 +1,11 @@
package com.fr.design.mainframe.chart;
/**
* Created by mengao on 2017/5/8.
*/
public interface ThirdChartInterface {
void populateBean(Object ob);
void updateBean(Object ob);
}
Loading…
Cancel
Save