Browse Source

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

master
kerry 7 years ago
parent
commit
a5213f9053
  1. 6
      designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java
  2. 4
      designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
  3. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  4. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  5. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  6. 20
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  7. 4
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  8. 3
      designer/src/com/fr/design/widget/WidgetEventPane.java
  9. 24
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java
  10. 2
      designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java
  11. 18
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  12. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  13. 10
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  14. 12
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  15. 17
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  16. 6
      designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java
  17. 14
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  18. 6
      designer_base/src/com/fr/design/layout/TableLayoutHelper.java
  19. 4
      designer_base/src/com/fr/design/locale/designer.properties
  20. 6
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  21. 4
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  22. 6
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  23. 6
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  24. 4
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  25. 81
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  26. 11
      designer_base/src/com/fr/design/present/dict/FormulaDictPane.java
  27. 2
      designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java
  28. 3
      designer_base/src/com/fr/design/style/color/ColorSelectDialog.java
  29. 8
      designer_base/src/com/fr/file/FILEChooserPane.java
  30. 172
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  31. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  32. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  33. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  34. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  35. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  36. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  37. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  38. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  39. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java
  40. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  41. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  42. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java
  43. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  44. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  45. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  46. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java
  47. 8
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  48. 17
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  49. 130
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  50. 2
      designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java
  51. 4
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  52. 6
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  53. 37
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  54. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  55. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java
  56. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java
  57. 48
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  58. 8
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java
  59. 74
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  60. 102
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java
  61. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  62. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java
  63. 5
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java
  64. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  65. 8
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  66. 26
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java
  67. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  68. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  69. 7
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  70. 18
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java
  71. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java
  72. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java
  73. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java
  74. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java
  75. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java
  76. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java
  77. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  78. 19
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  79. 29
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java
  80. 17
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java
  81. 14
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java
  82. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java
  83. 5
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java
  84. 67
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  85. 18
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java
  86. 20
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java
  87. 13
      designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java
  88. 27
      designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java
  89. 10
      designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java
  90. 21
      designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java

6
designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java

@ -89,14 +89,10 @@ public class ChartFloatAction extends ElementCaseAction {
Style style = newFloatElement.getStyle(); Style style = newFloatElement.getStyle();
if (style != null) { if (style != null) {
newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black));
Constants.LINE_NONE, Color.black,
Constants.LINE_NONE, Color.black,
Constants.LINE_NONE, Color.black));
} }
reportPane.getEditingElementCase().addFloatElement(newFloatElement); reportPane.getEditingElementCase().addFloatElement(newFloatElement);
reportPane.setSelection(new FloatSelection(newFloatElement.getName())); reportPane.setSelection(new FloatSelection(newFloatElement.getName()));
reportPane.fireTargetModified();
reportPane.fireSelectionChangeListener(); reportPane.fireSelectionChangeListener();
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error in Float"); FRLogger.getLogger().error("Error in Float");

4
designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java

@ -41,7 +41,7 @@ import java.util.regex.Pattern;
* *
* @author yaoh.wu * @author yaoh.wu
* @version 2017年8月3日 * @version 2017年8月3日
* 复用对话框代码保留对话框原始布局 * 复用对话框代码保留对话框原始布局
* @since 8.0 * @since 8.0
*/ */
public class SelectedDataColumnPane extends BasicPane { public class SelectedDataColumnPane extends BasicPane {
@ -282,7 +282,7 @@ public class SelectedDataColumnPane extends BasicPane {
private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) { private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) {
final SelectedDataColumnPane that = this; final SelectedDataColumnPane that = this;
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel()); editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel());
paramButton = new UIButton(Inter.getLocText("TableData_Dynamic_Parameter_Setting")); paramButton = new UIButton(Inter.getLocText("FR-Designer-Basic_Dynamic_Parameter_Injection"));
paramButton.addActionListener(new ActionListener() { paramButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {

2
designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -76,7 +76,7 @@ public class CellElementEditPane extends BasicPane {
downTitle = new JPanel(); downTitle = new JPanel();
downTitle.setLayout(new BorderLayout()); downTitle.setLayout(new BorderLayout());
downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH); downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH);
center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, RIGHT_BORDER)); center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, 0));
downTitle.add(center, BorderLayout.CENTER); downTitle.add(center, BorderLayout.CENTER);
this.add(downTitle, BorderLayout.CENTER); this.add(downTitle, BorderLayout.CENTER);

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

@ -188,7 +188,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
// extendable // extendable
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expandable"))) {
if (horizontalExpandableCheckBox.isSelected()) { if (horizontalExpandableCheckBox.isSelected()) {
if (verticalExpandableCheckBox.isSelected()) { if (verticalExpandableCheckBox.isSelected()) {
cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE);

2
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -22,6 +22,7 @@ import com.fr.report.cell.cellattr.CellGUIAttr;
import com.fr.report.cell.cellattr.CellInsertPolicyAttr; import com.fr.report.cell.cellattr.CellInsertPolicyAttr;
import com.fr.report.cell.cellattr.CellPageAttr; import com.fr.report.cell.cellattr.CellPageAttr;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -342,6 +343,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
this.valueEditor.populate(defaultValue); this.valueEditor.populate(defaultValue);
} else { } else {
insertRowPolicy.setSelectedIndex(0); insertRowPolicy.setSelectedIndex(0);
this.valueEditor.populate(StringUtils.EMPTY);
} }
if (insertRowPolicy.getSelectedIndex() == 1) { if (insertRowPolicy.getSelectedIndex() == 1) {
insertRowPane.setPreferredSize(new Dimension(100, 20)); insertRowPane.setPreferredSize(new Dimension(100, 20));

20
designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java

@ -45,14 +45,14 @@ public class CustomStylePane extends MultiTabPane<Style> {
} }
public static void main(String[] args) { public static void main(String[] args) {
JFrame jf = new JFrame("test"); // JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane(); // JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout()); // content.setLayout(new BorderLayout());
content.add(new CustomStylePane(), BorderLayout.CENTER); // content.add(new CustomStylePane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf); // GUICoreUtils.centerWindow(jf);
jf.setSize(250, 400); // jf.setSize(250, 400);
jf.setVisible(true); // jf.setVisible(true);
} }
/** /**
@ -111,7 +111,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
public boolean isBorderPaneSelected() { public boolean isBorderPaneSelected() {
return tabPane.getSelectedIndex() == TWO_INDEX; return tabPane.getSelectedIndex() == ONE_INDEX;
} }
/** /**
@ -137,7 +137,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
* *
*/ */
public void updateBorder() { public void updateBorder() {
BorderUtils.update(reportPane, ((BorderPane) paneList.get(TWO_INDEX)).update()); BorderUtils.update(reportPane, ((BorderPane) paneList.get(ONE_INDEX)).update());
} }
/** /**

4
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -81,8 +81,8 @@ public class CellWidgetCardPane extends BasicPane {
eventTabPane.add(eventPane, BorderLayout.CENTER); eventTabPane.add(eventPane, BorderLayout.CENTER);
//k //k
center.add(attriTabPane, Inter.getLocText("FR-Designer_Attribute")); center.add(attriTabPane, Inter.getLocText("FR-Designer_Attribute"));
center.add(eventTabPane, Inter.getLocText("FR-Designer_Form_Editing_Listeners")); center.add(eventTabPane, Inter.getLocText("FR-Designer_Event"));
final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Form_Editing_Listeners")}; final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Event")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) { tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override @Override

3
designer/src/com/fr/design/widget/WidgetEventPane.java

@ -30,11 +30,14 @@ import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.stable.ReportConstants; import com.fr.report.stable.ReportConstants;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import javax.swing.*;
public class WidgetEventPane extends ObjectUIControlPane { public class WidgetEventPane extends ObjectUIControlPane {
public WidgetEventPane(ElementCasePane pane) { public WidgetEventPane(ElementCasePane pane) {
super(pane); super(pane);
this.setNameListEditable(false); this.setNameListEditable(false);
setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
} }
@Override @Override

24
designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -1,6 +1,7 @@
package com.fr.quickeditor.cellquick; package com.fr.quickeditor.cellquick;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.columnrow.DSColumnConditionAction; import com.fr.design.actions.columnrow.DSColumnConditionAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.DSColumnCellAction; import com.fr.design.actions.insert.cell.DSColumnCellAction;
@ -219,8 +220,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
uiLabel.setPreferredSize(new Dimension(60, 20)); uiLabel.setPreferredSize(new Dimension(60, 20));
UIButton uiButton = new UIButton(); UIButton uiButton = new UIButton();
if (tc != null) { if (tc != null) {
//第一次初始化时tc为空,引发NullPointerException //第一次初始化时tc为空,会引发NullPointerException
uiButton = new UIButton(new DSColumnConditionAction(tc)); UpdateAction condition = new DSColumnConditionAction(tc);
//丢掉icon,修改按钮名称为编辑
condition.setSmallIcon(null);
condition.setName(Inter.getLocText("FR-Designer_Edit"));
uiButton = new UIButton(condition);
} }
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{uiLabel, uiButton} new Component[]{uiLabel, uiButton}
@ -531,6 +536,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SortPane * @see DSColumnAdvancedPane.SortPane
*/ */
public class ResultSetSortConfigPane extends JPanel { public class ResultSetSortConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane; private JPanel contentPane;
//面板 //面板
private UIButtonGroup sortTypePane; private UIButtonGroup sortTypePane;
@ -553,7 +559,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout = new CardLayout(); cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout); centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField(""); formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none"); centerPane.add(new JPanel(), "none");
centerPane.add(formulaField, "content"); centerPane.add(formulaField, "content");
UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order")); UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order"));
@ -648,6 +654,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SelectCountPane * @see DSColumnAdvancedPane.SelectCountPane
*/ */
public class ResultSetFilterConfigPane extends JPanel { public class ResultSetFilterConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane; private JPanel contentPane;
private UIComboBox rsComboBox; private UIComboBox rsComboBox;
private JPanel setCardPane; private JPanel setCardPane;
@ -733,12 +741,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
//前N个 //前N个
topFormulaPane = new JFormulaField("="); topFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(topFormulaPane, FilterType.TOP.name()); setCardPane.add(topFormulaPane, FilterType.TOP.name());
tipCardPane.add(new JPanel(), FilterType.TOP.name()); tipCardPane.add(new JPanel(), FilterType.TOP.name());
//后N个 //后N个
bottomFormulaPane = new JFormulaField("="); bottomFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name()); setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name());
tipCardPane.add(new JPanel(), FilterType.BOTTOM.name()); tipCardPane.add(new JPanel(), FilterType.BOTTOM.name());
@ -967,13 +975,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.ValuePane * @see DSColumnAdvancedPane.ValuePane
*/ */
public class CustomValuePane extends JPanel { public class CustomValuePane extends JPanel {
private static final String DEFAULT_VALUE = "=$$$";
private JFormulaField formulaField; private JFormulaField formulaField;
public CustomValuePane() { public CustomValuePane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value")); UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value"));
customValueLabel.setPreferredSize(new Dimension(60, 20)); customValueLabel.setPreferredSize(new Dimension(60, 20));
formulaField = new JFormulaField("$$$"); formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{customValueLabel, formulaField}, new Component[]{customValueLabel, formulaField},
}, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER); }, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER);
@ -988,7 +998,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//formula //formula
String valueFormula = dSColumn.getResult(); String valueFormula = dSColumn.getResult();
if (valueFormula == null) { if (valueFormula == null) {
valueFormula = "$$$"; valueFormula = DEFAULT_VALUE;
} }
formulaField.populateElement(cellElement); formulaField.populateElement(cellElement);
formulaField.populate(valueFormula); formulaField.populate(valueFormula);

2
designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java

@ -69,7 +69,7 @@ public class CellStringQuickEditor extends CellQuickEditor {
return; return;
} }
if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (e.getKeyCode() == KeyEvent.VK_ENTER) {
//todo 按enter键换至下一个单元格 yaoh.wu虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。 //todo yaoh.wu:按enter键换至下一个单元格 虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。
GridKeyListener dispatchListener = new GridKeyListener(tc.getGrid()); GridKeyListener dispatchListener = new GridKeyListener(tc.getGrid());
dispatchListener.keyPressed(e); dispatchListener.keyPressed(e);
dispatchListener.keyTyped(e); dispatchListener.keyTyped(e);

18
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -75,13 +75,6 @@ public class PreferencePane extends BasicPane {
private static final FRLevel[] LOG = {FRLevel.SEVERE, FRLevel.WARNING, FRLevel.INFO, FRLevel.DEBUG}; private static final FRLevel[] LOG = {FRLevel.SEVERE, FRLevel.WARNING, FRLevel.INFO, FRLevel.DEBUG};
private static java.util.List<String> LANGUAGE = new ArrayList<>(); private static java.util.List<String> LANGUAGE = new ArrayList<>();
static {
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
};
private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言 private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言
private boolean languageChanged; // 是否修改了设计器语言设置 private boolean languageChanged; // 是否修改了设计器语言设置
@ -116,6 +109,17 @@ public class PreferencePane extends BasicPane {
public PreferencePane() { public PreferencePane() {
this.initComponents(); this.initComponents();
this.initLanguageItems();
}
// 语言选项
private void initLanguageItems() {
LANGUAGE.clear();
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
} }
protected void initComponents() { protected void initComponents() {

1
designer_base/src/com/fr/design/constants/UIConstants.java

@ -104,6 +104,7 @@ public interface UIConstants {
public static final Color SPLIT_LINE = new Color(201, 198, 184); public static final Color SPLIT_LINE = new Color(201, 198, 184);
public static final Color TITLED_BORDER_COLOR = new Color(0xededee); public static final Color TITLED_BORDER_COLOR = new Color(0xededee);
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");

10
designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java

@ -20,6 +20,9 @@ public class UIExpandablePane extends JPanel {
private int headWidth; private int headWidth;
private int headHeight; private int headHeight;
public JPanel getContentPanel() {
return contentPanel;
}
public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) { public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) {
super(); super();
@ -43,12 +46,17 @@ public class UIExpandablePane extends JPanel {
headerPanel = new HeaderPane(color, title, headHeight); headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction()); headerPanel.addMouseListener(new PanelAction());
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0)); setcontentPanelontentPanelBorder ();
this.add(headerPanel, BorderLayout.NORTH); this.add(headerPanel, BorderLayout.NORTH);
this.add(contentPanel, BorderLayout.CENTER); this.add(contentPanel, BorderLayout.CENTER);
setOpaque(false); setOpaque(false);
} }
protected void setcontentPanelontentPanelBorder (){
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0));
}
class PanelAction extends MouseAdapter { class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource(); HeaderPane hp = (HeaderPane) e.getSource();

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

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -16,7 +17,8 @@ import com.fr.stable.Nameable;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/** /**
* Created by plough on 2017/7/21. * Created by plough on 2017/7/21.
@ -37,10 +39,18 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot;
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
} }
public UIControlPane(BasePlot plot) {
this.plot =plot;
this.initComponentPane();
}
/** /**
* 生成添加按钮的NameableCreator * 生成添加按钮的NameableCreator
* *

17
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.chart.BasePlot;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -12,9 +13,9 @@ import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -40,8 +41,6 @@ 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.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.Arrays; import java.util.Arrays;
@ -61,10 +60,15 @@ public abstract class UIListControlPane extends UIControlPane {
private boolean isNameRepeated = false; private boolean isNameRepeated = false;
protected boolean isPopulating = false; protected boolean isPopulating = false;
public UIListControlPane() { public UIListControlPane() {
this.initComponentPane(); this.initComponentPane();
} }
public UIListControlPane(BasePlot plot) {
super(plot);
}
@Override @Override
protected JPanel createControlUpdatePane() { protected JPanel createControlUpdatePane() {
return new JControlUpdatePane(); return new JControlUpdatePane();
@ -890,6 +894,11 @@ public abstract class UIListControlPane extends UIControlPane {
} }
protected Object getob2Populate (Object ob2Populate) {
return ob2Populate;
}
private class JControlUpdatePane extends JPanel { private class JControlUpdatePane extends JPanel {
private CardLayout card; private CardLayout card;
private JPanel cardPane; private JPanel cardPane;
@ -926,6 +935,7 @@ public abstract class UIListControlPane extends UIControlPane {
for (int i = 0, len = updatePanes.length; i < len; i++) { for (int i = 0, len = updatePanes.length; i < len; i++) {
Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper); Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
ob2Populate = getob2Populate(ob2Populate);
if (ob2Populate != null) { if (ob2Populate != null) {
if (updatePanes[i] == null) { if (updatePanes[i] == null) {
if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) { if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
@ -944,6 +954,7 @@ public abstract class UIListControlPane extends UIControlPane {
} }
} }
public boolean isMulti(Class _class) { public boolean isMulti(Class _class) {
return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class); return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class);
} }

6
designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java

@ -33,7 +33,11 @@ public class UIMenuNameableCreator implements Nameable{
public void setObj(Object obj) { public void setObj(Object obj) {
this.obj = obj; this.obj = obj;
} }
public Class<? extends BasicBeanPane> getPaneClazz() {
return paneClazz;
}
/** /**
* 覆盖的clone方法 * 覆盖的clone方法
*/ */

14
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -53,17 +53,6 @@ public class BorderPane extends AbstractBasicStylePane {
this.initComponents(); this.initComponents();
} }
public static void main(String[] args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
content.add(new BorderPane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400);
jf.setVisible(true);
}
protected void initComponents() { protected void initComponents() {
initButtonsWithIcon(); initButtonsWithIcon();
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
@ -184,7 +173,7 @@ public class BorderPane extends AbstractBasicStylePane {
} }
public Style update(Style style) { public Style update(Style style) {
style = style.deriveBackground(backgroundPane.update());
if (style == null) { if (style == null) {
style = Style.DEFAULT_STYLE; style = Style.DEFAULT_STYLE;
} }
@ -193,6 +182,7 @@ public class BorderPane extends AbstractBasicStylePane {
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update());
return style; return style;
} }

6
designer_base/src/com/fr/design/layout/TableLayoutHelper.java

@ -203,7 +203,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置垂直间距的大小 * 修改TableLayout布局的容器指定位置垂直间距的大小
* *
* @param container 容器 * @param container 容器
* @param index vgap的索引ContainervGapA[ComponentA]vGapB[ComponentB]vGapC,vGapB index=2, * @param index vgap的索引Container{vGapA[ComponentA]vGapB[ComponentB]vGapC},vGapB index=2,
* 详情见{@link TableLayout#setRow(int, double)} * 详情见{@link TableLayout#setRow(int, double)}
* @param vgap vgap的新值 * @param vgap vgap的新值
*/ */
@ -211,6 +211,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout(); TableLayout layout = (TableLayout) container.getLayout();
layout.setRow(index, vgap); layout.setRow(index, vgap);
layout.layoutContainer(container); layout.layoutContainer(container);
container.revalidate();
container.repaint(); container.repaint();
} }
@ -218,7 +219,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置水平间距的大小 * 修改TableLayout布局的容器指定位置水平间距的大小
* *
* @param container 容器 * @param container 容器
* @param index hgap的索引ContainerhGapA[ComponentA]hGapB[ComponentB],hGapB index=2, * @param index hgap的索引Container{hGapA[ComponentA]hGapB[ComponentB]},hGapB index=2,
* 详情见{@link TableLayout#setColumn(int, double)} * 详情见{@link TableLayout#setColumn(int, double)}
* @param hgap hgap的新值 * @param hgap hgap的新值
*/ */
@ -226,6 +227,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout(); TableLayout layout = (TableLayout) container.getLayout();
layout.setColumn(index, hgap); layout.setColumn(index, hgap);
layout.layoutContainer(container); layout.layoutContainer(container);
container.revalidate();
container.repaint(); container.repaint();
} }

4
designer_base/src/com/fr/design/locale/designer.properties

@ -2126,4 +2126,6 @@ FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer-AlphaFine_NO_Result=no search result FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

6
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=Permission
Warnning=Warning Warnning=Warning
RoleName_Can_Not_Be_Null=Role name can not be null or duplicate RoleName_Can_Not_Be_Null=Role name can not be null or duplicate
Application=Applications Application=Applications
Formula_Dictionary_Display_Examples_Html=<html>Real value range is \ Formula_Dictionary_Display_Examples_Html=<html>the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, <br>the result is 1, 2, ..., 100 and -1, -2, ..., -100.<br></html>
ECP-error_pwd=Password Error ECP-error_pwd=Password Error
FR-Hyperlink_ChartHyperlink=Chart Hyperlink FR-Hyperlink_ChartHyperlink=Chart Hyperlink
M_Edit-FormatBrush=Format Painter M_Edit-FormatBrush=Format Painter
@ -2122,4 +2122,6 @@ FR-Designer_Barcode_Size=Barcode_Size
FS-Designer_DS_Filter_Odd_Tip=Odd_Tip FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer-AlphaFine_NO_Result=no search result FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

4
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6
Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9
RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093
Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3
Formula_Dictionary_Display_Examples_Html=<html>\u5B9F\u969B\u5024\u7BC4\u56F2\u306F\ Formula_Dictionary_Display_Examples_Html=<html>\u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002<br></html>
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC
FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF
M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B)
@ -2121,3 +2121,5 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip= FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit= FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

6
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1
Warnning=\uC54C\uB9BC Warnning=\uC54C\uB9BC
RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4.
Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158
Formula_Dictionary_Display_Examples_Html=<html>\uC2E4\uC81C\uAC12\uBC94\uC704:\ Formula_Dictionary_Display_Examples_Html=<html>\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C<br>\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100. <br>&nbsp;</html>
ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958
FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C
M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B)
@ -2121,4 +2121,6 @@ FS-Designer_DS_Filter_Odd_Tip=
FS-Designer_DS_Filter_Even_Tip= FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip= FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit= FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

6
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91
Warnning=\u63D0\u9192 Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D
Application=\u5E94\u7528\u7A0B\u5E8F Application=\u5E94\u7528\u7A0B\u5E8F
Formula_Dictionary_Display_Examples_Html=<html>\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \ Formula_Dictionary_Display_Examples_Html=<html>\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C<br>\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF
FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE
M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) M_Edit-FormatBrush=\u683C\u5F0F\u5237(B)
@ -2133,4 +2133,6 @@ FR-Designer_Barcode_Size=\u6761\u5F62\u7801\u5927\u5C0F
FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...) FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...)
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...) FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...)
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570 FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570
FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C
FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

4
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F
Warnning=\u63D0\u9192 Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907
Application=\u61C9\u7528\u7A0B\u5F0F Application=\u61C9\u7528\u7A0B\u5F0F
Formula_Dictionary_Display_Examples_Html= Formula_Dictionary_Display_Examples_Html=<html>\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C<br>\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4
FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8
M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B)
@ -2126,3 +2126,5 @@ FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578 FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578
M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868 M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

81
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -13,6 +13,7 @@ import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.third.fr.pdf.kernel.utils.CompareTool; import com.fr.third.fr.pdf.kernel.utils.CompareTool;
import com.sap.conn.jco.JCo;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
@ -38,7 +39,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框高度 // 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145; private static final int POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480; private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 360; private static final int POPUP_DEFAULT_HEIGHT = 356;
public static final String KEY_CELL_ELEMENT = "cellElement"; public static final String KEY_CELL_ELEMENT = "cellElement";
public static final String KEY_CELL_ATTR = "cellAttr"; public static final String KEY_CELL_ATTR = "cellAttr";
public static final String KEY_FLOAT_ELEMENT = "floatElement"; public static final String KEY_FLOAT_ELEMENT = "floatElement";
@ -53,6 +54,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel defaultPane; // "无可用配置项"面板 private JPanel defaultPane; // "无可用配置项"面板
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑" private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
private PropertyItem selectedItem; // 当前被选中的属性配置项
public enum PropertyMode { public enum PropertyMode {
REPORT, // 报表 REPORT, // 报表
@ -219,6 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override @Override
public void onResize() { public void onResize() {
if (!isRightPaneVisible()) {
resetPropertyIcons();
} else {
refreshRightPane();
}
for (PropertyItem item : propertyItemMap.values()) { for (PropertyItem item : propertyItemMap.values()) {
item.onResize(); item.onResize();
} }
@ -374,6 +381,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
* 刷新右面板 * 刷新右面板
*/ */
public void refreshRightPane() { public void refreshRightPane() {
// 可继承,就继承
if (selectedItem != null && selectedItem.isVisible() && selectedItem.isEnabled() && !selectedItem.isPoppedOut()) {
selectedItem.setTabButtonSelected();
propertyCard.show(rightPane, selectedItem.getName());
return;
}
// 不可继承时,选中第一个可用 tab
boolean hasAvailableTab = false; boolean hasAvailableTab = false;
boolean hasEnabledTab = false; boolean hasEnabledTab = false;
for (String name : propertyItemMap.keySet()) { for (String name : propertyItemMap.keySet()) {
@ -388,6 +403,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
} }
// 无可用 tab 时,显示提示文字
if (!hasAvailableTab) { if (!hasAvailableTab) {
resetPropertyIcons(); resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
@ -417,6 +433,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
private void resetPropertyIcons() { private void resetPropertyIcons() {
for (PropertyItem item : propertyItemMap.values()) { for (PropertyItem item : propertyItemMap.values()) {
item.resetButtonIcon(); item.resetButtonIcon();
@ -477,6 +494,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void updateStatus() { public void updateStatus() {
setEnabled(enableModes.contains(currentMode)); setEnabled(enableModes.contains(currentMode));
setVisible(visibleModes.contains(currentMode)); setVisible(visibleModes.contains(currentMode));
if (isPoppedOut()) {
if (!isVisible()) {
popToFrame();
} else if (!isEnabled()) {
popupDialog.showDefaultPane();
}
}
} }
public boolean isVisible() { public boolean isVisible() {
@ -593,6 +617,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
button.setIcon(BaseUtils.readIcon(getBtnIconUrl())); button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground); button.setBackground(selectedBtnBackground);
button.setOpaque(true); button.setOpaque(true);
selectedItem = this;
} }
private void initButton() { private void initButton() {
@ -672,6 +697,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.setVisible(false); popupDialog.setVisible(false);
initContentPane(); initContentPane();
onResize(); onResize();
if (isEnabled()) {
propertyCard.show(rightPane, getName());
setTabButtonSelected();
}
refreshContainer(); refreshContainer();
} }
} }
@ -763,7 +792,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) { } else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(Color.pink);
} else { } else {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
} }
@ -867,12 +895,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private class PopupDialog extends JDialog { private class PopupDialog extends JDialog {
private Container container; private Container container;
private static final int RESIZE_RANGE = 4; private static final int RESIZE_RANGE = 8;
private Cursor originCursor; private Cursor originCursor;
private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR); private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
private Point mouseDownCompCoords; private Point mouseDownCompCoords;
private JPanel contentWrapper;
private JComponent contentPane; private JComponent contentPane;
private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem; private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) { public PopupDialog(PropertyItem propertyItem) {
super(DesignerContext.getDesignerFrame()); super(DesignerContext.getDesignerFrame());
@ -882,29 +912,50 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON); PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON);
popupToolPane.setParentDialog(this); popupToolPane.setParentDialog(this);
contentPane = propertyItem.getContentPane(); contentPane = propertyItem.getContentPane();
container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER); contentWrapper = new JPanel(new BorderLayout());
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT); contentWrapper.add(popupToolPane, BorderLayout.NORTH);
contentWrapper.add(contentPane, BorderLayout.CENTER);
contentWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.PROPERTY_DIALOG_BORDER));
JPanel horizontalToolPane = new JPanel() {
@Override
public void paint(Graphics g) {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null);
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - RESIZE_RANGE) / 2, 3, RESIZE_RANGE, 5, null);
}
};
contentWrapper.add(horizontalToolPane, BorderLayout.SOUTH);
container.add(contentWrapper, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT + RESIZE_RANGE);
adjustLocation(); adjustLocation();
initListener(); initListener();
this.setVisible(true); this.setVisible(true);
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
}
public void showDefaultPane() {
replaceContentPane(defaultPane);
} }
public void adjustLocation() { public void adjustLocation() {
Point btnCoords = propertyItem.getButton().getLocationOnScreen(); this.setLocation(
this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y); getLeftPane().getLocationOnScreen().x - CONTENT_WIDTH,
DesignerContext.getDesignerFrame().getLocationOnScreen().y + 228
);
} }
public void replaceContentPane(PropertyItem propertyItem) { public void replaceContentPane(PropertyItem propertyItem) {
this.propertyItem = propertyItem; this.propertyItem = propertyItem;
JComponent contentPane = propertyItem.getContentPane(); replaceContentPane(propertyItem.getContentPane());
container.remove(this.contentPane); }
container.add(this.contentPane = contentPane);
// pack(); public void replaceContentPane(JComponent contentPane) {
if (getSize().height < container.getPreferredSize().height) { contentWrapper.remove(this.contentPane);
setSize(CONTENT_WIDTH, container.getPreferredSize().height); contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER);
}
refreshContainer(); refreshContainer();
} }

11
designer_base/src/com/fr/design/present/dict/FormulaDictPane.java

@ -20,6 +20,7 @@ import java.awt.*;
public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> { public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private static final int EDITOR_COLUMN = 15; private static final int EDITOR_COLUMN = 15;
private static final int LEFT_BORDER = 5;
private FormulaEditor keyFormulaEditor; private FormulaEditor keyFormulaEditor;
private FormulaEditor valueFormulaEditor; private FormulaEditor valueFormulaEditor;
@ -41,8 +42,8 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private void initComponents() { private void initComponents() {
keyFormulaEditor = new FormulaEditor(); keyFormulaEditor = new FormulaEditor();
keyFormulaEditor.setColumns(EDITOR_COLUMN); keyFormulaEditor.setColumns(EDITOR_COLUMN);
JPanel keyFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0)); JPanel keyFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
keyFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0,-5,0,-5)); keyFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
keyFormulaEditor.setPreferredSize(new Dimension(144, 20)); keyFormulaEditor.setPreferredSize(new Dimension(144, 20));
Icon icon = BaseUtils.readIcon("/com/fr/design/images/m_insert/formula.png"); Icon icon = BaseUtils.readIcon("/com/fr/design/images/m_insert/formula.png");
keyFormulaContainer.add(new JLabel(icon)); keyFormulaContainer.add(new JLabel(icon));
@ -58,15 +59,15 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html"));
tag.setPreferredSize(new Dimension(225,20)); tag.setPreferredSize(new Dimension(225, 40));
JPanel t = new JPanel(new BorderLayout()); JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER); t.add(tag, BorderLayout.CENTER);
Formula vf = new Formula("$$$"); Formula vf = new Formula("$$$");
valueFormulaEditor = new FormulaEditor("", vf); valueFormulaEditor = new FormulaEditor("", vf);
JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0)); JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0,-5,0,-5)); valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
valueFormulaEditor.setPreferredSize(new Dimension(144, 20)); valueFormulaEditor.setPreferredSize(new Dimension(144, 20));
valueFormulaContainer.add(new JLabel(icon)); valueFormulaContainer.add(new JLabel(icon));
valueFormulaContainer.add(valueFormulaEditor); valueFormulaContainer.add(valueFormulaEditor);

2
designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java

@ -56,7 +56,7 @@ public class ColorSelectDetailPane extends BasicPane {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return null; return Inter.getLocText("FR-Designer_Select_Color");
} }
protected void initComponents() { protected void initComponents() {

3
designer_base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -112,7 +112,8 @@ public class ColorSelectDialog extends MiddleChartDialog{
doCancel(); doCancel();
} }
}); });
this.setTitle(pane.title4PopupWindow());
GUICoreUtils.setWindowCenter(getOwner(), this); GUICoreUtils.setWindowCenter(getOwner(), this);
} }

8
designer_base/src/com/fr/file/FILEChooserPane.java

@ -1,10 +1,6 @@
package com.fr.file; package com.fr.file;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
@ -510,7 +506,7 @@ public class FILEChooserPane extends BasicPane {
this.suffix = suffix; this.suffix = suffix;
dialog = showWindow(SwingUtilities.getWindowAncestor(parent), false); dialog = showWindow((Window)parent, false);
JPanel contentPane = (JPanel) dialog.getContentPane(); JPanel contentPane = (JPanel) dialog.getContentPane();
contentPane.setLayout(FRGUIPaneFactory.createM_BorderLayout()); contentPane.setLayout(FRGUIPaneFactory.createM_BorderLayout());
contentPane.add(this, BorderLayout.CENTER); contentPane.add(this, BorderLayout.CENTER);

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

@ -2,18 +2,20 @@ package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.chartattr.ChartCollection; 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.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.BoldFontTextLabel;
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;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane;
import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -31,8 +33,8 @@ import java.util.List;
*/ */
public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> { public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private static final long serialVersionUID = 3650522989381790194L; private static final long serialVersionUID = 3650522989381790194L;
private static final int PAN_WIDTH = 210; private static final int PAN_WIDTH = 234;
private static final int FIL_HEIGHT = 130; private static final int FIL_HEIGHT = 150;
private CategoryFilterPane categoryPane; private CategoryFilterPane categoryPane;
private SeriesFilterPane seriesPane; private SeriesFilterPane seriesPane;
@ -45,6 +47,18 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.isNeedPresent = true; this.isNeedPresent = true;
} }
protected void initTabPane() {
if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) {
@Override
public void tabChanged(int index) {
cardLayout.show(centerPane, nameArray[index]);
}
};
tabPane.setPreferredSize(new Dimension(200, 20));
}
}
protected List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent) { protected List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent) {
plot4Pane = plot; plot4Pane = plot;
@ -99,6 +113,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.removeAll(); this.removeAll();
paneList = initPaneList4NoPresent(plot4Pane, parentPane); paneList = initPaneList4NoPresent(plot4Pane, parentPane);
initAllPane(); initAllPane();
tabPane.setPreferredSize(new Dimension(200, 20));
centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200));
this.validate(); this.validate();
} }
@ -160,6 +176,10 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private PresentComboBox present; private PresentComboBox present;
private AbstractAttrNoScrollPane parent; private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public CategoryFilterPane(AbstractAttrNoScrollPane parent) { public CategoryFilterPane(AbstractAttrNoScrollPane parent) {
super(true); super(true);
this.parent = parent; this.parent = parent;
@ -175,59 +195,59 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
initPresentPane(pane);
return pane; return pane;
} }
protected void initOtherPane(JPanel pane) { protected JPanel initOtherPane() {
JPanel prePane = new JPanel(); onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); JPanel panel1 = new JPanel(new BorderLayout());
prePane.setPreferredSize(new Dimension(200, 20)); JPanel panel2 = new JPanel(new BorderLayout());
pane.add(prePane); panel1.add(onlyPreData, BorderLayout.NORTH);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
preDataNum = new UITextField(); preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20)); UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
prePane.add(onlyPreData);
prePane.add(preDataNum);
prePane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Records")));
JPanel otherPane = new JPanel();
otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
pane.add(otherPane);
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true); combineOther.setSelected(true);
otherPane.add(combineOther); double p = TableLayout.PREFERRED;
JPanel catePane = new JPanel(); double f = TableLayout.FILL;
pane.add(catePane); double[] columnSize = {p,f};
catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{label,preDataNum},
new Component[]{combineOther,null}
};
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate"));
catePane.add(notShowNull); panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() { onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
checkBoxUse(); checkBoxUse();
} }
}); });
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() { present = new PresentComboBox() {
protected void fireChange() { protected void fireChange() {
fire(); fire();
} }
}; };
present.setPreferredSize(new Dimension(70, 20)); presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); panel2.add(presentPane, BorderLayout.SOUTH);
presentPane.add(present);
double[] column = {f};
double[] row = {p, p};
Component[][] coms = new Component[][]{
new Component[]{panel1},
new Component[]{panel2}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column);
} }
private void fire() { private void fire() {
if (this.parent != null) { if (this.parent != null) {
this.parent.attributeChanged(); this.parent.attributeChanged();
@ -245,9 +265,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查分类过滤界面 Box是否可用. * 检查分类过滤界面 Box是否可用.
*/ */
public void checkBoxUse() { public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected()); preDataNumPane.setVisible(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
;
} }
/** /**
@ -320,6 +338,9 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private AbstractAttrNoScrollPane parent; private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public SeriesFilterPane(AbstractAttrNoScrollPane parent) { public SeriesFilterPane(AbstractAttrNoScrollPane parent) {
super(true); super(true);
this.parent = parent; this.parent = parent;
@ -335,62 +356,60 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
initPresentPane(pane);
return pane; return pane;
} }
protected void initOtherPane(JPanel pane) { protected JPanel initOtherPane() {
JPanel prePane = new JPanel(); onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); JPanel panel1 = new JPanel(new BorderLayout());
prePane.setPreferredSize(new Dimension(200, 20)); JPanel panel2 = new JPanel(new BorderLayout());
pane.add(prePane); panel1.add(onlyPreData, BorderLayout.NORTH);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
preDataNum = new UITextField(); preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20)); UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
prePane.add(onlyPreData);
prePane.add(preDataNum);
prePane.add(new UILabel(Inter.getLocText("FR-Chart-Data_Records")));
JPanel otherPane = new JPanel();
otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
pane.add(otherPane);
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true); combineOther.setSelected(true);
otherPane.add(combineOther); double p = TableLayout.PREFERRED;
JPanel catePane = new JPanel(); double f = TableLayout.FILL;
pane.add(catePane); double[] columnSize = {p,f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{label,preDataNum},
new Component[]{combineOther,null}
};
catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries"));
catePane.add(notShowNull); panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() { onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
checkBoxUse(); checkBoxUse();
} }
}); });
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() { present = new PresentComboBox() {
protected void fireChange() { protected void fireChange() {
fire(); fire();
} }
}; };
present.setPreferredSize(new Dimension(70, 20)); presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); panel2.add(presentPane, BorderLayout.SOUTH);
presentPane.add(present);
double[] column = {f};
double[] row = {p, p};
Component[][] coms = new Component[][]{
new Component[]{panel1},
new Component[]{panel2}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column);
} }
private void fire() { private void fire() {
if (this.parent != null) { if (this.parent != null) {
parent.attributeChanged(); parent.attributeChanged();
@ -409,8 +428,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查Box是否可用 * 检查Box是否可用
*/ */
public void checkBoxUse() { public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected()); preDataNumPane.setVisible(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
} }
/** /**
@ -480,11 +498,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = new JPanel(new BorderLayout());
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
return pane; return pane;
} }
@ -516,11 +531,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
return pane; return pane;
} }

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

@ -41,6 +41,8 @@ public class DatabaseTableDataPane extends BasicPane{
pane.add(reviewButton,BorderLayout.EAST); pane.add(reviewButton,BorderLayout.EAST);
this.add(pane,BorderLayout.CENTER); this.add(pane,BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
/** /**

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

@ -3,13 +3,13 @@ package com.fr.design.mainframe.chart.gui.data;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
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.AbstractVanChartScrollPane;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -46,7 +46,12 @@ public class NormalChartDataPane extends DataContentsPane {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
return new BasicScrollPane<ChartCollection>() { return new AbstractVanChartScrollPane<ChartCollection>() {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
this.add(leftcontentPane);
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
@ -56,9 +61,10 @@ public class NormalChartDataPane extends DataContentsPane {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
northPane.add(jcb, BorderLayout.CENTER); northPane.add(jcb, BorderLayout.CENTER);
UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource") + ":", SwingConstants.RIGHT); 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));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

11
designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -1,7 +1,8 @@
package com.fr.design.mainframe.chart.gui.data; package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.chart.chartattr.*; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TableDataDefinition; import com.fr.chart.chartdata.TableDataDefinition;
import com.fr.chart.chartdata.TopDefinition; import com.fr.chart.chartdata.TopDefinition;
import com.fr.data.impl.NameTableData; import com.fr.data.impl.NameTableData;
@ -11,7 +12,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.*; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
@ -35,7 +36,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
private void initDataPane() { private void initDataPane() {
UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData") + ":", SwingConstants.RIGHT) ; UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData")) ;
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
tableDataPane = new DatabaseTableDataPane(label) { tableDataPane = new DatabaseTableDataPane(label) {
@Override @Override
@ -45,9 +46,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
}; };
tableDataPane.setBorder(BorderFactory.createMatteBorder(0,6,0, 0, getBackground())); tableDataPane.setPreferredSize(new Dimension(246 , 20));
tableDataPane.setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
tableDataPane.setPreferredSize(new Dimension(205 , 20));
this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0)); this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0));
this.add(tableDataPane, BorderLayout.NORTH); this.add(tableDataPane, BorderLayout.NORTH);
} }

1
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -45,6 +45,7 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartC
initSeriesPane(); initSeriesPane();
this.add(seriesPane, "0,2,2,2"); this.add(seriesPane, "0,2,2,2");
seriesPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
//kunsnat: 用于重载, 甘特图, 股价图 第一列 默认应该不可编辑. //kunsnat: 用于重载, 甘特图, 股价图 第一列 默认应该不可编辑.

9
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java

@ -5,11 +5,12 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleReportDefinition; import com.fr.chart.chartdata.BubbleReportDefinition;
import com.fr.chart.chartdata.BubbleSeriesValue; import com.fr.chart.chartdata.BubbleSeriesValue;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -24,9 +25,9 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) { public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(filterPane = new ChartDataFilterPane(new BubblePlot(), parent), "0,6,2,4"); this.add(panel, "0,6,2,4");
} }
@Override @Override

12
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java

@ -10,10 +10,10 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -43,7 +43,7 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) { public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
JPanel catePane = new JPanel(); JPanel catePane = new JPanel();
catePane.setLayout(new BorderLayout(2, 2)); catePane.setLayout(new BorderLayout(2, 2));
@ -61,9 +61,13 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
catePane.add(boxPane, BorderLayout.SOUTH); catePane.add(boxPane, BorderLayout.SOUTH);
catePane.setPreferredSize(new Dimension(246,30));
catePane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
this.add(catePane, "0,0,2,0"); this.add(catePane, "0,0,2,0");
this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(panel, "0,6,2,4");
addButton.addActionListener(new ActionListener() { addButton.addActionListener(new ActionListener() {
@Override @Override

15
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -7,11 +7,11 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalReportDataDefinition; import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.chart.chartdata.SeriesDefinition; import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -32,12 +32,13 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
public CategoryPlotReportDataContentPane(ChartDataPane parent) { public CategoryPlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
categoryName.setPreferredSize(new Dimension(246,30));
categoryName.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(categoryName, "0,0,2,0"); this.add(categoryName, "0,0,2,0");
this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
} this.add(panel, "0,6,2,4"); }
protected TinyFormulaPane initCategoryBox(final String leftLabel) { protected TinyFormulaPane initCategoryBox(final String leftLabel) {
TinyFormulaPane categoryName = new TinyFormulaPane() { TinyFormulaPane categoryName = new TinyFormulaPane() {
@ -46,7 +47,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
if(StringUtils.isNotEmpty(leftLabel)) { if(StringUtils.isNotEmpty(leftLabel)) {
UILabel label1 = new UILabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT); UILabel label1 = new UILabel(Inter.getLocText("FR-Chart-Category_Name"));
label1.setPreferredSize(new Dimension(75, 20)); label1.setPreferredSize(new Dimension(75, 20));
this.add(label1, BorderLayout.WEST); this.add(label1, BorderLayout.WEST);
} }

17
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java

@ -5,13 +5,13 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; 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.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -46,21 +46,22 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
double[] rowSize = { p, p, p}; double[] rowSize = { p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getCateNameString(), SwingConstants.RIGHT), getSingCatePane()}, new Component[]{new UILabel(getCateNameString()), getSingCatePane()},
new Component[]{new UILabel(getNValueString(), SwingConstants.RIGHT), singValuePane = new TinyFormulaPane()}, new Component[]{new UILabel(getNValueString()), singValuePane = new TinyFormulaPane()},
new Component[]{null, null} new Component[]{null, null}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
double[] cs = {p}; double[] cs = {p};
components = new Component[][]{ components = new Component[][]{
new Component[]{new JSeparator()}, new Component[]{panel1},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Data_Filter"))},
new Component[]{filterPane = new ChartDataFilterPane(new MeterPlot(), parent)},
}; };
JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs); JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs);

18
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java

@ -1,14 +1,16 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCollection>{ public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCollection>{
private boolean isNeedSummaryCaculateMethod = true; private boolean isNeedSummaryCaculateMethod = true;
@ -134,4 +136,10 @@ public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCo
public boolean isNeedSummaryCaculateMethod(){ public boolean isNeedSummaryCaculateMethod(){
return this.isNeedSummaryCaculateMethod; return this.isNeedSummaryCaculateMethod;
} }
protected JSeparator getJSeparator() {
JSeparator jSeparator = new JSeparator();
jSeparator.setPreferredSize(new Dimension(246, 2));
return jSeparator;
}
} }

14
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -48,25 +48,29 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) { public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) {
categoryCombox = new UIComboBox(); categoryCombox = new UIComboBox();
categoryCombox.setPreferredSize(new Dimension(100,20)); categoryCombox.setPreferredSize(new Dimension(120,20));
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); JPanel categoryPane = new JPanel(new BorderLayout(4,0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ;
categoryLabel.setPreferredSize(new Dimension(75,20)); categoryLabel.setPreferredSize(new Dimension(85,20));
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, 20)); addButton.setPreferredSize(new Dimension(20, 20));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null})); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null}));
categoryPane.setPreferredSize(new Dimension(246,30));
boxPane = new JPanel(); categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
categoryPane.add(boxPane, BorderLayout.SOUTH); categoryPane.add(boxPane, BorderLayout.SOUTH);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH); this.add(categoryPane, BorderLayout.NORTH);
this.add(new JSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH); this.add(seriesTypeComboxPane, BorderLayout.SOUTH);

12
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java

@ -1,19 +1,19 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -41,17 +41,19 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa
categoryCombox = new UIComboBox(); categoryCombox = new UIComboBox();
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); JPanel categoryPane = new JPanel(new BorderLayout(4,0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ;
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
categoryCombox.setPreferredSize(new Dimension(100,20)); categoryCombox.setPreferredSize(new Dimension(100,20));
categoryCombox.addItem(Inter.getLocText("Chart-Use_None")); categoryCombox.addItem(Inter.getLocText("Chart-Use_None"));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null})); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null}));
categoryPane.setPreferredSize(new Dimension(246,30));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH); this.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH); this.add(seriesTypeComboxPane, BorderLayout.SOUTH);

14
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java

@ -50,13 +50,13 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane{
double[] rowSize = { p,p,p,p,p,p,p,p,p,p}; double[] rowSize = { p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name") + ":", SwingConstants.RIGHT),step}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name")),step},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start") + ":", SwingConstants.RIGHT),planStart}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start")),planStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End") + ":", SwingConstants.RIGHT),planEnd}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End")),planEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start") + ":", SwingConstants.RIGHT),finalStart}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start")),finalStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End") + ":", SwingConstants.RIGHT),finalEnd}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End")),finalEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent") + ":", SwingConstants.RIGHT),percent}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent")),percent},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items") + ":", SwingConstants.RIGHT),project}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items")),project},
} ; } ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

17
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -1,14 +1,5 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
@ -21,14 +12,18 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.util.List;
/** /**
* 仪表盘, 属性表, 数据集数据界面. * 仪表盘, 属性表, 数据集数据界面.
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2012-12-21 下午04:51:50 * @version 创建时间2012-12-21 下午04:51:50
*/ */
public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane { public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane {
private static final String METER_NAME = Inter.getLocText("Chart-Category_Use_Name") + ":"; private static final String METER_NAME = Inter.getLocText("Chart-Category_Use_Name");
private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value") + ":"; private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value");
private UIComboBox nameBox; private UIComboBox nameBox;
private UIComboBox valueBox; private UIComboBox valueBox;

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

@ -12,7 +12,6 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.itable.UITable; import com.fr.design.gui.itable.UITable;
import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -98,7 +97,6 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
protected Component[][] getUseComponent() { protected Component[][] getUseComponent() {
return new Component[][]{ return new Component[][]{
new Component[]{seriesDataPane}, new Component[]{seriesDataPane},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter"))},
}; };
} }

18
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

@ -7,7 +7,6 @@ import com.fr.data.util.function.AbstractDataFunction;
import com.fr.data.util.function.NoneFunction; import com.fr.data.util.function.NoneFunction;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; 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;
@ -77,11 +76,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p, p}; double[] rowSize = {p, p, p, p, p};
UILabel Label1 = new UILabel(Inter.getLocText("FR-Chart-Series_Name") + ":", SwingConstants.RIGHT); UILabel Label1 = new UILabel(Inter.getLocText("FR-Chart-Series_Name"));
Label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value"));
Label2.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label2.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method"));
Label3.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label3.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
Component[][] components = getUseComponent(Label1, Label2, Label3); Component[][] components = getUseComponent(Label1, Label2, Label3);
@ -96,11 +95,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name") + ":", SwingConstants.RIGHT); UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name"));
Label1.setPreferredSize(new Dimension(75, 20)); Label1.setPreferredSize(new Dimension(75, 20));
UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value"));
Label2.setPreferredSize(new Dimension(75, 20)); Label2.setPreferredSize(new Dimension(75, 20));
UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method"));
Label3.setPreferredSize(new Dimension(75, 20)); Label3.setPreferredSize(new Dimension(75, 20));
Component[][] components = getUseComponentWithOutSummary(Label1, Label2, Label3); Component[][] components = getUseComponentWithOutSummary(Label1, Label2, Label3);
@ -115,8 +114,6 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{calculateCombox, null, null, Label3, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{calculateCombox, null, null, Label3, null})},
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
}; };
} }
@ -132,8 +129,7 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
return new Component[][]{ return new Component[][]{
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})},
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
}; };
} }

10
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java

@ -7,6 +7,7 @@ import com.fr.chart.chartdata.MoreNameCDDefinition;
import com.fr.chart.chartdata.OneValueCDDefinition; import com.fr.chart.chartdata.OneValueCDDefinition;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -47,13 +48,16 @@ public class SeriesTypeUseComboxPane extends UIComboBoxPane<ChartCollection> {
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM));
JPanel northPane = new JPanel(new BorderLayout(4, 0)); JPanel northPane = new JPanel(new BorderLayout(4, 0));
UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From") + ":", SwingConstants.RIGHT); UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From"));
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, 0, 0, 1)); northPane.setBorder(BorderFactory.createEmptyBorder(10, 24, 0, 15));
cardPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);
this.add(dataScreeningPane = new ChartDataFilterPane(this.initplot, parent), BorderLayout.SOUTH); dataScreeningPane = new ChartDataFilterPane(this.initplot, parent);
JPanel panel = new UIExpandablePane(Inter.getLocText("FR-Chart-Data_Filter"), 290, 24, dataScreeningPane);
this.add(panel, BorderLayout.SOUTH);
} }
/** /**

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

@ -39,6 +39,11 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
nameArray[i] = np.name; nameArray[i] = np.name;
centerPane.add(np.pane, nameArray[i]); centerPane.add(np.pane, nameArray[i]);
} }
initTabPane();
initLayout();
}
protected void initTabPane() {
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) { tabPane = new UIHeadGroup(nameArray) {
@Override @Override
@ -48,8 +53,7 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
}; };
centerPane.setBorder(myBorder); centerPane.setBorder(myBorder);
} }
initLayout(); }
}
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {

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

@ -6,7 +6,6 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleTableDefinition; import com.fr.chart.chartdata.BubbleTableDefinition;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; 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;
@ -15,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -56,20 +56,19 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon
double[] rowSize_north = {p, p, p, p}; double[] rowSize_north = {p, p, p, p};
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesName},
new Component[]{new UILabel("x :", SwingConstants.RIGHT), xCombox}, new Component[]{new UILabel("x" ), xCombox},
new Component[]{new UILabel("y :", SwingConstants.RIGHT), yCombox}, new Component[]{new UILabel("y"), yCombox},
new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), bubbleSize}, new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), bubbleSize},
}; };
JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north);
north.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); north.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{north}, new Component[]{north},
new Component[]{new JSeparator()}, new Component[]{filterPane}
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
new Component[]{dataScreeningPane}
}; };

130
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -7,29 +7,117 @@ import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.javascript.ChartEmailPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider; import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.module.DesignModuleFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.js.*; import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider;
import com.fr.js.JavaScript;
import com.fr.js.JavaScriptImpl;
import com.fr.js.NameJavaScript;
import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.other.ChartHyperlinkNameObjectCreartor;
import com.fr.plugin.chart.designer.other.HyperlinkMapFactory; import com.fr.plugin.chart.designer.other.HyperlinkMapFactory;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* Created by Fangjie on 2016/4/28. * Created by Fangjie on 2016/4/28.
*/ */
public class VanChartHyperLinkPane extends UICorrelationComboBoxPane { public class VanChartHyperLinkPane extends UIListControlPane {
public VanChartHyperLinkPane() { public VanChartHyperLinkPane() {
super(); super();
} }
@Override
public NameableCreator[] createNameableCreators() {
//面板初始化,需要在populate的时候更新
Map<String, NameableCreator> nameCreators = new ListMap<>();
NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators();
for (NameableCreator creator : creators) {
nameCreators.put(creator.menuName(), creator);
}
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
nameCreators.put(nc.menuName(), nc);
}
return nameCreators.values().toArray(new NameableCreator[nameCreators.size()]);
}
/**
* 弹出列表的标题.
*
* @return 返回标题字符串.
*/
public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Hyperlink");
}
@Override
protected String getAddItemText() {
return Inter.getLocText("FR-Designer_Add_Hyperlink");
}
public void populate(NameJavaScriptGroup nameHyperlink_array) {
java.util.List<NameObject> list = new ArrayList<NameObject>();
if (nameHyperlink_array != null) {
for (int i = 0; i < nameHyperlink_array.size(); i++) {
list.add(new NameObject(nameHyperlink_array.getNameHyperlink(i).getName(), nameHyperlink_array.getNameHyperlink(i).getJavaScript()));
}
}
this.populate(list.toArray(new NameObject[list.size()]));
}
public void populate(TargetComponent elementCasePane) {
// hyperlinkGroupPaneActionProvider.populate(this, elementCasePane);
}
/**
* updateJs的Group
*
* @return 返回NameJavaScriptGroup
*/
public NameJavaScriptGroup updateJSGroup() {
Nameable[] res = this.update();
NameJavaScript[] res_array = new NameJavaScript[res.length];
for (int i = 0; i < res.length; i++) {
NameObject no = (NameObject) res[i];
res_array[i] = new NameJavaScript(no.getName(), (JavaScript) no.getObject());
}
return new NameJavaScriptGroup(res_array);
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((VanChartPlot)plot);
}
public void populate(Plot plot) { public void populate(Plot plot) {
this.plot = plot;
HashMap paneMap = getHyperlinkMap(plot); HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮 //安装平台内打开插件时,添加相应按钮
@ -40,20 +128,31 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
// paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); // paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
} }
//todo@mengao 去掉UIMenuNameableCreator
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap); java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
refreshMenuAndAddMenuAction(list); ChartHyperlinkNameObjectCreartor[] creators= new ChartHyperlinkNameObjectCreartor[list.size()];
for(int i = 0; list != null && i < list.size(); i++) {
UIMenuNameableCreator uiMenuNameableCreator = list.get(i);
creators[i] = new ChartHyperlinkNameObjectCreartor(uiMenuNameableCreator.getObj(),uiMenuNameableCreator.getName(), uiMenuNameableCreator.getClass(), uiMenuNameableCreator.getPaneClazz());
}
refreshNameableCreator(creators);
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>();
java.util.List<UIMenuNameableCreator> hyperList = new ArrayList<UIMenuNameableCreator>();
NameJavaScriptGroup nameGroup = populateHotHyperLink(plot); NameJavaScriptGroup nameGroup = populateHotHyperLink(plot);
for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) { for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) {
NameJavaScript javaScript = nameGroup.getNameHyperlink(i); NameJavaScript javaScript = nameGroup.getNameHyperlink(i);
if(javaScript != null && javaScript.getJavaScript() != null) { if(javaScript != null && javaScript.getJavaScript() != null) {
JavaScript script = javaScript.getJavaScript(); JavaScript script = javaScript.getJavaScript();
hyperList.add(new UIMenuNameableCreator(javaScript.getName(), script, getUseMap(paneMap, script.getClass()))); UIMenuNameableCreator uiMenuNameableCreator= new UIMenuNameableCreator(javaScript.getName(), script, getUseMap(paneMap, script.getClass()));
nameObjects.add(new NameObject(uiMenuNameableCreator.getName(), uiMenuNameableCreator));
} }
} }
populateBean(hyperList); this.populate(nameObjects.toArray(new NameObject[nameObjects.size()]));
doLayout(); doLayout();
} }
@ -77,14 +176,15 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
} }
private NameJavaScriptGroup updateNameGroup() { private NameJavaScriptGroup updateNameGroup() {
Nameable[] nameables = update();
NameJavaScriptGroup nameGroup = new NameJavaScriptGroup(); NameJavaScriptGroup nameGroup = new NameJavaScriptGroup();
nameGroup.clear(); nameGroup.clear();
resetItemName(); for(int i = 0; i < nameables.length; i++) {
java.util.List list = updateBean(); UIMenuNameableCreator menu = (UIMenuNameableCreator)((NameObject)nameables[i]).getObject();
for(int i = 0; i < list.size(); i++) {
UIMenuNameableCreator menu = (UIMenuNameableCreator)list.get(i);
NameJavaScript nameJava = new NameJavaScript(menu.getName(), (JavaScript)menu.getObj()); NameJavaScript nameJava = new NameJavaScript(menu.getName(), (JavaScript)menu.getObj());
nameJava.setName(nameables[i].getName());
nameGroup.addNameHyperlink(nameJava); nameGroup.addNameHyperlink(nameJava);
} }
@ -130,4 +230,12 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
} }
return null; return null;
} }
protected Object getob2Populate (Object ob2Populate) {
if (ob2Populate == null) {
return ob2Populate;
}
return ((UIMenuNameableCreator)ob2Populate).getObj();
}
} }

2
designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java

@ -32,7 +32,7 @@ public class VanChartCustomInteractivePane extends VanChartInteractivePane {
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
hyperlinkPane = new VanChartCustomPlotHyperlinkPane(); hyperlinkPane = new VanChartCustomPlotHyperlinkPane();
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, 0); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane);
} }
@Override @Override

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

@ -27,4 +27,8 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
leftcontentPane.setBounds(0, 0, width, height); leftcontentPane.setBounds(0, 0, width, height);
} }
} }
public void reloaPane(JPanel pane){
super.reloaPane(pane);
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
} }

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

@ -21,7 +21,11 @@ public class TableLayout4VanChartHelper {
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) { public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel); return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel){
protected void setcontentPanelontentPanelBorder (){
getContentPanel().setBorder(BorderFactory.createEmptyBorder(0 ,10, 0, 15));
}
};
} }
public static JPanel createGapTableLayoutPane(String title, Component component) { public static JPanel createGapTableLayoutPane(String title, Component component) {

37
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java

@ -6,14 +6,16 @@ import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
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.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
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.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.plugin.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -35,15 +37,12 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
private VanChart chart; private VanChart chart;
private UIButtonGroup moreLabel; private UIButtonGroup moreLabel;
private UISpinner autoRefreshTime; private UISpinner autoRefreshTime;
private UIButtonGroup autoTooltip; private UICheckBox autoTooltip;
private UIButton tooltipSet; private UIButton tooltipSet;
private JPanel contentPane;
private boolean isLargeModel; private boolean isLargeModel;
public UIButtonGroup getMoreLabel() {
return moreLabel;
}
public UISpinner getAutoRefreshTime() { public UISpinner getAutoRefreshTime() {
return autoRefreshTime; return autoRefreshTime;
} }
@ -66,7 +65,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0); autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
autoTooltip = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); autoTooltip = new UICheckBox(Inter.getLocText("Plugin-ChartF_Auto_Tooltip"));
autoTooltip.addChangeListener(new ChangeListener() { autoTooltip.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
@ -80,24 +79,26 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
jPanel.add(autoTooltip, BorderLayout.CENTER); jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST); jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel moreLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_More_Label"), moreLabel);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p};
Component[][] components = initComponent(jPanel); Component[][] components = initComponent(jPanel);
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
content.add(temp, BorderLayout.CENTER); content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER);
return content; return content;
} }
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_More_Label")), moreLabel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Auto_Tooltip")), autoTooltipPane}, new Component[]{autoTooltip, tooltipSet},
}; };
} }
@ -131,19 +132,19 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
protected void layoutContentPane() { protected void layoutContentPane() {
leftcontentPane = createContentPane(); leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
this.add(leftcontentPane); this.add(leftcontentPane);
} }
public void checkRefreshEnable() { public void checkRefreshEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0; Boolean enable = moreLabel.getSelectedIndex() == 0;
autoRefreshTime.setEnabled(enable); contentPane.setVisible(enable);
autoTooltip.setEnabled(enable && !isLargeModel); autoTooltip.setEnabled(enable && !isLargeModel);
checkTooltipEnable(); checkTooltipEnable();
} }
public void checkTooltipEnable() { public void checkTooltipEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.getSelectedIndex() == 0; Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.isSelected();
tooltipSet.setEnabled(enable && !isLargeModel); tooltipSet.setEnabled(enable && !isLargeModel);
} }
@ -152,7 +153,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
public void populateBean(RefreshMoreLabel refreshMoreLabel) { public void populateBean(RefreshMoreLabel refreshMoreLabel) {
moreLabel.setSelectedIndex(refreshMoreLabel.isMoreLabel() ? 0 : 1); moreLabel.setSelectedIndex(refreshMoreLabel.isMoreLabel() ? 0 : 1);
populateAutoRefreshTime(); populateAutoRefreshTime();
autoTooltip.setSelectedIndex(refreshMoreLabel.isAutoTooltip() ? 0 : 1); autoTooltip.setSelected(refreshMoreLabel.isAutoTooltip());
checkRefreshEnable(); checkRefreshEnable();
@ -173,7 +174,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
} }
protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) { protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) {
refreshMoreLabel.setAutoTooltip(autoTooltip.getSelectedIndex() == 0); refreshMoreLabel.setAutoTooltip(autoTooltip.isSelected());
} }

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

@ -19,7 +19,6 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_More_Label")), getMoreLabel()},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime()} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime()}
}; };
} }

84
designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java

@ -0,0 +1,84 @@
package com.fr.plugin.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/18.
*/
public class ChartConditionNameObjectCreator extends NameObjectCreator {
private BasePlot plot;
private ConditionUIMenuNameableCreator conditionUIMenuNameableCreator;
public ChartConditionNameObjectCreator(BasePlot plot, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(menuName, clazz, updatePane);
this.plot = plot;
}
/**
* create Nameable
*
* @param helper
* @return
*/
public Nameable createNameable(UnrepeatedNameHelper helper) {
Constructor<? extends ConditionUIMenuNameableCreator> constructor = null;
try {
constructor = clazzOfInitCase.getConstructor(Plot.class, String.class, Object.class, Class.class);
ConditionUIMenuNameableCreator conditionUIMenuNameableCreator = constructor.newInstance(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), getUpdatePane());
return new NameObject(helper.createUnrepeatedName(this.menuName()), conditionUIMenuNameableCreator);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
/**
* @param ob
* @return
*/
public Object acceptObject2Populate(Object ob) {
if (ob instanceof NameObject) {
ob = ((NameObject) ob).getObject();
}
if (clazzOfObject != null && clazzOfObject.isInstance(ob)) {
doSthChanged4Icon(ob);
conditionUIMenuNameableCreator = (ConditionUIMenuNameableCreator) ((ConditionUIMenuNameableCreator) ob).clone();
return ob;
}
return null;
}
/**
* save update bean
*
* @param wrapper
* @param bean
*/
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
conditionUIMenuNameableCreator.setObj(bean);
((NameObject) wrapper.wrapper).setObject(conditionUIMenuNameableCreator);
}
}

84
designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java

@ -0,0 +1,84 @@
package com.fr.plugin.chart.designer.other;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/21.
*/
public class ChartHyperlinkNameObjectCreartor extends NameObjectCreator {
private Object object;
private UIMenuNameableCreator uIMenuNameableCreator;
public ChartHyperlinkNameObjectCreartor(Object object, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(menuName, clazz, updatePane);
this.object = object;
}
/**
* create Nameable
*
* @param helper
* @return
*/
public Nameable createNameable(UnrepeatedNameHelper helper) {
Constructor<? extends UIMenuNameableCreator> constructor = null;
try {
constructor = clazzOfInitCase.getConstructor(String.class, Object.class, Class.class);
UIMenuNameableCreator uIMenuNameableCreator = constructor.newInstance(menuName, object, getUpdatePane());
return new NameObject(helper.createUnrepeatedName(this.menuName()), uIMenuNameableCreator);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
/**
* @param ob
* @return
*/
public Object acceptObject2Populate(Object ob) {
if (ob instanceof NameObject) {
ob = ((NameObject) ob).getObject();
}
if (clazzOfObject != null && clazzOfObject.isInstance(ob)) {
doSthChanged4Icon(ob);
uIMenuNameableCreator = ((UIMenuNameableCreator) ob).clone();
if (uIMenuNameableCreator.getObj() != null && object.getClass().isInstance(uIMenuNameableCreator.getObj())) {
return ob;
}
}
return null;
}
/**
* save update bean
*
* @param wrapper
* @param bean
*/
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
uIMenuNameableCreator.setObj(bean);
((NameObject) wrapper.wrapper).setObject(uIMenuNameableCreator);
}
}

48
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java

@ -4,10 +4,12 @@ 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.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator; import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
@ -20,18 +22,8 @@ import java.util.List;
public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{ public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{
private static final Dimension DIALOG_SIZE = new Dimension(500, 600); private static final Dimension DIALOG_SIZE = new Dimension(500, 600);
private UICorrelationComboBoxPane conditionPane; private UIListControlPane conditionPane;
public VanChartConditionAttrContentPane() { public VanChartConditionAttrContentPane() {
if (conditionPane == null) {
conditionPane = new UICorrelationComboBoxPane(){
protected Dimension getDialogSize() {
return DIALOG_SIZE;
}
};
}
this.setLayout(new BorderLayout());
this.add(conditionPane, BorderLayout.CENTER);
} }
public void populateBean(Plot plot, Class<? extends ConditionAttributesPane> showPane) { public void populateBean(Plot plot, Class<? extends ConditionAttributesPane> showPane) {
@ -41,19 +33,28 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
} }
public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){ public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){
if (conditionPane == null) {
conditionPane = new VanChartListControlPane(plot);
}
this.setLayout(new BorderLayout());
this.add(conditionPane, BorderLayout.CENTER);
//todo@mango
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>(); List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
list.add(new ConditionUIMenuNameableCreator(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), showPane)); list.add(new ConditionUIMenuNameableCreator(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), showPane));
conditionPane.refreshMenuAndAddMenuAction(list);
List<UIMenuNameableCreator> valueList = new ArrayList<UIMenuNameableCreator>(); NameObject[] nameables = new NameObject[collection.getConditionAttrSize()];
for(int i = 0; i < collection.getConditionAttrSize(); i++) { for(int i = 0; i < collection.getConditionAttrSize(); i++) {
valueList.add(new ConditionUIMenuNameableCreator(plot, collection.getConditionAttr(i).getName(), collection.getConditionAttr(i), showPane)); ConditionUIMenuNameableCreator c =new ConditionUIMenuNameableCreator(plot, collection.getConditionAttr(i).getName(), collection.getConditionAttr(i), showPane);
nameables[i]=(new NameObject(c.getName(),c));
} }
conditionPane.populateBean(valueList); conditionPane.populate(nameables);
conditionPane.doLayout(); conditionPane.doLayout();
} }
@ -62,14 +63,17 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
update(cc); update(cc);
} }
public void update(ConditionCollection cc){
List<UIMenuNameableCreator> list = conditionPane.updateBean();
public void update(ConditionCollection cc) {
Nameable[] nameables = conditionPane.update();
cc.clearConditionAttr(); cc.clearConditionAttr();
for(UIMenuNameableCreator creator : list){ for (int i = 0; i < nameables.length; i++) {
ConditionAttr ca = (ConditionAttr)creator.getObj(); if (nameables[i] instanceof UIMenuNameableCreator) {
ca.setName(creator.getName()); UIMenuNameableCreator uiMenuNameableCreator = (UIMenuNameableCreator) nameables[i];
cc.addConditionAttr(ca); ConditionAttr ca = (ConditionAttr) uiMenuNameableCreator.getObj();
ca.setName(uiMenuNameableCreator.getName());
cc.addConditionAttr(ca);
}
} }
} }
} }

8
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java

@ -4,15 +4,15 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*; import javax.swing.*;
//条件属性 //条件属性
public class VanChartConditionAttrPane extends BasicScrollPane<Chart> { public class VanChartConditionAttrPane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 5725969986029470291L; private static final long serialVersionUID = 5725969986029470291L;
private AbstractConditionAttrContentPane conditionAttrContentPane; private VanChartConditionAttrContentPane conditionAttrContentPane;
public VanChartConditionAttrPane() { public VanChartConditionAttrPane() {
super(); super();
@ -27,7 +27,7 @@ public class VanChartConditionAttrPane extends BasicScrollPane<Chart> {
return conditionAttrContentPane; return conditionAttrContentPane;
} }
protected AbstractConditionAttrContentPane createConditionAttrContentPane() { protected VanChartConditionAttrContentPane createConditionAttrContentPane() {
return new VanChartConditionAttrContentPane(); return new VanChartConditionAttrContentPane();
} }

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

@ -4,7 +4,6 @@ import com.fr.base.Formula;
import com.fr.base.Utils; import com.fr.base.Utils;
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.dialog.BasicScrollPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
@ -12,7 +11,6 @@ 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.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
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;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
@ -23,6 +21,7 @@ import com.fr.plugin.chart.base.VanChartConstants;
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.custom.component.VanChartHyperLinkPane; import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -33,7 +32,7 @@ import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
public class VanChartInteractivePane extends BasicScrollPane<Chart> { public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 8135452818502145597L; private static final long serialVersionUID = 8135452818502145597L;
private static final int AUTO_REFRESH_LEFT_GAP = 18; private static final int AUTO_REFRESH_LEFT_GAP = 18;
@ -43,7 +42,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected UICheckBox fullScreenDisplay; protected UICheckBox fullScreenDisplay;
protected UIToggleButton collapse; protected UIToggleButton collapse;
protected UIToggleButton isChartAnimation; protected UIButtonGroup isChartAnimation;
//坐标轴翻转属性 //坐标轴翻转属性
private UIButtonGroup<Integer> axisRotation; private UIButtonGroup<Integer> axisRotation;
@ -56,6 +55,8 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private TinyFormulaPane from; private TinyFormulaPane from;
private TinyFormulaPane to; private TinyFormulaPane to;
private UIButtonGroup<String> zoomType; private UIButtonGroup<String> zoomType;
private JPanel changeEnablePane;
private JPanel zoomTypePane;
protected VanChartHyperLinkPane superLink; protected VanChartHyperLinkPane superLink;
@ -89,22 +90,15 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
JSeparator jSeparator4Zoom = plot.isSupportZoomDirection() ? new JSeparator() : null;
JSeparator jSeparator4AxisRotation = plot.getAxisPlotType() == AxisPlotType.RECTANGLE ? new JSeparator() : null;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null}, new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAnimationPane(),null}, new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null}, new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null},
new Component[]{createAxisRotationPane(new double[]{p}, columnSize, plot),null},
new Component[]{jSeparator4AxisRotation,null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{jSeparator4Zoom,null},
new Component[]{createAutoRefreshPane(plot),null}, new Component[]{createAutoRefreshPane(plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null} new Component[]{createHyperlinkPane(),null}
}; };
@ -122,18 +116,18 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
zoomType = new UIButtonGroup(getNameArray(), getValueArray()); zoomType = new UIButtonGroup(getNameArray(), getValueArray());
zoomGesture = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); zoomGesture = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomWidget"), zoomWidget); JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomWidget"), zoomWidget);
JPanel zoomGesturePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture); JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change")), zoomResize}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_WidgetBoundary")), zoomResize},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to},
}; };
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, row, col); changeEnablePane = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel changeEnablePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_WidgetBoundary"), temp); changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0));
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType);
JPanel zoomTypePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot); JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot);
zoomWidget.addActionListener(new ActionListener() { zoomWidget.addActionListener(new ActionListener() {
@Override @Override
@ -141,7 +135,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
checkZoomPane(); checkZoomPane();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel);
} }
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) { protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) {
@ -161,10 +155,11 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"), axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")}); Inter.getLocText("Plugin-ChartF_Close")});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel("", SwingConstants.RIGHT),axisRotation} new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis_Rotation") + ":", panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel);
} }
protected String[] getNameArray() { protected String[] getNameArray() {
@ -186,16 +181,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
Component[][] components = createToolBarComponents(); Component[][] components = createToolBarComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel);
} }
protected Component[][] createToolBarComponents() { protected Component[][] createToolBarComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{isSort, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort},
new Component[]{exportImages, null}, new Component[]{null, exportImages},
new Component[]{fullScreenDisplay, null}, new Component[]{null, fullScreenDisplay},
new Component[]{collapse, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_layout")),collapse},
}; };
} }
@ -209,15 +204,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createAnimationPane(){ protected JPanel createAnimationPane(){
isChartAnimation = new UIToggleButton(Inter.getLocText("Plugin-ChartF_OpenAnimation")); isChartAnimation = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), isChartAnimation); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Animation_Effects"), isChartAnimation);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), panel);
} }
protected JPanel createAutoRefreshPane(VanChartPlot plot){ protected JPanel createAutoRefreshPane(VanChartPlot plot){
autoRefreshPane = getMoreLabelPane(plot); autoRefreshPane = getMoreLabelPane(plot);
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Moniter_refresh"), autoRefreshPane, AUTO_REFRESH_LEFT_GAP); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Moniter_refresh"), autoRefreshPane);
} }
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) { protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) {
@ -227,16 +223,14 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
superLink = new VanChartHyperLinkPane(); superLink = new VanChartHyperLinkPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink);
} }
private void checkZoomPane() { private void checkZoomPane() {
boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0; boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0;
zoomResize.setEnabled(zoomWidgetEnabled); changeEnablePane.setVisible(zoomWidgetEnabled);
GUICoreUtils.setEnabled(from, zoomWidgetEnabled); zoomTypePane.setVisible(!zoomWidgetEnabled);
GUICoreUtils.setEnabled(to, zoomWidgetEnabled);
zoomType.setEnabled(!zoomWidgetEnabled);
} }
@Override @Override
@ -307,7 +301,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void populateChartAnimate(Chart chart, Plot plot) { private void populateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) { if(plot.isSupportAnimate()) {
isChartAnimation.setSelected(chart.isJSDraw()); isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1);
isChartAnimation.setEnabled(!largeModel(plot)); isChartAnimation.setEnabled(!largeModel(plot));
} }
} }
@ -410,7 +404,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void updateChartAnimate(Chart chart, Plot plot) { private void updateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) { if(plot.isSupportAnimate()) {
chart.setJSDraw(isChartAnimation.isSelected()); chart.setJSDraw(isChartAnimation.getSelectedIndex()==0);
} }
} }

102
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java

@ -0,0 +1,102 @@
package com.fr.plugin.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/18.
*/
public class VanChartListControlPane extends UIListControlPane {
public VanChartListControlPane(BasePlot plot) {
super(plot);
}
@Override
public void populate(Nameable[] nameableArray) {
initComponentPane();
super.populate(nameableArray);
}
@Override
public NameableCreator[] createNameableCreators() {
return new ChartConditionNameObjectCreator[]{new ChartConditionNameObjectCreator(this.plot, Inter.getLocText("Condition_Attributes"), ConditionUIMenuNameableCreator.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane((Plot) plot).getClass())};
}
protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
Constructor<? extends BasicBeanPane> constructor = null;
try {
constructor = creator.getUpdatePane().getConstructor(Plot.class);
return constructor.newInstance(plot);
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
updateConditionCollection(((VanChartPlot) plot).getConditionCollection());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
@Override
public String getAddItemText() {
return Inter.getLocText("FR-Designer_Add_Condition");
}
@Override
public String title4PopupWindow() {
return Inter.getLocText("Condition_Attributes");
}
protected Object getob2Populate(Object ob2Populate) {
return ((ConditionUIMenuNameableCreator) ob2Populate).getObj();
}
/**
* Update.
*/
public void updateConditionCollection(ConditionCollection cc) {
Nameable[] nameables = this.update();
cc.clearConditionAttr();
for (int i = 0; i < nameables.length; i++) {
UIMenuNameableCreator uiMenuNameableCreator = (UIMenuNameableCreator) ((NameObject) nameables[i]).getObject();
ConditionAttr ca = (ConditionAttr) uiMenuNameableCreator.getObj();
ca.setName(nameables[i].getName());
cc.addConditionAttr(ca);
}
}
}

44
designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -1,5 +1,6 @@
package com.fr.plugin.chart.drillmap.designer.other; package com.fr.plugin.chart.drillmap.designer.other;
import com.fr.chart.base.DrillMapTools;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -11,7 +12,6 @@ import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow; import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.chart.base.DrillMapTools;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import javax.swing.*; import javax.swing.*;
@ -36,16 +36,11 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(rowSize, columnSize),null}, new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAnimationPane(),null}, new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createDrillToolsPane(), null}, new Component[]{createDrillToolsPane(), null},
new Component[]{new JSeparator(), null},
new Component[]{createAutoRefreshPane(plot),null}, new Component[]{createAutoRefreshPane(plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null} new Component[]{createHyperlinkPane(),null}
}; };
@ -54,18 +49,27 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() { private JPanel createDrillToolsPane() {
openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
textAttrPane = new ChartTextAttrPane(); textAttrPane = new ChartTextAttrPane(){
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); protected Component[][] getComponents(JPanel buttonPane) {
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); return new Component[][]{
new Component[]{null},
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
}
};
backgroundPane = new VanChartBackgroundPane4DrillMap();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap();
catalogSuperLink = new VanChartCatalogHyperLinkPane(); catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{openOrClose}, new Component[]{openOrClose},
new Component[]{createTitlePane(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-Chart_Character"), textAttrPane)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Select_Color"), selectBackgroundPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Select_Color"), selectBackgroundPane)},
new Component[]{createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), catalogSuperLink)} new Component[]{createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), catalogSuperLink)}
@ -79,11 +83,11 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), drillPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), drillPane);
} }
private JPanel createTitlePane(String title, Component component) { private JPanel createTitlePane(String title, Component component) {
return TableLayout4VanChartHelper.createTitlePane(title, component, 20); return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component);
} }
private void checkEnable() { private void checkEnable() {
@ -133,4 +137,16 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
catalogSuperLink.update(plot); catalogSuperLink.update(plot);
} }
} }
public class VanChartBackgroundPane4DrillMap extends VanChartBackgroundPaneWithOutImageAndShadow{
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null},
new Component[]{typeComboBox},
new Component[]{centerPane},
new Component[]{transparent},
};
}
}
} }

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataContentPane;
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataProjectPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataProjectPane;
import javax.swing.*;
import java.awt.*; import java.awt.*;
/** /**
@ -18,6 +19,7 @@ public class GanttPlotReportDataContentPane extends AbstractReportDataContentPan
public GanttPlotReportDataContentPane() { public GanttPlotReportDataContentPane() {
initComponent(); initComponent();
this.setLayout(new BorderLayout(0, V_GAP)); this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(projectPane, BorderLayout.NORTH); this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER); this.add(contentPane, BorderLayout.CENTER);
} }

5
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataContentPane;
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataProjectPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataProjectPane;
import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.List; import java.util.List;
@ -19,8 +20,10 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane
public GanttPlotTableDataContentPane() { public GanttPlotTableDataContentPane() {
initComponent(); initComponent();
this.setLayout(new BorderLayout(0, V_GAP)); this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,17,0,15));
this.add(projectPane, BorderLayout.NORTH); this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER); this.add(new JSeparator(), BorderLayout.CENTER);
this.add(contentPane, BorderLayout.SOUTH);
} }
private void initComponent() { private void initComponent() {

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

@ -33,7 +33,7 @@ public abstract class ComboBoxWithButtonPane extends JPanel {
button.setPreferredSize(new Dimension(20, 20)); button.setPreferredSize(new Dimension(20, 20));
button.addActionListener(getButtonListener()); button.addActionListener(getButtonListener());
UILabel title = new UILabel(getTitleText(), SwingConstants.RIGHT); UILabel title = new UILabel(getTitleText());
title.setPreferredSize(new Dimension(60, 20)); title.setPreferredSize(new Dimension(60, 20));
this.setLayout(new BorderLayout(H_GAP, 0)); this.setLayout(new BorderLayout(H_GAP, 0));

8
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java

@ -28,7 +28,11 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
public GanttReportDataContentPane() { public GanttReportDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
@ -51,7 +55,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

26
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java

@ -33,29 +33,27 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
public GanttTableDataContentPane() { public GanttTableDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
seriesComboBox = new UIComboBox(); seriesComboBox = new UIComboBox();
seriesComboBox.setPreferredSize(new Dimension(100,20));
startTimeComboBox = new UIComboBox(); startTimeComboBox = new UIComboBox();
startTimeComboBox.setPreferredSize(new Dimension(100,20));
endTimeComboBox = new UIComboBox(); endTimeComboBox = new UIComboBox();
endTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox = new UIComboBox(); markerTimeComboBox = new UIComboBox();
markerTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox.addItem(NONE); markerTimeComboBox.addItem(NONE);
processComboBox = new UIComboBox(); processComboBox = new UIComboBox();
processComboBox.setPreferredSize(new Dimension(100,20));
processComboBox.addItem(NONE); processComboBox.addItem(NONE);
taskIDComboBox = new UIComboBox(); taskIDComboBox = new UIComboBox();
taskIDComboBox.setPreferredSize(new Dimension(100,20));
taskIDComboBox.addItem(NONE); taskIDComboBox.addItem(NONE);
taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip")); taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip"));
} }
@ -67,15 +65,15 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
double[] col = {p,f}; double[] col = {p,f};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesComboBox}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")+":", SwingConstants.RIGHT), startTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")), startTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")+":", SwingConstants.RIGHT), endTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")), endTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")+":", SwingConstants.RIGHT), markerTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")), markerTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")+":", SwingConstants.RIGHT), processComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")), processComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")+":", SwingConstants.RIGHT), taskIDComboBox} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")), taskIDComboBox}
}; };
return TableLayoutHelper.createTableLayoutPane(components, row, col); return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
} }
@Override @Override

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java

@ -38,7 +38,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
projectName = new ComboBoxWithButtonPane(){ projectName = new ComboBoxWithButtonPane(){
@Override @Override
protected String getTitleText() { protected String getTitleText() {
return Inter.getLocText("Plugin-ChartF_Project_Name") + ":"; return Inter.getLocText("Plugin-ChartF_Project_Name");
} }
@Override @Override

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java

@ -27,7 +27,7 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
} }
public TinyFormulaWithButtonPane(String text, String iconUrl) { public TinyFormulaWithButtonPane(String text, String iconUrl) {
editLabel = new UIEditLabel(text,SwingConstants.RIGHT){ editLabel = new UIEditLabel(text,SwingConstants.LEFT){
protected void doAfterMousePress(){ protected void doAfterMousePress(){
clearAllBackground(); clearAllBackground();
} }

7
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java

@ -25,8 +25,9 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
public GanttLinkReportDataContentPane() { public GanttLinkReportDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
} panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER); }
private void initAllComponent() { private void initAllComponent() {
startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID")); startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID"));
@ -42,7 +43,7 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); UILabel label = new UILabel(title );
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

18
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java

@ -8,7 +8,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.gantt.data.VanGanttDefinitionHelper;
import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition; import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition;
import com.fr.plugin.chart.gantt.designer.data.data.GanttDataPaneHelper; import com.fr.plugin.chart.gantt.designer.data.data.GanttDataPaneHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -28,18 +27,19 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
public GanttLinkTableDataContentPane() { public GanttLinkTableDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
startTaskIDComboBox = new UIComboBox(); startTaskIDComboBox = new UIComboBox();
startTaskIDComboBox.setPreferredSize(new Dimension(100,20));
endTaskIDComboBox = new UIComboBox(); endTaskIDComboBox = new UIComboBox();
endTaskIDComboBox.setPreferredSize(new Dimension(100,20));
linkTypeComboBox = new UIComboBox(); linkTypeComboBox = new UIComboBox();
linkTypeComboBox.setPreferredSize(new Dimension(100,20));
} }
@ -50,12 +50,12 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
double[] col = {p,f}; double[] col = {p,f};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")+":", SwingConstants.RIGHT), startTaskIDComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")), startTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")+":", SwingConstants.RIGHT), endTaskIDComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")), endTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")+":", SwingConstants.RIGHT), linkTypeComboBox} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")), linkTypeComboBox}
}; };
return TableLayoutHelper.createTableLayoutPane(components, row, col); return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
} }
@Override @Override

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

@ -31,7 +31,7 @@ public class AreaPane extends AbstractReportDataContentPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }

6
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java

@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.report;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.data.VanMapReportDefinition; import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -19,8 +19,8 @@ public class LineMapAreaPane extends PointMapAreaPane {
protected JPanel createContentPane() { protected JPanel createContentPane() {
initAreaPane(); initAreaPane();
initEndAreaPane(); initEndAreaPane();
JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP);
JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP);
JPanel content = new JPanel(new BorderLayout(0, V_GAP)); JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(panel1, BorderLayout.NORTH); content.add(panel1, BorderLayout.NORTH);

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

@ -34,11 +34,11 @@ public class LongLatAreaPane extends AreaPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
@Override @Override

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

@ -46,9 +46,9 @@ public class AreaPane extends AbstractTableDataContentPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
protected void initAreaNameCom() { protected void initAreaNameCom() {

6
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java

@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.table;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.*; import javax.swing.*;
@ -25,8 +25,8 @@ public class LineMapAreaPane extends PointMapAreaPane {
initAreaPane(parentPane); initAreaPane(parentPane);
initEndAreaPane(parentPane); initEndAreaPane(parentPane);
JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP);
JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP);
JPanel content = new JPanel(new BorderLayout(0, V_GAP)); JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(startPane, BorderLayout.NORTH); content.add(startPane, BorderLayout.NORTH);

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

@ -36,12 +36,12 @@ public class LongLatAreaPane extends AreaPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitudeCom},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitudeCom},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
public void refreshBoxListWithSelectTableData(List list) { public void refreshBoxListWithSelectTableData(List list) {

3
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -25,6 +25,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
initAreaName(); initAreaName();
this.add(getContent(), "0,0,2,0"); this.add(getContent(), "0,0,2,0");
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
protected void initAreaName() { protected void initAreaName() {
@ -33,7 +34,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT); UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name"));
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

19
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java

@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.report;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.data.VanMapReportDefinition; import com.fr.plugin.chart.map.data.VanMapReportDefinition;
@ -48,6 +51,10 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
//================================public class=================================== //================================public class===================================
public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> { public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
private UIButtonGroup<Integer> locationType; private UIButtonGroup<Integer> locationType;
private JPanel centerPane; private JPanel centerPane;
@ -85,7 +92,17 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
locationType.setSelectedIndex(0); locationType.setSelectedIndex(0);
this.add(locationType, BorderLayout.NORTH); double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }

29
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java

@ -5,9 +5,10 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
@ -33,11 +34,16 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent
initAreaNameCom(); initAreaNameCom();
JPanel areaNamePane = createAreaNamePane(); JPanel areaNamePane = createAreaNamePane();
JSeparator jSeparator = new JSeparator();
areaNamePane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
jSeparator.setPreferredSize(new Dimension(246,2));
this.add(areaNamePane, BorderLayout.CENTER); this.add(areaNamePane, BorderLayout.NORTH);
this.add(jSeparator, BorderLayout.CENTER);
seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot()); seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot());
this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH); this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH);
} }
protected void initAreaNameCom() { protected void initAreaNameCom() {
@ -53,14 +59,21 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent
} }
protected JPanel createAreaNamePane() { protected JPanel createAreaNamePane() {
JPanel areaNamePane = new JPanel(new BorderLayout(4, 0)); UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name"));
areaNamePane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); label.setPreferredSize(new Dimension(80, 20));
UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT);
label.setPreferredSize(new Dimension(75, 20));
areaNameCom.setPreferredSize(new Dimension(100, 20)); areaNameCom.setPreferredSize(new Dimension(100, 20));
areaNamePane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{areaNameCom, null, null, label, null})); double p = TableLayout.PREFERRED;
return areaNamePane; double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{label, areaNameCom},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }
protected void makeToolTipUse(UIComboBox comBox) { protected void makeToolTipUse(UIComboBox comBox) {

17
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java

@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.table;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
@ -80,6 +83,10 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
public LongLatAreaTableComboPane() { public LongLatAreaTableComboPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
this.setLayout(new BorderLayout(0, 5)); this.setLayout(new BorderLayout(0, 5));
centerPane = new JPanel(new CardLayout()){ centerPane = new JPanel(new CardLayout()){
@Override @Override
@ -110,7 +117,15 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
locationType.setSelectedIndex(0); locationType.setSelectedIndex(0);
this.add(locationType, BorderLayout.NORTH); double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }

14
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java

@ -3,14 +3,18 @@ package com.fr.plugin.chart.map.designer.other;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane;
import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.*;
import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.designer.VanMapAreaAndPointGroupPane; import com.fr.plugin.chart.map.designer.VanMapAreaAndPointGroupPane;
import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane; import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartBubblePointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartCommonPointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartDefaultPointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartImagePointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartLineMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartMapConditionPane;
import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -19,7 +23,7 @@ import java.awt.*;
* Created by Mitisky on 16/5/23. * Created by Mitisky on 16/5/23.
* 组合地图时有两个 * 组合地图时有两个
*/ */
public class VanChartMapConditionAttrContentPane extends AbstractConditionAttrContentPane { public class VanChartMapConditionAttrContentPane extends VanChartConditionAttrContentPane {
private VanChartConditionAttrContentPane pointConditionPane; private VanChartConditionAttrContentPane pointConditionPane;
private VanChartConditionAttrContentPane areaConditionPane; private VanChartConditionAttrContentPane areaConditionPane;
private VanChartConditionAttrContentPane lineConditionPane; private VanChartConditionAttrContentPane lineConditionPane;

4
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java

@ -1,13 +1,13 @@
package com.fr.plugin.chart.map.designer.other; package com.fr.plugin.chart.map.designer.other;
import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane;
import com.fr.plugin.chart.designer.other.VanChartConditionAttrPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrPane;
/** /**
* Created by Mitisky on 16/5/20. * Created by Mitisky on 16/5/20.
*/ */
public class VanChartMapConditionAttrPane extends VanChartConditionAttrPane{ public class VanChartMapConditionAttrPane extends VanChartConditionAttrPane{
protected AbstractConditionAttrContentPane createConditionAttrContentPane() { protected VanChartConditionAttrContentPane createConditionAttrContentPane() {
return new VanChartMapConditionAttrContentPane(); return new VanChartMapConditionAttrContentPane();
} }
} }

5
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java

@ -2,15 +2,14 @@ package com.fr.plugin.chart.map.designer.other;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.other.AutoRefreshPane; import com.fr.plugin.chart.designer.other.AutoRefreshPane;
import com.fr.plugin.chart.designer.other.AutoRefreshPaneWithoutTooltip; import com.fr.plugin.chart.designer.other.AutoRefreshPaneWithoutTooltip;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*; import javax.swing.*;
@ -24,7 +23,7 @@ public class VanChartMapInteractivePane extends VanChartInteractivePaneWithMapZo
@Override @Override
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
hyperlinkPane = new VanChartMapHyperLinkPane(); hyperlinkPane = new VanChartMapHyperLinkPane();
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, HYPERLINK_LEFT_GAP); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane);
} }
@Override @Override
protected void populateHyperlink(Plot plot) { protected void populateHyperlink(Plot plot) {

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

@ -7,6 +7,7 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.FRTreeComboBox; import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -81,7 +82,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private UITextArea attribution; private UITextArea attribution;
private UIComboBox zoomLevel; private UIComboBox zoomLevel;
private UIComboBox viewCenterCom; private UIButtonGroup viewCenterCom;
private JPanel longAndLatPane; private JPanel longAndLatPane;
private UISpinner longitude; private UISpinner longitude;
private UISpinner latitude; private UISpinner latitude;
@ -112,18 +113,20 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
public VanChartMapSourceChoosePane() { public VanChartMapSourceChoosePane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10,0,0,10)); this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {226}; double[] columnSize = {246};
double[] rowSize = {p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p};
JPanel panel = new JPanel(new BorderLayout());
panel.add(createMapSourcesPane(), BorderLayout.NORTH);
panel.add(createGISLayerPane(), BorderLayout.CENTER);
JPanel BasePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer_Basic"), panel);
Component[][] comps = new Component[][]{ Component[][] comps = new Component[][]{
new Component[]{new JSeparator()}, new Component[]{BasePane},
new Component[]{createMapSourcesPane()},
new Component[]{new JSeparator()},
new Component[]{createGISLayerPane()},
new Component[]{new JSeparator()},
new Component[]{createMapInitStatusPane()} new Component[]{createMapInitStatusPane()}
}; };
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,columnSize); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,columnSize);
@ -190,7 +193,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
sourceComboBox.addPopupMenuListener(popupMenuListener); sourceComboBox.addPopupMenuListener(popupMenuListener);
sourceTitleLabel = createSourceTitleLabel(); sourceTitleLabel = createSourceTitleLabel();
return TableLayout4VanChartHelper.createTableLayoutPaneWithUILabel(sourceTitleLabel, sourceComboBox);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{sourceTitleLabel,sourceComboBox},
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize);
} }
private JPanel createGISLayerPane() { private JPanel createGISLayerPane() {
@ -259,7 +272,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
panel.add(gisLayer, BorderLayout.CENTER); panel.add(gisLayer, BorderLayout.CENTER);
panel.add(layerCardPane, BorderLayout.SOUTH); panel.add(layerCardPane, BorderLayout.SOUTH);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel); return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel);
} }
private JPanel createCustomTileLayer() { private JPanel createCustomTileLayer() {
@ -391,24 +404,26 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private JPanel createMapInitStatusPane() { private JPanel createMapInitStatusPane() {
zoomLevel = new UIComboBox(ZOOM_LEVELS); zoomLevel = new UIComboBox(ZOOM_LEVELS);
viewCenterCom = new UIComboBox(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING}); viewCenterCom = new UIButtonGroup(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING});
longitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); longitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0);
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[] rowSize = {p,p}; double[] rowSize = {p,p,p};
Component[][] comps = new Component[][]{ Component[][] comps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer"), SwingConstants.RIGHT), zoomLevel}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center"), SwingConstants.RIGHT), viewCenterCom}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom},
}; };
final JPanel northPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,COLUMN_SIZE); final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,COLUMN_SIZE);
Component[][] longAndLatComps = new Component[][]{ Component[][] longAndLatComps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude"), SwingConstants.RIGHT), longitude}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude"), SwingConstants.RIGHT), latitude} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude}
}; };
longAndLatPane = TableLayoutHelper.createTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE);
longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
longAndLatPane.setVisible(false); longAndLatPane.setVisible(false);
JPanel contentPane = new JPanel(new BorderLayout(0, 6)){ JPanel contentPane = new JPanel(new BorderLayout(0, 6)){
@ -425,17 +440,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
contentPane.add(northPane, BorderLayout.NORTH); contentPane.add(northPane, BorderLayout.NORTH);
contentPane.add(longAndLatPane, BorderLayout.CENTER); contentPane.add(longAndLatPane, BorderLayout.CENTER);
viewCenterCom.addItemListener(new ItemListener() { viewCenterCom.addActionListener(new ActionListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void actionPerformed(ActionEvent e) {
longAndLatPane.setVisible(!isAutoViewCenter()); longAndLatPane.setVisible(!isAutoViewCenter());
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane);
} }
private boolean isAutoViewCenter() { private boolean isAutoViewCenter() {
return ComparatorUtils.equals(viewCenterCom.getSelectedItem(), AUTO_CENTER_STRING); return viewCenterCom.getSelectedIndex()==0;
} }
private PopupMenuListener popupMenuListener = new PopupMenuListener() { private PopupMenuListener popupMenuListener = new PopupMenuListener() {
@ -534,7 +549,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private void resetViewCenter(VanChartMapPlot mapPlot) { private void resetViewCenter(VanChartMapPlot mapPlot) {
mapPlot.getViewCenter().setAuto(true); mapPlot.getViewCenter().setAuto(true);
viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); viewCenterCom.setSelectedIndex(0);
} }
private void resetZoomLevel(VanChartMapPlot mapPlot) { private void resetZoomLevel(VanChartMapPlot mapPlot) {
@ -575,15 +590,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
ViewCenter viewCenter = mapPlot.getViewCenter(); ViewCenter viewCenter = mapPlot.getViewCenter();
if(viewCenter.isAuto()){ if(viewCenter.isAuto()){
viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); viewCenterCom.setSelectedIndex(0);
longitude.setValue(0); longitude.setValue(0);
latitude.setValue(0); latitude.setValue(0);
} else { } else {
viewCenterCom.setSelectedItem(CUSTOM_CENTER_STRING); viewCenterCom.setSelectedIndex(1);
longitude.setValue(viewCenter.getLongitude()); longitude.setValue(viewCenter.getLongitude());
latitude.setValue(viewCenter.getLatitude()); latitude.setValue(viewCenter.getLatitude());
} }
longAndLatPane.setVisible(!isAutoViewCenter());
checkLayerCardPane(); checkLayerCardPane();
} }

18
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java

@ -62,7 +62,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_north = {p, f}; double[] columnSize_north = {p, f};
double[] rowSize_north = {p, p}; double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){ levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@Override @Override
@ -87,8 +87,9 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
nameField.setPreferredSize(new Dimension(WD, HT)); nameField.setPreferredSize(new Dimension(WD, HT));
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, new Component[]{new JSeparator(), null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit},
}; };
return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north);
@ -115,22 +116,23 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_center = {p, f}; double[] columnSize_center = {p, f};
double[] rowSize_center = new double[levelNum + 1]; double[] rowSize_center = new double[levelNum + 2];
initLevelNameList(); initLevelNameList();
for (int i = 0; i < levelNum + 1; i++){ for (int i = 0; i < levelNum + 2; i++){
rowSize_center[i] = p; rowSize_center[i] = p;
} }
Component[][] components_center = new Component[levelNum + 1][]; Component[][] components_center = new Component[levelNum + 2][];
for (int i = 0; i < levelNum; i++){ for (int i = 0; i < levelNum; i++){
components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)};
} }
value = new TinyFormulaPane(); value = new TinyFormulaPane();
components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; components_center[levelNum] = new Component[]{new JSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value};
registerListener4Center(); registerListener4Center();

20
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -84,17 +84,17 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_center = {p, f}; double[] columnSize_center = {p, f};
double[] rowSize_center = new double[levelNum + 2]; double[] rowSize_center = new double[levelNum + 3];
initLevelNameList(); initLevelNameList();
for (int i = 0; i < levelNum + 2; i++){ for (int i = 0; i < levelNum + 3; i++){
rowSize_center[i] = p; rowSize_center[i] = p;
} }
Component[][] components_center = new Component[levelNum + 2][]; Component[][] components_center = new Component[levelNum + 3][];
for (int i = 0; i < levelNum; i++){ for (int i = 0; i < levelNum; i++){
components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)};
} }
value = new UIComboBox(); value = new UIComboBox();
@ -103,8 +103,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
calculateCombox.reset(); calculateCombox.reset();
calculateCombox.setPreferredSize(new Dimension(WD, HT)); calculateCombox.setPreferredSize(new Dimension(WD, HT));
components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; components_center[levelNum] = new Component[]{new JSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT), calculateCombox}; components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value};
components_center[levelNum+2] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox};
initCenterItemListener(); initCenterItemListener();
@ -147,7 +148,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_north = {p, f}; double[] columnSize_north = {p, f};
double[] rowSize_north = {p, p}; double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){ levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@Override @Override
@ -173,8 +174,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
nameField.setPreferredSize(new Dimension(WD, HT)); nameField.setPreferredSize(new Dimension(WD, HT));
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, new Component[]{new JSeparator(),null },
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit},
}; };
return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north);

13
designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java

@ -38,14 +38,15 @@ public class StructurePlotReportDataContentPane extends AbstractReportDataConten
nodeValue = new TinyFormulaPane(); nodeValue = new TinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName},
new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeID}, new Component[]{new UILabel("id"), nodeID},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parentID}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parentID},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName},
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);

27
designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java

@ -30,7 +30,8 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP
public StructurePlotTableDataContentPane() { public StructurePlotTableDataContentPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p, p}; double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p};
nodeName = new UIComboBox(); nodeName = new UIComboBox();
@ -40,26 +41,20 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP
nodeValue = new UIComboBox(); nodeValue = new UIComboBox();
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
nodeName.setPreferredSize(new Dimension(100, 20));
nodeId.setPreferredSize(new Dimension(100, 20));
parenrId.setPreferredSize(new Dimension(100, 20));
seriesName.setPreferredSize(new Dimension(100, 20));
nodeValue.setPreferredSize(new Dimension(100, 20));
calculateCombox.setPreferredSize(new Dimension(100, 20));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName},
new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeId}, new Component[]{new UILabel("id"), nodeId},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parenrId}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parenrId},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName},
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue},
new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }

10
designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java

@ -34,12 +34,14 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten
wordValue = new TinyFormulaPane(); wordValue = new TinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);

21
designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java

@ -28,7 +28,8 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP
public WordCloudPlotTableDataContentPane() { public WordCloudPlotTableDataContentPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = { p, p }; double f = TableLayout.FILL;
double[] columnSize = { p, f};
double[] rowSize = { p, p, p, p}; double[] rowSize = { p, p, p, p};
name = new UITextField(); name = new UITextField();
@ -37,22 +38,20 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
name.setPreferredSize(new Dimension(100, 20));
wordName.setPreferredSize(new Dimension(100, 20));
wordValue.setPreferredSize(new Dimension(100, 20));
calculateCombox.setPreferredSize(new Dimension(100, 20));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue},
new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
@Override @Override

Loading…
Cancel
Save