Browse Source

Merge pull request #1261 in BA/design from ~MANGO/m_design:release/9.0 to release/9.0

* commit 'e4d72a09aa91d5c64142bd9a57a0a194190b83e1':
  调整间距
  整理面板中存在的大小,间隙问题
master
superman 7 years ago
parent
commit
3e36e3e80e
  1. 16
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  2. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  3. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  4. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  5. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  6. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  7. 12
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java
  8. 17
      designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java
  9. 4
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  10. 2
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  11. 2
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  12. 8
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java
  13. 20
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java
  14. 3
      designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java
  15. 9
      designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java
  16. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java
  17. 7
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  18. 9
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java
  19. 26
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java
  20. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java
  21. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java
  22. 3
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  23. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  24. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  25. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  26. 1
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java
  27. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  28. 70
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java
  29. 7
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  30. 2
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java
  31. 24
      designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  32. 3
      designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java
  33. 4
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  34. 15
      designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java
  35. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java
  36. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java
  37. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java
  38. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java
  39. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java
  40. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

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;
} }
/** /**

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) {

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

@ -6,17 +6,19 @@ 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;
@ -45,12 +47,16 @@ 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);
} }
} }

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);
} }

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);
}
} }

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));

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);

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();
} }

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};
}
} }

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},

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();

70
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: };
} else {
return new Component[][]{ return new Component[][]{
new Component[]{textFontPane, null}, 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}
};
}
};
}
}
} }

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

@ -23,13 +23,18 @@ 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){
return TableLayoutHelper.createTableLayoutPane(comps,row,col); return TableLayoutHelper.createTableLayoutPane(comps,row,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/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);

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};
}
} }

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);

Loading…
Cancel
Save