Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
97e461b5c1
  1. 10
      designer/src/com/fr/design/expand/SortExpandAttrPane.java
  2. 8
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  3. 16
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  4. 40
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  5. 24
      designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java
  6. 2
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  7. BIN
      designer_base/src/com/fr/design/images/expand/asc_selected.png
  8. BIN
      designer_base/src/com/fr/design/images/expand/des_selected.png
  9. BIN
      designer_base/src/com/fr/design/images/expand/landspace_selected@1x.png
  10. BIN
      designer_base/src/com/fr/design/images/expand/none16x16_selected@1x.png
  11. BIN
      designer_base/src/com/fr/design/images/expand/vertical_selected@1x.png
  12. 4
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  13. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  14. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  15. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  16. 32
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  17. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  18. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java
  19. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java
  20. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java
  21. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java
  22. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java
  23. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java
  24. 26
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java
  25. 15
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java
  26. 12
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java
  27. 21
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java
  28. 17
      designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java
  29. 4
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  30. 15
      designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java
  31. 7
      designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java
  32. 2
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  33. 2
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  34. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java
  35. 8
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java
  36. 20
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java
  37. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java
  38. 9
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java
  39. 3
      designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java
  40. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java
  41. 7
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  42. 9
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java
  43. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  44. 26
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  45. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java
  46. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java
  47. 8
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java
  48. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  49. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  50. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  51. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  52. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java
  53. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  54. 76
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java
  55. 9
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  56. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java
  57. 24
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  58. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  59. 24
      designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java
  60. 3
      designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java
  61. 4
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  62. 16
      designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java
  63. 1
      designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java
  64. 25
      designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java
  65. 15
      designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java
  66. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java
  67. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java
  68. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java
  69. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java
  70. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java
  71. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java
  72. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  73. 17
      designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java
  74. 17
      designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java
  75. 19
      designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java

10
designer/src/com/fr/design/expand/SortExpandAttrPane.java

@ -24,11 +24,11 @@ public class SortExpandAttrPane extends JPanel {
public SortExpandAttrPane() { public SortExpandAttrPane() {
this.setLayout(new BorderLayout(0, 4)); this.setLayout(new BorderLayout(0, 4));
Icon[] iconArray = { Icon[][] iconArray = {
BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), {BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), BaseUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")},
BaseUtils.readIcon("/com/fr/design/images/expand/asc.png"), {BaseUtils.readIcon("/com/fr/design/images/expand/asc.png"), BaseUtils.readIcon("/com/fr/design/images/expand/asc_selected.png")},
BaseUtils.readIcon("/com/fr/design/images/expand/des.png") {BaseUtils.readIcon("/com/fr/design/images/expand/des.png"), BaseUtils.readIcon("/com/fr/design/images/expand/des_selected.png")}
}; };
String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") }; String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") };
sort_type_pane = new UIButtonGroup(iconArray); sort_type_pane = new UIButtonGroup(iconArray);
sort_type_pane.setAllToolTips(nameArray); sort_type_pane.setAllToolTips(nameArray);

8
designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java

@ -45,10 +45,10 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
*/ */
public JPanel createContentPane() { public JPanel createContentPane() {
String[] nameArray = {Inter.getLocText("ExpandD-Not_Expand"), Inter.getLocText("Utils-Top_to_Bottom"), Inter.getLocText("Utils-Left_to_Right")}; String[] nameArray = {Inter.getLocText("ExpandD-Not_Expand"), Inter.getLocText("Utils-Top_to_Bottom"), Inter.getLocText("Utils-Left_to_Right")};
Icon[] iconArray = { Icon[][] iconArray = {
BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), {BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), BaseUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")},
BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), {BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), BaseUtils.readIcon("/com/fr/design/images/expand/vertical_selected@1x.png")},
BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png") {BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png"), BaseUtils.readIcon("/com/fr/design/images/expand/landspace_selected@1x.png")}
}; };
Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT}; Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT};
expandDirectionButton = new UIButtonGroup<Byte>(iconArray, valueArray); expandDirectionButton = new UIButtonGroup<Byte>(iconArray, valueArray);

16
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -193,6 +193,16 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
JPanel leftTopPane = getLeftTopPane(topToolBar);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));
leftPane.add(leftTopPane, BorderLayout.NORTH);
return leftPane;
}
protected JPanel getLeftTopPane (UIToolbar topToolBar) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f}; double[] columnSize = { p, f};
@ -200,11 +210,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar}, new Component[]{new UILabel(getAddItemText()), topToolBar},
}; };
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));
leftPane.add(leftTopPane, BorderLayout.NORTH);
return leftPane;
} }
/** /**

40
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -44,6 +44,10 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
this(iconArray, null); this(iconArray, null);
} }
public UIButtonGroup(Icon[][] iconArray) {
this(iconArray, null);
}
public UIButtonGroup(Icon[] iconArray, T[] objects) { public UIButtonGroup(Icon[] iconArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) { if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) {
this.objectList = Arrays.asList(objects); this.objectList = Arrays.asList(objects);
@ -80,6 +84,42 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
} }
} }
public UIButtonGroup(Icon[][] iconArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) {
this.objectList = Arrays.asList(objects);
}
labelButtonList = new ArrayList<UIToggleButton>(iconArray.length);
this.setLayout(getGridLayout(iconArray.length));
this.setBorder(getGroupBorder());
for (int i = 0; i < iconArray.length; i++) {
final int index = i;
Icon[] icon = iconArray[i];
final UIToggleButton labelButton = new UIToggleButton(icon) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
isClick = true;
if (!isEnabled()) {
return;
}
if (globalNameListener != null) {
globalNameListener.setGlobalName(buttonGroupName);
}
setSelectedWithFireChanged(index);
}
};
}
public boolean shouldResponseNameListener() {
return false;
}
};
initButton(labelButton);
}
}
public boolean hasClick() { public boolean hasClick() {
return isClick; return isClick;
} }

24
designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java

@ -3,12 +3,13 @@ package com.fr.design.gui.ibutton;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Shape; import java.awt.Shape;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.awt.geom.RoundRectangle2D; import java.awt.geom.RoundRectangle2D;
import javax.swing.Icon; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
@ -46,6 +47,26 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
addMouseListener(getMouseListener()); addMouseListener(getMouseListener());
} }
/**
* 需要反白的按钮接口
* support icons[normalIcon, selectedIcon]
* @param icons
*/
public UIToggleButton(Icon[] icons) {
super(icons[0], null, icons[1]);
setSelectedIcon(icons[1]);
setExtraPainted(true);
addActionListener(new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
if (!UIToggleButton.super.isSelected()) {
UIToggleButton.super.setSelected(!UIToggleButton.super.isSelected());
}
}
});
addMouseListener(getMouseListener());
}
public void setGlobalName(String name){ public void setGlobalName(String name){
toggleButtonName = name ; toggleButtonName = name ;
} }
@ -66,6 +87,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
@Override @Override
public void setSelected(boolean isSelected) { public void setSelected(boolean isSelected) {
super.setSelected(isSelected);
if (this.isSelected != isSelected) { if (this.isSelected != isSelected) {
this.isSelected = isSelected; this.isSelected = isSelected;
repaint(); repaint();

2
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -323,7 +323,7 @@ public class FormatPane extends AbstractBasicStylePane implements GlobalNameObs
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
int contents = getFormatContents(); int contents = getFormatContents();
String[] items = FormatField.getInstance().getFormatArray(contents); String[] items = FormatField.getInstance().getFormatArray(contents, false);
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); CardLayout cardLayout = (CardLayout) centerPane.getLayout();
if (isTextOrNull()) { if (isTextOrNull()) {

BIN
designer_base/src/com/fr/design/images/expand/asc_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
designer_base/src/com/fr/design/images/expand/des_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

BIN
designer_base/src/com/fr/design/images/expand/landspace_selected@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
designer_base/src/com/fr/design/images/expand/none16x16_selected@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

BIN
designer_base/src/com/fr/design/images/expand/vertical_selected@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

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

@ -341,7 +341,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
DesignTableDataManager.addDsChangeListener(new ChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex());
attrPane.refreshChartDataPane(collection); if (attrPane.isShowing()) {
attrPane.refreshChartDataPane(collection);
}
} }
}); });
} }

19
designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -6,7 +6,6 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TopDefinition; import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -48,15 +47,9 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
} }
protected void initTabPane() { protected void initTabPane() {
if (!paneList.isEmpty()) { super.initTabPane();
tabPane = new UIHeadGroup(nameArray) { tabPane.setPreferredSize(new Dimension(221, 25));
@Override
public void tabChanged(int index) {
cardLayout.show(centerPane, nameArray[index]);
}
};
tabPane.setPreferredSize(new Dimension(221, 20));
}
} }
protected void initLayout() { protected void initLayout() {
@ -126,7 +119,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.removeAll(); this.removeAll();
paneList = initPaneList4NoPresent(plot4Pane, parentPane); paneList = initPaneList4NoPresent(plot4Pane, parentPane);
initAllPane(); initAllPane();
tabPane.setPreferredSize(new Dimension(221, 20)); tabPane.setPreferredSize(new Dimension(221, 25));
centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200)); centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200));
this.validate(); this.validate();
} }
@ -242,7 +235,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
}; };
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0));
//默认不显示 //默认不显示
preDataNumPane.setVisible(false); preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);
@ -417,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
}; };
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); preDataNumPane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0));
//默认不显示 //默认不显示
preDataNumPane.setVisible(false); preDataNumPane.setVisible(false);
panel1.add(preDataNumPane, BorderLayout.CENTER); panel1.add(preDataNumPane, BorderLayout.CENTER);

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -64,7 +64,7 @@ public class NormalChartDataPane extends DataContentsPane {
UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource")); UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource"));
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null}));
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,0,15)); northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

9
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -148,13 +148,16 @@ public class ChartTextAttrPane extends BasicPane {
} }
protected JPanel getContentPane (JPanel buttonPane) { protected JPanel getContentPane (JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f,e}; double[] columnSize = {f,e};
double[] rowSize = {p, p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), getRowSize(), columnSize);
}
protected double[] getRowSize () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
} }
protected Component[][] getComponents(JPanel buttonPane) { protected Component[][] getComponents(JPanel buttonPane) {

32
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java

@ -6,24 +6,26 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List; import java.util.List;
public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = 2298609199400393886L; private static final long serialVersionUID = 2298609199400393886L;
protected UIHeadGroup tabPane; protected UIButtonGroup tabPane;
protected String[] nameArray; protected String[] nameArray;
public JPanel centerPane; public JPanel centerPane;
public CardLayout cardLayout; public CardLayout cardLayout;
public List<NamePane> paneList; public List<NamePane> paneList;
protected abstract List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent); protected abstract List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent);
public ThirdTabPane(Plot plot, AbstractAttrNoScrollPane parent) { public ThirdTabPane(Plot plot, AbstractAttrNoScrollPane parent) {
paneList = initPaneList(plot, parent); paneList = initPaneList(plot, parent);
initAllPane(); initAllPane();
@ -45,16 +47,20 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
protected void initTabPane() { protected void initTabPane() {
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) { tabPane = new UIButtonGroup(nameArray);
tabPane.setSelectedIndex(0);
tabPane.setPreferredSize(new Dimension(60 * nameArray.length, 25));
tabPane.addActionListener(new ActionListener() {
@Override @Override
public void tabChanged(int index) { public void actionPerformed(ActionEvent e) {
cardLayout.show(centerPane, nameArray[index]); cardLayout.show(centerPane, nameArray[tabPane.getSelectedIndex()]);
} }
}; });
centerPane.setBorder(myBorder); centerPane.setBorder(myBorder);
} }
} }
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {
super.paint(g); super.paint(g);
@ -64,7 +70,7 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
g2d.drawLine(getWidth() - 2, tabPane.getPreferredSize().height, getWidth() - 2, getHeight() - 1); g2d.drawLine(getWidth() - 2, tabPane.getPreferredSize().height, getWidth() - 2, getHeight() - 1);
} }
} }
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
@ -97,19 +103,19 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
}; };
/** /**
* *
* @return 中间的内容面板的指定宽度 * @return 中间的内容面板的指定宽度
*/ */
protected int getContentPaneWidth() { protected int getContentPaneWidth() {
return centerPane.getPreferredSize().width; return centerPane.getPreferredSize().width;
} }
@Override @Override
public T updateBean() { public T updateBean() {
return null; return null;
} }
protected static class NamePane { protected static class NamePane {
private String name; private String name;
private BasicScrollPane pane; private BasicScrollPane pane;
@ -129,6 +135,6 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
public void setPane(BasicScrollPane pane) { public void setPane(BasicScrollPane pane) {
this.pane = pane; this.pane = pane;
} }
} }
} }

7
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -34,12 +34,12 @@ import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10; private static final int MARGIN_TOP = 10;
private static final int MARGIN_LEFT = 5; private static final int MARGIN_LEFT = 5;
private static final int COLORGROUP_MARGIN_LEFT = 40; private static final int COLORGROUP_MARGIN_LEFT = 20;
private static final int OFF_HEIGHT = 6; private static final int OFF_HEIGHT = 6;
private static final int COLOR_REC_HEIGHT = 40; private static final int COLOR_REC_HEIGHT = 40;
private static final int COLOR_REC_WIDTH = 30; private static final int COLOR_REC_WIDTH = 30;
protected static final int TEXTFIELD_HEIGHT = 20; protected static final int TEXTFIELD_HEIGHT = 20;
protected static final int TEXTFIELD_WIDTH = 120; protected static final int TEXTFIELD_WIDTH = 140;
protected static final int UPCONTROLPANE_WIDTH = 230; protected static final int UPCONTROLPANE_WIDTH = 230;
private static final int LAYOUR_DET = 6; private static final int LAYOUR_DET = 6;
private static final double VALUE = 100; private static final double VALUE = 100;
@ -115,7 +115,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
protected JPanel getUpControlPane (Component[][] components) { protected JPanel getUpControlPane (Component[][] components) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
return TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize); return TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
} }

7
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java

@ -27,32 +27,25 @@ public abstract class AbstractBarPane extends AbstractChartTypePane {
if(barPlot.getyAxis().isPercentage()) { if(barPlot.getyAxis().isPercentage()) {
if(barPlot instanceof Bar3DPlot){ if(barPlot instanceof Bar3DPlot){
typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_PERCENT_STACK_COLOMN_CHART;
} else { } else {
typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = PERCENT_STACK_COLOMN_CHART;
} }
} else { } else {
if(barPlot instanceof Bar3DPlot){ if(barPlot instanceof Bar3DPlot){
typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_STACK_COLOMN_CHART;
} else { } else {
typeDemo.get(STACK_COLOMN_CHART).isPressing = true; typeDemo.get(STACK_COLOMN_CHART).isPressing = true;
lastTypeIndex = STACK_COLOMN_CHART;
} }
} }
} else { } else {
if(barPlot instanceof Bar3DPlot) { if(barPlot instanceof Bar3DPlot) {
if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) { if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) {
typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true; typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_HORIZON_DRAW_CHART;
} else { } else {
typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true; typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true;
lastTypeIndex = THREE_D_COLOMN_CHART;
} }
} else { } else {
typeDemo.get(COLOMN_CHART).isPressing = true; typeDemo.get(COLOMN_CHART).isPressing = true;
lastTypeIndex = COLOMN_CHART;
} }
} }

11
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java

@ -59,7 +59,6 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
protected abstract String[] getTypeLayoutPath(); protected abstract String[] getTypeLayoutPath();
protected abstract String[] getTypeLayoutTipName(); protected abstract String[] getTypeLayoutTipName();
protected int lastStyleIndex = -1; protected int lastStyleIndex = -1;
protected int lastTypeIndex = -1;
protected boolean typeChanged = false;//图表类型是否发生变化 protected boolean typeChanged = false;//图表类型是否发生变化
protected String[] getNormalLayoutTipName() { protected String[] getNormalLayoutTipName() {
@ -148,12 +147,11 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
return null; return null;
} }
protected void checkTypeChange(){ protected void checkTypeChange(Plot oldPlot){
if(styleList != null && !styleList.isEmpty()){ if(styleList != null && !styleList.isEmpty()){
for(int i = 0; i < typeDemo.size(); i++){ for(int i = 0; i < typeDemo.size(); i++){
if(typeDemo.get(i).isPressing && i != lastTypeIndex){ if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){
typeChanged = true; typeChanged = true;
lastTypeIndex = i;
break; break;
} }
typeChanged = false; typeChanged = false;
@ -250,8 +248,9 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane<Chart>{
* 保存风格,对选中的风格做设置 * 保存风格,对选中的风格做设置
*/ */
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
checkTypeChange();//判断图表的类型是否发生变化 Plot oldPlot = chart.getPlot();
Plot newPlot = this.setSelectedClonedPlotWithCondition(chart.getPlot()); Plot newPlot = this.setSelectedClonedPlotWithCondition(oldPlot);
checkTypeChange(oldPlot);//判断图表的类型是否发生变化
if(styleList != null && !styleList.isEmpty()){ if(styleList != null && !styleList.isEmpty()){
if(styleList.get(STYLE_SHADE).isPressing && lastStyleIndex != STYLE_SHADE){ if(styleList.get(STYLE_SHADE).isPressing && lastStyleIndex != STYLE_SHADE){
lastStyleIndex = STYLE_SHADE; lastStyleIndex = STYLE_SHADE;

4
designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java

@ -74,10 +74,8 @@ public class AreaPlotPane extends AbstractChartTypePane{
if(area.isStacked()) { if(area.isStacked()) {
if(area.getyAxis().isPercentage()) { if(area.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true; typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_AREA_LINE_CHART;
} else { } else {
typeDemo.get(STACK_AREA_CHART).isPressing = true; typeDemo.get(STACK_AREA_CHART).isPressing = true;
lastTypeIndex = STACK_AREA_CHART;
} }
} }
} else if(plot instanceof Area3DPlot) { } else if(plot instanceof Area3DPlot) {
@ -85,10 +83,8 @@ public class AreaPlotPane extends AbstractChartTypePane{
if(threeDPlot.isStacked()) { if(threeDPlot.isStacked()) {
if(threeDPlot.getyAxis().isPercentage()) { if(threeDPlot.getyAxis().isPercentage()) {
typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true; typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true;
lastTypeIndex = PERCENT_3D_AREA_LINE_CHART;
} else { } else {
typeDemo.get(STACK_3D_AREA_CHART).isPressing = true; typeDemo.get(STACK_3D_AREA_CHART).isPressing = true;
lastTypeIndex = STACK_3D_AREA_CHART;
} }
} }
} }

2
designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java

@ -67,10 +67,8 @@ public class DonutPlotPane extends AbstractChartTypePane{
Plot plot = chart.getPlot(); Plot plot = chart.getPlot();
if(plot instanceof Donut3DPlot) { if(plot instanceof Donut3DPlot) {
typeDemo.get(THREE_D_DONUT_CHART).isPressing = true; typeDemo.get(THREE_D_DONUT_CHART).isPressing = true;
lastTypeIndex = THREE_D_DONUT_CHART;
} else { } else {
typeDemo.get(DONUT_CHART).isPressing = true; typeDemo.get(DONUT_CHART).isPressing = true;
lastTypeIndex = DONUT_CHART;
} }
checkDemosBackground(); checkDemosBackground();

3
designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java

@ -137,8 +137,7 @@ public class MapPlotPane extends AbstractChartTypePane {
for(ChartImagePane imagePane : typeDemo) { for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false; imagePane.isPressing = false;
} }
typeDemo.get(mapPlot.getMapType().ordinal()).isPressing = true; typeDemo.get(mapPlot.getDetailType()).isPressing = true;
lastTypeIndex = mapPlot.getMapType().ordinal();//todo 这个属性是不是可以删了,eason
} }
checkDemosBackground(); checkDemosBackground();

2
designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java

@ -93,10 +93,8 @@ public class PiePlotPane extends AbstractChartTypePane{
Plot plot = chart.getPlot(); Plot plot = chart.getPlot();
if(plot instanceof Pie3DPlot) { if(plot instanceof Pie3DPlot) {
typeDemo.get(THREE_D_PIE_CHART).isPressing = true; typeDemo.get(THREE_D_PIE_CHART).isPressing = true;
lastTypeIndex = THREE_D_PIE_CHART;
} else { } else {
typeDemo.get(PIE_CHART).isPressing = true; typeDemo.get(PIE_CHART).isPressing = true;
lastTypeIndex = PIE_CHART;
} }
checkDemosBackground(); checkDemosBackground();

26
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -39,26 +38,13 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
/** /**
* 返回界面标题 * 返回界面标题
*
* @return 界面标题 * @return 界面标题
*/ */
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewArea"); return Inter.getLocText("Plugin-ChartF_NewArea");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartAreaPlot) {
lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
@ -71,17 +57,17 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID; return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID;
} }
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot() {
VanChartAreaPlot newPlot = null; VanChartAreaPlot newPlot = null;
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes; Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes;
for(int i = 0, len = areaChart.length; i < len; i++){ for (int i = 0, len = areaChart.length; i < len; i++) {
if(typeDemo.get(i).isPressing){ if (typeDemo.get(i).isPressing) {
newPlot = (VanChartAreaPlot)areaChart[i].getPlot(); newPlot = (VanChartAreaPlot) areaChart[i].getPlot();
} }
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); cloned = (Plot) newPlot.clone();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In AreaChart"); FRLogger.getLogger().error("Error In AreaChart");
} }

15
designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
@ -46,20 +45,6 @@ public class VanChartBarPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewBar"); return Inter.getLocText("Plugin-ChartF_NewBar");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

12
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java

@ -1,10 +1,14 @@
package com.fr.plugin.chart.bubble; package com.fr.plugin.chart.bubble;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort;
import javax.swing.*;
/** /**
* Created by Mitisky on 16/3/31. * Created by Mitisky on 16/3/31.
*/ */
@ -24,4 +28,12 @@ public class VanChartBubbleInteractivePane extends VanChartInteractivePaneWithOu
} }
return super.getValueArray(); return super.getValueArray();
} }
@Override
protected JPanel getzoomTypePane(UIButtonGroup zoomType) {
if (((VanChartBubblePlot)chart.getPlot()).isForceBubble()) {
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType);
}
return super.getzoomTypePane(zoomType);
}
} }

21
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java

@ -6,7 +6,6 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
@ -50,26 +49,6 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewBubble"); return Inter.getLocText("Plugin-ChartF_NewBubble");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot)plot).isForceBubble()){
lastTypeIndex = BubblePlotType.FORCE.ordinal();
} else {
lastTypeIndex = BubblePlotType.NORMAL.ordinal();
}
typeDemo.get(lastTypeIndex).isPressing = true;
checkDemosBackground();
}
private void removeDefaultAttr(ConditionAttr conditionAttr, Class <? extends DataSeriesCondition> targetClass) { private void removeDefaultAttr(ConditionAttr conditionAttr, Class <? extends DataSeriesCondition> targetClass) {
DataSeriesCondition attr = conditionAttr.getExisted(targetClass); DataSeriesCondition attr = conditionAttr.getExisted(targetClass);

17
designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java

@ -30,12 +30,23 @@ public class VanChartBubblePane extends BasicBeanPane<VanChartAttrBubble> {
displayNegative = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"), displayNegative = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")}); Inter.getLocText("Plugin-ChartF_Close")});
this.setLayout(new BorderLayout());
this.add(getContentPane(), BorderLayout.CENTER);
}
protected JPanel getContentPane () {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] row = {p, p, p, p, p}; double[] row = {p, p, p, p, p};
double[] col = {p, f}; double[] col = {p, f};
Component[][] components = new Component[][]{ return TableLayoutHelper.createTableLayoutPane(getComponent(), row, col);
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MinDiameter")), minDiameter}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MinDiameter")), minDiameter},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MaxDiameter")), maxDiameter}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MaxDiameter")), maxDiameter},
@ -43,10 +54,6 @@ public class VanChartBubblePane extends BasicBeanPane<VanChartAttrBubble> {
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DisplayNegative")), displayNegative}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DisplayNegative")), displayNegative},
}; };
JPanel content = TableLayoutHelper.createTableLayoutPane(components, row, col);
this.setLayout(new BorderLayout());
this.add(content, BorderLayout.CENTER);
} }
public void populateBean(VanChartAttrBubble bubble) { public void populateBean(VanChartAttrBubble bubble) {

4
designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java

@ -60,9 +60,9 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon
}; };
JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north,rowSize_north,columnSize_north); JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north,rowSize_north,columnSize_north);
north.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); north.setBorder(BorderFactory.createEmptyBorder(6, 24, 10, 15));
JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane); JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane);
dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10,5,0,5)); dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
filterPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); filterPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));

15
designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.column;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -46,20 +45,6 @@ public class VanChartColumnPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewColumn"); return Inter.getLocText("Plugin-ChartF_NewColumn");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

7
designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java

@ -131,12 +131,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
//保存上次选中的值,其会在super中更新 //保存上次选中的值,其会在super中更新
int lastState = lastTypeIndex; int lastState = chart.getPlot().getDetailType();
super.updateBean(chart); super.updateBean(chart);
//如果上次的状态和这次的装填不在同一个页面,说明同一个图表內切换了,需要情況数据配置 //如果上次的状态和这次的装填不在同一个页面,说明同一个图表內切换了,需要情況数据配置
if (lastState != lastTypeIndex) { if (lastState != chart.getPlot().getDetailType()) {
chart.setFilterDefinition(null); chart.setFilterDefinition(null);
} }
@ -219,8 +219,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
//获取上次选中的图标 //获取上次选中的图标
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot(); VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
lastTypeIndex = customPlot.getCustomStyle().ordinal(); typeDemo.get(customPlot.getDetailType()).isPressing = true;
typeDemo.get(lastTypeIndex).isPressing = true;
isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM; isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM;

2
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java

@ -27,7 +27,7 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
} else { } else {
leftcontentPane.setBounds(0, 0, width, height); leftcontentPane.setBounds(0, 0, width, height);
leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original)); leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 4, 0, 10, original));
} }
} }
public void reloaPane(JPanel pane){ public void reloaPane(JPanel pane){

2
designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java

@ -7,6 +7,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*; import java.awt.*;
/** /**
@ -21,6 +22,7 @@ public class TableLayout4VanChartHelper {
public static final double EDIT_AREA_WIDTH =155; public static final double EDIT_AREA_WIDTH =155;
public static final double SECOND_EDIT_AREA_WIDTH =143; public static final double SECOND_EDIT_AREA_WIDTH =143;
public static final int COMPONENT_INTERVAL =12; public static final int COMPONENT_INTERVAL =12;
public static final Border SECOND_EDIT_AREA_BORDER = BorderFactory.createEmptyBorder(0,12,0,0);

3
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java

@ -27,12 +27,11 @@ public class VanChartFillStylePane extends ChartFillStylePane {
}; };
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
} }
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) { if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) {
return new Dimension(styleSelectBox.getPreferredSize().width, 30); return new Dimension(styleSelectBox.getPreferredSize().width, 26);
} }
return super.getPreferredSize(); return super.getPreferredSize();
} }

8
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java

@ -74,7 +74,13 @@ public class VanChartMarkerPane extends BasicPane {
} }
protected BasicBeanPane<VanChartAttrMarker> createCommonMarkerPane() { protected BasicBeanPane<VanChartAttrMarker> createCommonMarkerPane() {
return new VanChartCommonMarkerPane(); return new VanChartCommonMarkerPane(){
protected double[] getcolumnSize () {
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
return new double[] {d, s};
}
};
} }
protected void layoutComponents() { protected void layoutComponents() {

20
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java

@ -4,10 +4,15 @@ import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import javax.swing.*; import javax.swing.*;
@ -23,10 +28,25 @@ public abstract class VanChartUIListControlPane extends UIListControlPane {
public VanChartUIListControlPane() { public VanChartUIListControlPane() {
super(); super();
this.setBorder(null);
} }
public VanChartUIListControlPane(BasePlot plot) { public VanChartUIListControlPane(BasePlot plot) {
super(plot); super(plot);
this.setBorder(null);
}
@Override
protected JPanel getLeftTopPane (UIToolbar topToolBar) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }
@Override @Override

3
designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java

@ -15,6 +15,7 @@ import java.awt.*;
*/ */
public class FormatPaneWithOutFont extends FormatPane { public class FormatPaneWithOutFont extends FormatPane {
private static final int HEIGHT = 30; private static final int HEIGHT = 30;
private static final int FONT_HEIGHT = 20;
protected JPanel createContentPane(Component[][] components) { protected JPanel createContentPane(Component[][] components) {
double f = TableLayout.FILL; double f = TableLayout.FILL;
@ -39,6 +40,6 @@ public class FormatPaneWithOutFont extends FormatPane {
if (getTypeComboBox().getSelectedIndex() == 0) { if (getTypeComboBox().getSelectedIndex() == 0) {
return new Dimension((int)getTypeComboBox().getPreferredSize().getWidth(), HEIGHT); return new Dimension((int)getTypeComboBox().getPreferredSize().getWidth(), HEIGHT);
} }
return super.getPreferredSize(); return new Dimension((int)super.getPreferredSize().getWidth(), (int)super.getPreferredSize().getHeight()-FONT_HEIGHT);
} }
} }

9
designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java

@ -110,15 +110,20 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double[] row = {p, p, p}; double[] row = {p, p, p};
double[] col = {d, e};
Component[][] components = getUseComponent(); Component[][] components = getUseComponent();
JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, getcolumnSize());
this.add(jPanel); this.add(jPanel);
} }
protected double[] getcolumnSize () {
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
return new double[] {d, e};
}
protected Marker[] getMarkers() { protected Marker[] getMarkers() {
return getNormalMarkers(); return getNormalMarkers();
} }

3
designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java

@ -236,8 +236,6 @@ public class HyperlinkMapFactory {
startTime.setEnabled(false); startTime.setEnabled(false);
ConstantsEditor endTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Time"), new Formula("END_TIME")); ConstantsEditor endTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Time"), new Formula("END_TIME"));
endTime.setEnabled(false); endTime.setEnabled(false);
ConstantsEditor duration = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Duration_Time"), new Formula("DURATION"));
duration.setEnabled(false);
ConstantsEditor progress = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Process"), new Formula("PROGRESS")); ConstantsEditor progress = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Process"), new Formula("PROGRESS"));
progress.setEnabled(false); progress.setEnabled(false);
@ -246,7 +244,6 @@ public class HyperlinkMapFactory {
lists.add(series); lists.add(series);
lists.add(startTime); lists.add(startTime);
lists.add(endTime); lists.add(endTime);
lists.add(duration);
lists.add(progress); lists.add(progress);
return lists; return lists;

1
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java

@ -29,6 +29,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane
public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) { public void populate(Nameable[] nameableArray, Class<? extends ConditionAttributesPane> showPane) {
initComponentPane(); initComponentPane();
this.setBorder(null);
NameObjectCreator[] creators = new NameObjectCreator[]{new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, showPane)}; NameObjectCreator[] creators = new NameObjectCreator[]{new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, showPane)};
refreshNameableCreator(creators); refreshNameableCreator(creators);
super.populate(nameableArray); super.populate(nameableArray);

7
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java

@ -95,7 +95,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null}, new Component[]{createToolBarPane(getToolBarRowSize(), columnSize),null},
new Component[]{createAnimationPane(),null}, new Component[]{createAnimationPane(),null},
new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null}, new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
@ -195,6 +195,11 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel);
} }
protected double[] getToolBarRowSize () {
double p = TableLayout.PREFERRED;
return new double[]{p,p,p,p,p};
}
protected Component[][] createToolBarComponents() { protected Component[][] createToolBarComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort},

9
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java

@ -1,5 +1,7 @@
package com.fr.plugin.chart.designer.other; package com.fr.plugin.chart.designer.other;
import com.fr.design.layout.TableLayout;
import java.awt.*; import java.awt.*;
/** /**
@ -7,8 +9,15 @@ import java.awt.*;
* 没有排序选择 * 没有排序选择
*/ */
public class VanChartInteractivePaneWithOutSort extends VanChartInteractivePane { public class VanChartInteractivePaneWithOutSort extends VanChartInteractivePane {
@Override @Override
protected Component[][] createToolBarComponents() { protected Component[][] createToolBarComponents() {
return super.createToolBarComponentsWithOutSort(); return super.createToolBarComponentsWithOutSort();
} }
@Override
protected double[] getToolBarRowSize() {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
}
} }

2
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -57,7 +57,7 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(0,6)); this.setLayout(new BorderLayout(0,6));
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb); JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,10,10)); northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

26
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -97,11 +97,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p, p, p, p, p, p, p,p}; double[] rowSize = {p, p, p, p, p, p, p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, column), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},
new Component[]{createDisplayStrategy(new double[]{p, p, p}, columnSize), null}, new Component[]{createDisplayStrategy(new double[]{p, p, p}, columnSize), null},
@ -155,7 +157,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createLabelPane(double[] row, double[] col){ protected JPanel createLabelPane(double[] row, double[] col){
showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")}); showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")});
labelTextAttrPane = new ChartTextAttrPane(); labelTextAttrPane = getChartTextAttrPane();
labelTextRotation = new UINumberDragPane(-ROTATION_MAX,ROTATION_MAX); labelTextRotation = new UINumberDragPane(-ROTATION_MAX,ROTATION_MAX);
labelGapStyle = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),Inter.getLocText("Plugin-ChartF_Fixed")}); labelGapStyle = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),Inter.getLocText("Plugin-ChartF_Fixed")});
@ -164,8 +166,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")), labelTextRotation}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")), labelTextRotation},
new Component[]{new UILabel(Inter.getLocText("ChartF-Label_Interval")), labelGapStyle}, new Component[]{new UILabel(Inter.getLocText("ChartF-Label_Interval")), labelGapStyle},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col);
labelGapValuePane= TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText(" "),labelGapValue); labelGapValuePane= TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText(""),labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
JPanel gapPanel = new JPanel(new BorderLayout()); JPanel gapPanel = new JPanel(new BorderLayout());
gapPanel.add(panel, BorderLayout.CENTER); gapPanel.add(panel, BorderLayout.CENTER);
gapPanel.add(labelGapValuePane, BorderLayout.SOUTH); gapPanel.add(labelGapValuePane, BorderLayout.SOUTH);
@ -196,6 +198,22 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel);
} }
protected ChartTextAttrPane getChartTextAttrPane(){
return new ChartTextAttrPane(){
@Override
protected JPanel getContentPane (JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
}
};
}
protected JPanel createLineStylePane(double[] row, double[] col){ protected JPanel createLineStylePane(double[] row, double[] col){
axisLineStyle = createLineComboBox(); axisLineStyle = createLineComboBox();
axisLineColor = new ColorSelectBox(100); axisLineColor = new ColorSelectBox(100);

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -59,11 +59,13 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null},
new Component[]{createLabelPane(new double[]{p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p}, column),null},
new Component[]{createValueDefinition(),null}, new Component[]{createValueDefinition(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null}, new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null},

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java

@ -42,11 +42,13 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},

8
designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java

@ -16,7 +16,11 @@ import com.fr.plugin.chart.designer.style.axis.VanChartAxisPane;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
@ -53,7 +57,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
this.add(eastPane, BorderLayout.EAST); this.add(eastPane, BorderLayout.EAST);
buttonPane = new JPanel(); buttonPane = new JPanel();
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 0)); buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 0));
this.add(buttonPane, BorderLayout.CENTER); this.add(buttonPane, BorderLayout.CENTER);
addButton.addActionListener(addListener); addButton.addActionListener(addListener);

3
designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java

@ -5,7 +5,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
@ -77,7 +76,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{
protected JPanel createLabelPane(double[] row, double[] col){ protected JPanel createLabelPane(double[] row, double[] col){
showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")}); showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")});
labelTextAttrPane = new ChartTextAttrPane(); labelTextAttrPane = getChartTextAttrPane();
labelPanel = new JPanel(new BorderLayout()); labelPanel = new JPanel(new BorderLayout());
labelPanel.add(labelTextAttrPane); labelPanel.add(labelTextAttrPane);
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java

@ -24,10 +24,12 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p}, columnSize),null}, new Component[]{createLabelPane(new double[]{p, p}, column),null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null},
new Component[]{createValueStylePane(),null}, new Component[]{createValueStylePane(),null},
}; };

4
designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -33,10 +33,12 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, new Component[]{createLabelPane(new double[]{p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null},
new Component[]{createValueStylePane(), null}, new Component[]{createValueStylePane(), null},

2
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java

@ -36,7 +36,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
@Override @Override
public String getAddItemText() { public String getAddItemText() {
return Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"); return Inter.getLocText("Plugin-ChartF_Add_Interval");
} }
protected ShortCut4JControlPane[] createShortcuts() { protected ShortCut4JControlPane[] createShortcuts() {

1
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java

@ -36,6 +36,7 @@ public class VanChartAreaPane extends ThirdTabPane<VanChart> implements AutoSele
JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0)); JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
if (nameArray.length > 1) { if (nameArray.length > 1) {
pane.add(tabPane); pane.add(tabPane);
tabPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
} }
} }

4
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java

@ -44,13 +44,14 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{f, e})}, new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{f, e})},
new Component[]{createAlertLinePane()}, new Component[]{createAlertLinePane()},
new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, e})}, new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, s})},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
@ -86,6 +87,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
verticalColorBackground = new ColorSelectBox(100); verticalColorBackground = new ColorSelectBox(100);
Component[][] components = getIntervalPaneComponents(); Component[][] components = getIntervalPaneComponents();
JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
defaultPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
customIntervalBackground = new BackgroundListControlPane(); customIntervalBackground = new BackgroundListControlPane();
cardLayout = new CardLayout(); cardLayout = new CardLayout();

76
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java

@ -1,6 +1,10 @@
package com.fr.plugin.chart.designer.style.label; package com.fr.plugin.chart.designer.style.label;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCate; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCate;
import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithPercent; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithPercent;
@ -15,6 +19,7 @@ import java.awt.*;
* 仪表盘的分类多指针时或者百分比标签 * 仪表盘的分类多指针时或者百分比标签
*/ */
public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabelDetailPane { public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabelDetailPane {
//todo 重新整理这个面板
private static final long serialVersionUID = 5176535960949074945L; private static final long serialVersionUID = 5176535960949074945L;
@ -24,6 +29,10 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe
super(plot, parent); super(plot, parent);
} }
protected double[] getLabelPaneRowSize(Plot plot, double p) {
return hasLabelPosition(plot) ? new double[]{p,p,p} : new double[]{p,p};
}
private void initGaugeStyle(Plot plot) { private void initGaugeStyle(Plot plot) {
if(gaugeStyle == null){ if(gaugeStyle == null){
gaugeStyle = ((VanChartGaugePlot)plot).getGaugeStyle(); gaugeStyle = ((VanChartGaugePlot)plot).getGaugeStyle();
@ -45,6 +54,8 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe
} }
} }
protected boolean hasLabelPosition(Plot plot) { protected boolean hasLabelPosition(Plot plot) {
initGaugeStyle(plot); initGaugeStyle(plot);
switch (gaugeStyle){ switch (gaugeStyle){
@ -57,21 +68,68 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe
} }
} }
protected double[] getLabelStyleRowSize(double p) {
switch (gaugeStyle){
case RING:
return new double[] {p, p};
case SLOT:
return new double[] {p, p};
default:
return new double[] {p};
}
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) { protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component); return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
} }
protected Component[][] getLabelStyleComponents(Plot plot) { protected Component[][] getLabelStyleComponents(Plot plot) {
initGaugeStyle(plot); initGaugeStyle(plot);
switch (gaugeStyle){ if (gaugeStyle == GaugeStyle.RING || gaugeStyle == GaugeStyle.SLOT) {
case RING: UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return super.getLabelStyleComponents(plot); return new Component[][]{
case SLOT: new Component[]{text,style},
return super.getLabelStyleComponents(plot); new Component[]{textFontPane,null},
default: };
return new Component[][]{ } else {
new Component[]{textFontPane,null}, return new Component[][]{
}; new Component[]{textFontPane, null},
};
}
}
protected ChartTextAttrPane initTextFontPane () {
//todo 需要再整理下
if (gaugeStyle == GaugeStyle.RING || gaugeStyle == GaugeStyle.SLOT){
return new ChartTextAttrPane(){
protected double[] getRowSize () {
double p = TableLayout.PREFERRED;
return new double[]{p, p};
}
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
};
} else {
return new ChartTextAttrPane(){
protected double[] getRowSize () {
double p = TableLayout.PREFERRED;
return new double[]{p, p};
}
protected Component[][] getComponents(JPanel buttonPane) {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return new Component[][]{
new Component[]{text, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
};
} }
} }
} }

9
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -23,11 +23,16 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) {
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),
Inter.getLocText("Plugin-ChartF_Custom")}); Inter.getLocText("Plugin-ChartF_Custom")});
textFontPane = new ChartTextAttrPane(); textFontPane = initTextFontPane();
initStyleListener(); initStyleListener();
return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col); return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot), row, col);
}
protected ChartTextAttrPane initTextFontPane () {
return new ChartTextAttrPane();
} }
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){

2
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java

@ -59,7 +59,7 @@ public class VanChartGaugeValueLabelDetailPane extends VanChartGaugeLabelDetailP
private Component[][] getLabelPaneComponentsWithBackground(Plot plot, double p, double[] columnSize) { private Component[][] getLabelPaneComponentsWithBackground(Plot plot, double p, double[] columnSize) {
return new Component[][]{ return new Component[][]{
new Component[]{dataLabelContentPane,null}, new Component[]{dataLabelContentPane,null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createLabelStylePane(new double[]{p}, columnSize, plot),null},
new Component[]{createBackgroundColorPane(),null}, new Component[]{createBackgroundColorPane(),null},
}; };
} }

24
designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -76,16 +76,20 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
return new Component[][]{ return new Component[][]{
new Component[]{dataLabelContentPane,null}, new Component[]{dataLabelContentPane,null},
new Component[]{createLabelPositionPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createLabelPositionPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createLabelStylePane(getLabelStyleRowSize(p), columnSize, plot),null},
}; };
} else { } else {
return new Component[][]{ return new Component[][]{
new Component[]{dataLabelContentPane,null}, new Component[]{dataLabelContentPane,null},
new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createLabelStylePane(getLabelStyleRowSize(p), columnSize, plot),null},
}; };
} }
} }
protected double[] getLabelStyleRowSize(double p) {
return new double[]{p, p, p};
}
protected double[] getLabelPaneRowSize(Plot plot, double p) { protected double[] getLabelPaneRowSize(Plot plot, double p) {
return hasLabelPosition(plot) ? new double[]{p,p,p,p,p} : new double[]{p,p,p}; return hasLabelPosition(plot) ? new double[]{p,p,p,p,p} : new double[]{p,p,p};
} }
@ -152,7 +156,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) {
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),
Inter.getLocText("Plugin-ChartF_Custom")}); Inter.getLocText("Plugin-ChartF_Custom")});
textFontPane = new ChartTextAttrPane(){ textFontPane =initTextFontPane();
initStyleListener();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getLabelStyleComponents(plot),row,col);
return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
}
protected ChartTextAttrPane initTextFontPane () {
return new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) { protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
@ -161,11 +174,6 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}; };
} }
}; };
initStyleListener();
JPanel panel = TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col);
return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel);
} }
protected Component[][] getLabelStyleComponents(Plot plot) { protected Component[][] getLabelStyleComponents(Plot plot) {

3
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -29,6 +29,7 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane; import com.fr.plugin.chart.designer.component.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartFillStylePane;
import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.component.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane; import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane; import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
@ -98,7 +99,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
*/ */
protected ChartFillStylePane getFillStylePane() { protected ChartFillStylePane getFillStylePane() {
//如果是自定義組合圖,則不創建填充界面 //如果是自定義組合圖,則不創建填充界面
return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane(); return parentPane instanceof VanChartCustomStylePane ? null : new VanChartFillStylePane();
} }
//风格 //风格

24
designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java

@ -10,13 +10,14 @@ import com.fr.chart.chartglyph.DataSheet;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.gui.ilable.MultilineLabel;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.js.NameJavaScriptGroup; import com.fr.js.NameJavaScriptGroup;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom; import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*; import javax.swing.*;
@ -53,9 +54,15 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
}; };
} }
//适用一种图表只有一种类型的 /**
* 更新界面内容
*/
public void populateBean(Chart chart) { public void populateBean(Chart chart) {
typeDemo.get(0).isPressing = true; for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
typeDemo.get(plot.getDetailType()).isPressing = true;
checkDemosBackground(); checkDemosBackground();
} }
@ -63,9 +70,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
* 保存界面属性 * 保存界面属性
*/ */
public void updateBean(Chart chart) { public void updateBean(Chart chart) {
checkTypeChange(); VanChartPlot oldPlot = chart.getPlot();
VanChartPlot oldPlot = (VanChartPlot)chart.getPlot(); VanChartPlot newPlot = getSelectedClonedPlot();
VanChartPlot newPlot = (VanChartPlot)getSelectedClonedPlot(); checkTypeChange(oldPlot);
samePlot = accept(chart); samePlot = accept(chart);
if(typeChanged && samePlot){ if(typeChanged && samePlot){
//同一中图表切换不同类型 //同一中图表切换不同类型
@ -115,11 +122,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{
return new VanChartTools(); return new VanChartTools();
} }
protected void checkTypeChange(){ protected void checkTypeChange(Plot oldPlot){
for(int i = 0; i < typeDemo.size(); i++){ for(int i = 0; i < typeDemo.size(); i++){
if(typeDemo.get(i).isPressing && i != lastTypeIndex){ if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){
typeChanged = true; typeChanged = true;
lastTypeIndex = i;
break; break;
} }
typeChanged = false; typeChanged = false;

3
designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

@ -54,7 +54,8 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p,p,p}; double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},

4
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java

@ -27,14 +27,14 @@ public abstract class ComboBoxWithButtonPane extends JPanel {
public ComboBoxWithButtonPane(int index) { public ComboBoxWithButtonPane(int index) {
this.index = index; this.index = index;
comboBoxName = new UIComboBox(); comboBoxName = new UIComboBox();
comboBoxName.setPreferredSize(new Dimension(100,20)); comboBoxName.setPreferredSize(new Dimension(80,20));
button = new UIButton(getButtonIcon()); button = new UIButton(getButtonIcon());
button.setPreferredSize(new Dimension(20, 20)); button.setPreferredSize(new Dimension(20, 20));
button.addActionListener(getButtonListener()); button.addActionListener(getButtonListener());
UILabel title = new UILabel(getTitleText()); UILabel title = new UILabel(getTitleText());
title.setPreferredSize(new Dimension(60, 20)); title.setPreferredSize(new Dimension(80, 20));
this.setLayout(new BorderLayout(H_GAP, 0)); this.setLayout(new BorderLayout(H_GAP, 0));
this.add(comboBoxName, BorderLayout.CENTER); this.add(comboBoxName, BorderLayout.CENTER);

16
designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.gauge;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -43,21 +42,6 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewGauge"); return Inter.getLocText("Plugin-ChartF_NewGauge");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartGaugePlot) {
lastTypeIndex = ((VanChartGaugePlot)plot).getGaugeStyle().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot(){
VanChartGaugePlot newPlot = null; VanChartGaugePlot newPlot = null;
Chart[] GaugeChart = GaugeIndependentVanChart.GaugeVanChartTypes; Chart[] GaugeChart = GaugeIndependentVanChart.GaugeVanChartTypes;

1
designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java

@ -59,7 +59,6 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane {
//适用一种图表只有一种类型的 //适用一种图表只有一种类型的
public void populateBean(Chart chart) { public void populateBean(Chart chart) {
typeDemo.get(0).isPressing = true; typeDemo.get(0).isPressing = true;
lastTypeIndex = 0;
VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot(); VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot();
populateSourcePane(plot); populateSourcePane(plot);

25
designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java

@ -2,10 +2,8 @@ package com.fr.plugin.chart.line;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.type.VanChartPlotType;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/** /**
@ -39,29 +37,6 @@ public class VanChartLinePlotPane extends AbstractVanChartTypePane {
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewLine"); return Inter.getLocText("Plugin-ChartF_NewLine");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartLinePlot) {
VanChartPlotType plotType = ((VanChartLinePlot)plot).getVanChartPlotType();
switch (plotType){
case CUSTOM:
lastTypeIndex = 2;
break;
default:
lastTypeIndex = plotType.ordinal();
break;
}
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID

15
designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java

@ -252,7 +252,20 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane {
markerTypeCom = new UIComboBox(MARKER_TYPES); markerTypeCom = new UIComboBox(MARKER_TYPES);
commonMarkerPane = new VanChartMapScatterMarkerPane(); commonMarkerPane = new VanChartMapScatterMarkerPane();
bubblePane = new VanChartBubblePane(); commonMarkerPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER);
bubblePane = new VanChartBubblePane(){
protected JPanel getContentPane () {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] row = {p, p, p, p, p};
double[] col = {f, e};
JPanel panel = TableLayoutHelper.createTableLayoutPane(getComponent(), row, col);
panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER);
return panel;
}
};
imageMarkerPane = new VanChartImageMarkerPane(); imageMarkerPane = new VanChartImageMarkerPane();
final JPanel[] panes = new JPanel[]{new JPanel(), commonMarkerPane, bubblePane, imageMarkerPane}; final JPanel[] panes = new JPanel[]{new JPanel(), commonMarkerPane, bubblePane, imageMarkerPane};

2
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java

@ -28,7 +28,7 @@ public class AreaPane extends AbstractReportDataContentPane {
areaName = new TinyFormulaPane(); areaName = new TinyFormulaPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = getComponent (); Component[][] components = getComponent ();
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);

4
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java

@ -31,10 +31,10 @@ public class LongLatAreaPane extends AreaPane {
latitude = new TinyFormulaPane(); latitude = new TinyFormulaPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = getComponent(); Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
} }
protected Component[][] getComponent () { protected Component[][] getComponent () {

4
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java

@ -43,10 +43,10 @@ public class AreaPane extends AbstractTableDataContentPane {
initAreaNameCom(); initAreaNameCom();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = getComponent(); Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
} }
protected Component[][] getComponent () { protected Component[][] getComponent () {

4
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java

@ -33,11 +33,11 @@ public class LongLatAreaPane extends AreaPane {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = getComponent(); Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
} }
protected Component[][] getComponent () { protected Component[][] getComponent () {

9
designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java

@ -1,7 +1,7 @@
package com.fr.plugin.chart.map.designer.style.series; package com.fr.plugin.chart.map.designer.style.series;
import com.fr.chart.chartglyph.Marker; import com.fr.chart.chartglyph.Marker;
import com.fr.plugin.chart.marker.type.MarkerType; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane; import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane;
import java.awt.*; import java.awt.*;
@ -20,4 +20,11 @@ public class VanChartMapScatterMarkerPane extends VanChartCommonMarkerPane {
protected Marker[] getMarkers() { protected Marker[] getMarkers() {
return getMapScatterMarkers(); return getMapScatterMarkers();
} }
@Override
protected double[] getcolumnSize () {
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
return new double[] {d, s};
}
} }

3
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java

@ -88,8 +88,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane {
} }
VanChartMapPlot plot = (VanChartMapPlot)chart.getPlot(); VanChartMapPlot plot = (VanChartMapPlot)chart.getPlot();
lastTypeIndex = plot.getMapTypeIndex(); typeDemo.get(plot.getDetailType()).isPressing = true;
typeDemo.get(lastTypeIndex).isPressing = true;
populateSourcePane(plot); populateSourcePane(plot);
boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl());

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

@ -428,20 +428,25 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] rowSize = {p,p,p}; double[] rowSize = {p,p,p};
double[] columnSize = {f, e};
double[] column = {f, s};
Component[][] comps = new Component[][]{ Component[][] comps = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom},
}; };
final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,COLUMN_SIZE); final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,columnSize);
Component[][] longAndLatComps = new Component[][]{ Component[][] longAndLatComps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude}
}; };
longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,column);
longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
longAndLatPane.setVisible(false); longAndLatPane.setVisible(false);

17
designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java

@ -3,7 +3,6 @@ package com.fr.plugin.chart.pie;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.PiePlot4VanChart;
@ -42,22 +41,6 @@ public class VanChartPiePlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewPie"); return Inter.getLocText("Plugin-ChartF_NewPie");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof PiePlot4VanChart) {
lastTypeIndex = ((PiePlot4VanChart)plot).getRoseType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID
* *

17
designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.radar;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
@ -38,22 +37,6 @@ public class VanChartRadarPlotPane extends AbstractVanChartTypePane {
return Inter.getLocText("Plugin-ChartF_NewRadar"); return Inter.getLocText("Plugin-ChartF_NewRadar");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartRadarPlot) {
lastTypeIndex = ((VanChartRadarPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/** /**
* 获取各图表类型界面ID, 本质是plotID * 获取各图表类型界面ID, 本质是plotID
* *

19
designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java

@ -2,7 +2,6 @@ package com.fr.plugin.chart.structure.desinger.type;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
@ -47,23 +46,7 @@ public class VanChartStructureTypePane extends AbstractVanChartTypePane{
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewStructure"); return Inter.getLocText("Plugin-ChartF_NewStructure");
} }
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartStructurePlot) {
lastTypeIndex = ((VanChartStructurePlot)plot).getStructureType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
protected Plot getSelectedClonedPlot(){ protected Plot getSelectedClonedPlot(){
VanChartStructurePlot newPlot = null; VanChartStructurePlot newPlot = null;
Chart[] charts = StructureIndependentVanChart.StructureVanCharts; Chart[] charts = StructureIndependentVanChart.StructureVanCharts;

Loading…
Cancel
Save