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
71c5dbd12e
  1. 4
      designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java
  2. 62
      designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java
  3. 28
      designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java
  4. 1
      designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java
  5. 29
      designer/src/com/fr/design/actions/edit/HyperlinkAction.java
  6. 2
      designer/src/com/fr/design/cell/editor/AbstractCellEditor.java
  7. 1
      designer/src/com/fr/design/mainframe/CellElementPropertyPane.java
  8. 6
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  9. 19
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  10. 20
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  11. 42
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  12. 4
      designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java
  13. 3
      designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java
  14. 1
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  15. 4
      designer/src/com/fr/design/mainframe/cell/settingpane/style/PredefinedStylePane.java
  16. 4
      designer/src/com/fr/design/present/PresentPane.java
  17. 8
      designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java
  18. 32
      designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java
  19. 6
      designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java
  20. 4
      designer/src/com/fr/grid/GridMouseAdapter.java
  21. 5
      designer/src/com/fr/grid/selection/CellSelection.java
  22. 7
      designer/src/com/fr/grid/selection/FloatSelection.java
  23. 5
      designer/src/com/fr/poly/creator/ECBlockPane.java
  24. 3
      designer/src/com/fr/start/Designer.java
  25. 14
      designer_base/src/com/fr/design/actions/core/ActionFactory.java
  26. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  27. 30
      designer_base/src/com/fr/design/dialog/BasicScrollPane.java
  28. 112
      designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java
  29. 44
      designer_base/src/com/fr/design/file/HistoryTemplateListPane.java
  30. 39
      designer_base/src/com/fr/design/foldablepane/HeaderPane.java
  31. 56
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  32. 6
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  33. 2
      designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java
  34. 4
      designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java
  35. 15
      designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java
  36. 2
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  37. 22
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  38. 74
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  39. 113
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  40. 2
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  41. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/area.png
  42. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/bar.png
  43. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/bubble.png
  44. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/column.png
  45. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/custom.png
  46. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/drillmap.png
  47. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/funnel.png
  48. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/gantt.png
  49. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/gauge.png
  50. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/heatmap.png
  51. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/line.png
  52. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/map.png
  53. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/multiPie.png
  54. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/pie.png
  55. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/radar.png
  56. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/scatter.png
  57. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/structure.png
  58. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/treeMap.png
  59. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/wordcloud.png
  60. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_Drill_Map.png
  61. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewBubble.png
  62. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewCustom.png
  63. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewFunnel.png
  64. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGantt.png
  65. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGauge.png
  66. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewHeatMap.png
  67. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMap.png
  68. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png
  69. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewRadar.png
  70. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewScatter.png
  71. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png
  72. 9
      designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java
  73. 5
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  74. 44
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  75. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java
  76. 38
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  77. 28
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  78. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java
  79. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java
  80. 40
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  81. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java
  82. 93
      designer_chart/src/com/fr/design/module/ChartDesignerModule.java
  83. 40
      designer_chart/src/com/fr/plugin/chart/area/AreaIndependentVanChartInterface.java
  84. 96
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaConditionPane.java
  85. 95
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java
  86. 46
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java
  87. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/area.png
  88. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/custom.png
  89. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/percentStack.png
  90. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/stack.png
  91. 56
      designer_chart/src/com/fr/plugin/chart/bar/BarIndependentVanChartInterface.java
  92. 96
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java
  93. 23
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarStylePane.java
  94. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/bar.png
  95. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/custom.png
  96. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/percentstack.png
  97. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/stack.png
  98. 85
      designer_chart/src/com/fr/plugin/chart/bubble/BubbleIndependentVanChartInterface.java
  99. 94
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionPane.java
  100. 22
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionSelectionPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

4
designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java

@ -1,10 +1,10 @@
package com.fr.design.actions.cell;
import java.awt.event.ActionEvent;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.CellElementPropertyPane;
import java.awt.event.ActionEvent;
/**
* 所有的CellAttributeTableAction都是指向单元格属性表的,点了就自动跳转到单元格属性表
*

62
designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java

@ -1,24 +1,18 @@
package com.fr.design.actions.cell;
import com.fr.base.BaseUtils;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.present.CellWriteAttrPane;
import com.fr.design.dialog.BasicPane;
import com.fr.form.ui.Widget;
import com.fr.general.FRLogger;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection;
import com.fr.privilege.finegrain.WidgetPrivilegeControl;
import com.fr.report.cell.TemplateCellElement;
import java.awt.event.ActionEvent;
/**
* Cell Widget Attribute.
*/
public class CellWidgetAttrAction extends AbstractCellElementAction {
public class CellWidgetAttrAction extends UpdateAction {
public CellWidgetAttrAction(ElementCasePane t) {
super(t);
public CellWidgetAttrAction() {
this.setMenuKeySet(KeySetUtils.CELL_WIDGET_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
@ -26,47 +20,7 @@ public class CellWidgetAttrAction extends AbstractCellElementAction {
}
@Override
protected BasicPane populateBasicPane(TemplateCellElement cellElement) {
CellWriteAttrPane pane = new CellWriteAttrPane(this.getEditingComponent());
//got simple cell element from column and row.
pane.populate(cellElement);
return pane;
}
@Override
protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) {
CellWriteAttrPane pane = (CellWriteAttrPane) bp;
if (cellElement.getWidget() == null) {
pane.update(cellElement);
return;
}
try {
Widget oldWidget = (Widget) cellElement.getWidget().clone();
pane.update(cellElement);
//这边需要重新设置权限细粒度的hashset是因为Update是直接生成一个新的来update的,所以以前里面的hashset都没有了
Widget newWidget = cellElement.getWidget();
if (newWidget.getClass() == oldWidget.getClass()) {
newWidget.setWidgetPrivilegeControl((WidgetPrivilegeControl) oldWidget.getWidgetPrivilegeControl().clone());
}
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage());
}
}
@Override
protected boolean isNeedShinkToFit() {
return true;
}
@Override
public void update() {
ElementCasePane ePane = this.getEditingComponent();
Selection sel = ePane.getSelection();
if (sel instanceof CellSelection) {
this.setEnabled(true);
} else {
this.setEnabled(false);
}
public void actionPerformed(ActionEvent e) {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS);
}
}

28
designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java

@ -0,0 +1,28 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.design.actions.cell;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.menu.KeySetUtils;
import java.awt.event.ActionEvent;
/**
* Condition Attributes.
*/
public class ConditionAttributesAction extends UpdateAction {
public ConditionAttributesAction() {
this.setMenuKeySet(KeySetUtils.CONDITION_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/highlight.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR);
}
}

1
designer/src/com/fr/design/actions/cell/GlobalStyleMenuDef.java

@ -186,6 +186,7 @@ public class GlobalStyleMenuDef extends MenuDef {
}
stylePane.updateGlobalStyle(getEditingComponent());
CellElementPropertyPane.getInstance().GoToPane(Inter.getLocText("FR-Designer-Widget_Style"));
return true;
}

29
designer/src/com/fr/design/actions/edit/HyperlinkAction.java

@ -0,0 +1,29 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.design.actions.edit;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.menu.KeySetUtils;
import java.awt.event.ActionEvent;
/**
* HyperlinkAction.
*/
public class HyperlinkAction extends UpdateAction {
public HyperlinkAction() {
this.setMenuKeySet(KeySetUtils.HYPER_LINK);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/hyperLink.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_HYPERLINK);
}
}

2
designer/src/com/fr/design/cell/editor/AbstractCellEditor.java

@ -7,6 +7,7 @@ import java.awt.Point;
import javax.swing.event.EventListenerList;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.event.CellEditorEvent;
import com.fr.grid.event.CellEditorListener;
@ -114,6 +115,7 @@ public abstract class AbstractCellEditor implements CellEditor {
}
if(ePane != null) {
ePane.fireSelectionChangeListener();
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ELEMENT);
}
}

1
designer/src/com/fr/design/mainframe/CellElementPropertyPane.java

@ -176,6 +176,7 @@ public class CellElementPropertyPane extends DockingView {
*/
public void GoToPane(String... id) {
cellElementEditPane.setSelectedIndex(id);
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR);
EastRegionContainerPane.getInstance().setWindow2PreferWidth();
}

6
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.fun.MenuHandler;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.menu.KeySetUtils;
@ -169,12 +170,13 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
MenuDef menuDef = new MenuDef(KeySetUtils.CELL.getMenuKeySetName(), KeySetUtils.CELL.getMnemonic());
menuDef.addShortCut(new CellExpandAttrAction());
menuDef.addShortCut(new CellWidgetAttrAction(this));
menuDef.addShortCut(new CellWidgetAttrAction());
menuDef.addShortCut(new GlobalStyleMenuDef(this));
menuDef.addShortCut(new ConditionAttributesAction());
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));
menuDef.addShortCut(new HyperlinkAction());
menuDef.addShortCut(SeparatorDef.DEFAULT);
menuDef.addShortCut(new MergeCellAction(this));
menuDef.addShortCut(new UnmergeCellAction(this));

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

@ -32,35 +32,22 @@ import java.util.List;
* @since 2012-5-8下午12:18:53
*/
public class CellElementEditPane extends BasicPane {
private static int TIME_GAP = 80;
private static final int LEFT_BORDER = -5;
private static final int RIGHT_BORDER = 5;
private List<AbstractCellAttrPane> paneList;
private TemplateCellElement cellelement;
private ElementCasePane ePane;
private UIHeadGroup tabsHeaderIconPane;
private boolean isEditing;
private int PaneListIndex;
private CardLayout card;
private JPanel center;
private JPanel downTitle;
private JPanel title;
private UILabel titlename;
private TitleChangeListener titleChangeListener = null;
private CellAttributeProvider cellAttributeProvider = null;
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 CellElementEditPane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400);
jf.setVisible(true);
}
public CellElementEditPane() {
setLayout(new BorderLayout());
initPaneList();
@ -89,7 +76,7 @@ public class CellElementEditPane extends BasicPane {
downTitle = new JPanel();
downTitle.setLayout(new BorderLayout());
downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH);
center.setBorder(BorderFactory.createEmptyBorder(0, -10, 0, -10));
center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, RIGHT_BORDER));
downTitle.add(center, BorderLayout.CENTER);
this.add(downTitle, BorderLayout.CENTER);

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

@ -2,6 +2,7 @@ package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.expand.ExpandLeftFatherPane;
import com.fr.design.expand.ExpandUpFatherPane;
import com.fr.design.expand.SortExpandAttrPane;
@ -61,18 +62,6 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
return layoutPane();
}
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 CellExpandAttrPane().layoutPane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400);
jf.setVisible(true);
}
private void initAllNames() {
expandDirectionButton.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expand_Direction"));
leftFatherPane.setGlobalName(Inter.getLocText("FR-Designer_LeftParent"));
@ -85,8 +74,8 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
layoutPane = new JPanel(new BorderLayout());
basicPane = new JPanel();
seniorPane = new JPanel();
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 290, 24, basicPane());
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 290, 24, seniorPane());
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 223, 24, basicPane());
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 223, 24, seniorPane());
layoutPane.add(basicPane, BorderLayout.NORTH);
layoutPane.add(seniorPane, BorderLayout.CENTER);
return layoutPane;
@ -122,6 +111,8 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
UILabel expendSort = new UILabel(Inter.getLocText("FR-Designer_ExpendSort"), SwingConstants.LEFT);
JPanel expendSortPane = new JPanel(new BorderLayout());
expendSortPane.add(expendSort, BorderLayout.NORTH);
horizontalExpandableCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
verticalExpandableCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{horizontalExpandableCheckBox, null},
@ -163,6 +154,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
default: {
horizontalExpandableCheckBox.setSelected(false);
verticalExpandableCheckBox.setSelected(false);
break;
}
}

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.file.HistoryTemplateListPane;
@ -88,18 +89,18 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private JPanel basicPane() {
autoHeightCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Auto_Adjust_Height"));
autoWidthCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Auto_Adjust_Wdith"));
autoHeightCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
autoWidthCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p};
double[] rowSize = {p, p, p};
double[] columnSize = {p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{null},
new Component[]{autoHeightCheckBox},
new Component[]{null},
new Component[]{autoWidthCheckBox},
new Component[]{null},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
}
@ -146,22 +147,38 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private JPanel seniorUpPane() {
JPanel fileNamePane = createNormal();
previewCellContent.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
printAndExportContent.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
printAndExportBackground.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p, p, p, p};
double[] rowSize = {p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{previewCellContent, null},
new Component[]{printAndExportContent, null},
new Component[]{printAndExportBackground, null},
};
JPanel upPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
double[] downRowSize = {p, p, p, p, p, p};
double[] downColumnSize = {p, f};
int[][] downRowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] downComponent = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContent},
new Component[]{null, fileNamePane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.RIGHT), tooltipTextField},
new Component[]{null, null},
new Component[]{null, null},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
JPanel downPane = TableLayoutHelper.createGapTableLayoutPane(downComponent, downRowSize, downColumnSize, downRowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
JPanel pane = new JPanel(new BorderLayout());
pane.add(upPane, BorderLayout.NORTH);
pane.add(downPane, BorderLayout.CENTER);
return pane;
}
private JPanel pagePane() {
@ -175,6 +192,13 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
canBreakOnPaginateCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_CellPage_Can_Break_On_Paginate"));
repeatCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_CellPage_Repeat_Content_When_Paging"));
pageBeforeRowCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageAfterRowCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageBeforeColumnCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageAfterColumnCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
canBreakOnPaginateCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
repeatCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
double[] columnSize = {p};
@ -190,7 +214,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
new Component[]{canBreakOnPaginateCheckBox},
new Component[]{repeatCheckBox},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
}

4
designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.present.Present;
import com.fr.design.constants.UIConstants;
import com.fr.design.present.PresentPane;
import com.fr.general.Inter;
import com.fr.report.cell.DefaultTemplateCellElement;
@ -21,12 +22,14 @@ public class CellPresentPane extends AbstractCellAttrPane {
/**
* 初始化面板
*
* @return 面板
*/
public JPanel createContentPane() {
presentPane = new PresentPane();
JPanel content = new JPanel(new BorderLayout());
content.add(presentPane, BorderLayout.CENTER);
presentPane.setBorder(UIConstants.CELL_ATTR_PRESENTBORDER);
presentPane.addTabChangeListener(new ItemListener() {
@Override
@ -104,6 +107,7 @@ public class CellPresentPane extends AbstractCellAttrPane {
/**
* 对话框标题
*
* @return 标题
*/
public String title4PopupWindow() {

3
designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.Style;
import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.cell.settingpane.style.StylePane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
@ -25,6 +26,7 @@ public class CellStylePane extends AbstractCellAttrPane {
JPanel content = new JPanel(new BorderLayout());
stylePane = new StylePane();
content.add(stylePane, BorderLayout.CENTER);
stylePane.setBorder(UIConstants.CELL_ATTR_PRESENTBORDER);
stylePane.addPredefinedChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
attributeChanged();
@ -37,7 +39,6 @@ public class CellStylePane extends AbstractCellAttrPane {
adjustValues();// 里面的Tab切换后要及时调整滚动条,因为一些界面可能不需要滚动条
}
});
// content.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
return content;
}

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

@ -40,6 +40,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
public CustomStylePane() {
super();
tabPane.setOneLineTab(true);
tabPane.setDrawLine(false);
tabPane.setLayout(new FiveButtonLayout(1));
}

4
designer/src/com/fr/design/mainframe/cell/settingpane/style/PredefinedStylePane.java

@ -23,6 +23,8 @@ import java.util.Iterator;
public class PredefinedStylePane extends FurtherBasicBeanPane<NameStyle> implements DesignerBean {
private static final int LEFT_BORDER = 10;
private static final int RIGHT_BORDER = 10;
private DefaultListModel defaultListModel;
private JList styleList;
private ChangeListener changeListener;
@ -65,7 +67,7 @@ public class PredefinedStylePane extends FurtherBasicBeanPane<NameStyle> impleme
styleList.setCellRenderer(render);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(styleList, BorderLayout.CENTER);
this.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
this.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, RIGHT_BORDER));
styleList.addMouseListener(new MouseAdapter() {
@Override

4
designer/src/com/fr/design/present/PresentPane.java

@ -70,25 +70,21 @@ public class PresentPane extends UIComboBoxPane<Present> {
displays.add(none.title4PopupWindow());
dictPresentPane = new DictPresentPane();
dictPresentPane.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(dictPresentPane);
keys.add(DictPresent.class.getName());
displays.add(dictPresentPane.title4PopupWindow());
FurtherBasicBeanPane<BarcodePresent> bar = new BarCodePane();
bar.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(bar);
keys.add(BarcodePresent.class.getName());
displays.add(bar.title4PopupWindow());
FurtherBasicBeanPane<FormulaPresent> formula = new FormulaPresentPane();
formula.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(formula);
keys.add(FormulaPresent.class.getName());
displays.add(formula.title4PopupWindow());
FurtherBasicBeanPane<CurrencyLinePresent> currency = new CurrencyLinePane();
currency.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(currency);
keys.add(CurrencyLinePresent.class.getName());
displays.add(currency.title4PopupWindow());

8
designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java

@ -29,21 +29,19 @@ public class MobileRadioGroupPane extends BasicBeanPane<MobileFitAttrState>{
private void initComponents(String title) {
double p = TableLayout.PREFERRED;
double[] rowSize = {p};
double[] columnSize = {p, p, p, p, p, p};
double[] columnSize = {p, p, p, p, p};
IndexRadioButton defaultRadio = new IndexRadioButton(MobileFitAttrState.DEFAULT.description(), MobileFitAttrState.DEFAULT);
defaultRadio.setSelected(true);
IndexRadioButton horizonRadio = new IndexRadioButton(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL);
horizonRadio.setSelected(true);
IndexRadioButton verticalRadio = new IndexRadioButton(MobileFitAttrState.VERTICAL.description(), MobileFitAttrState.VERTICAL);
IndexRadioButton bidirectionalRadio = new IndexRadioButton(MobileFitAttrState.BIDIRECTIONAL.description(), MobileFitAttrState.BIDIRECTIONAL);
IndexRadioButton notFitRadio = new IndexRadioButton(MobileFitAttrState.NONE.description(), MobileFitAttrState.NONE);
addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio);
addToButtonGroup(horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio);
Component[][] components = new Component[][]{
new Component[] {
new UILabel(title),
defaultRadio,
horizonRadio,
verticalRadio,
bidirectionalRadio,

32
designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java

@ -1,32 +0,0 @@
package com.fr.design.report.mobile;
import com.fr.design.dialog.mobile.MobileUseHtmlGroupBeanPane;
import com.fr.report.mobile.ElementCaseMobileAttr;
/**
* Created by kunsnat on 2016/8/3.
*/
public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<ElementCaseMobileAttr> {
public MobileUseHtmlGroupPane(String annotation) {
super(annotation);
}
@Override
public void populateBean(ElementCaseMobileAttr mobileAttr) {
if(mobileAttr != null) {
selectIndexButton(mobileAttr.isUseHTML() ? 1 : 0);
}
}
@Override
public ElementCaseMobileAttr updateBean() {
return null;
}
@Override
public void updateBean(ElementCaseMobileAttr mobileAttr) {
if(mobileAttr != null) {
mobileAttr.setUseHTML(getSelectRadioIndex() == 1);
}
}
}

6
designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java

@ -15,8 +15,6 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
private AppFitBrowserPane appFitBrowserPane;
private MobileUseHtmlGroupPane htmlGroupPane;
//工具栏容器
private MobileToolBarPane mobileToolBarPane;
@ -34,8 +32,6 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane);
jPanel.add(appFitBrowserPane);
jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-Designer_Mobile_Report_Analysis_Annotation")));
jPanel.add(mobileToolBarPane = new MobileToolBarPane());
jPanel.add(appFitPreviewPane);
@ -50,7 +46,6 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
}
appFitBrowserPane.populateBean(ob);
mobileToolBarPane.populateBean(ob);
htmlGroupPane.populateBean(ob);
}
@ -58,7 +53,6 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
public ElementCaseMobileAttr updateBean() {
ElementCaseMobileAttr caseMobileAttr = appFitBrowserPane.updateBean();
mobileToolBarPane.updateBean(caseMobileAttr);
htmlGroupPane.updateBean(caseMobileAttr);
return caseMobileAttr;
}

4
designer/src/com/fr/grid/GridMouseAdapter.java

@ -6,6 +6,7 @@ import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JSliderPane;
import com.fr.design.present.CellWriteAttrPane;
@ -204,7 +205,6 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
*/
private void showWidetWindow(TemplateCellElement cellElement, TemplateElementCase report) {
// int resolution = ScreenResolution.getScreenResolution();
DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report);
DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report);
double fixed_pos_x = this.oldEvtX - columnWidthList.getRangeValue(grid.getHorizontalValue(), cellElement.getColumn()).toPixD(resolution);
@ -212,7 +212,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
double cell_width = columnWidthList.getRangeValue(cellElement.getColumn(), cellElement.getColumn() + cellElement.getColumnSpan()).toPixD(resolution);
double cell_height = rowHeightList.getRangeValue(cellElement.getRow(), cellElement.getRow() + cellElement.getRowSpan()).toPixD(resolution);
if (fitSizeToShow(cell_width, cell_height, fixed_pos_x, fixed_pos_y)) {
CellWriteAttrPane.showWidgetWindow(grid.getElementCasePane());
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS);
}
}

5
designer/src/com/fr/grid/selection/CellSelection.java

@ -8,6 +8,7 @@ import com.fr.design.actions.cell.GlobalStyleMenuDef.GlobalStyleSelection;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.CopyAction;
import com.fr.design.actions.edit.CutAction;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.actions.edit.PasteAction;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.cell.clipboard.CellElementsClip;
@ -456,11 +457,13 @@ public class CellSelection extends Selection {
}
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()){ //表单中报表块编辑屏蔽掉 控件设置
popup.add(new CellWidgetAttrAction(ePane).createMenuItem());
popup.add(new CellWidgetAttrAction().createMenuItem());
}
popup.add(new CellExpandAttrAction().createMenuItem());
popup.add(DeprecatedActionManager.getPresentMenu(ePane).createJMenu());
popup.add(new CellAttributeAction().createMenuItem());
popup.add(new ConditionAttributesAction().createMenuItem());
popup.add(new HyperlinkAction().createMenuItem());
// cut, copy and paste
popup.addSeparator();
popup.add(new CutAction(ePane).createMenuItem());

7
designer/src/com/fr/grid/selection/FloatSelection.java

@ -9,11 +9,7 @@ import com.fr.base.FRContext;
import com.fr.design.actions.cell.CleanAuthorityAction;
import com.fr.design.actions.cell.FloatStyleAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.CopyAction;
import com.fr.design.actions.edit.CutAction;
import com.fr.design.actions.edit.DeleteAction;
import com.fr.design.actions.edit.EditFloatElementNameAction;
import com.fr.design.actions.edit.PasteAction;
import com.fr.design.actions.edit.*;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.cell.clipboard.CellElementsClip;
import com.fr.design.cell.clipboard.ElementsTransferable;
@ -125,6 +121,7 @@ public class FloatSelection extends Selection {
}
popup.add(DeprecatedActionManager.getCellMenu(ePane).createJMenu());
popup.add(new FloatStyleAction(ePane).createMenuItem());
popup.add(new HyperlinkAction().createMenuItem());
// cut, copy and paste
popup.addSeparator();

5
designer/src/com/fr/poly/creator/ECBlockPane.java

@ -4,6 +4,7 @@
package com.fr.poly.creator;
import com.fr.base.BaseUtils;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.menu.KeySetUtils;
import com.fr.general.Inter;
import com.fr.page.ReportSettingsProvider;
@ -142,12 +143,14 @@ public class ECBlockPane extends PolyElementCasePane {
MenuDef menuDef = new MenuDef(KeySetUtils.CELL.getMenuKeySetName(), KeySetUtils.CELL.getMnemonic());
menuDef.addShortCut(new CellExpandAttrAction());
menuDef.addShortCut(new CellWidgetAttrAction(this));
menuDef.addShortCut(new CellWidgetAttrAction());
menuDef.addShortCut(new GlobalStyleMenuDef(this));
menuDef.addShortCut(new ConditionAttributesAction());
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));
menuDef.addShortCut(new HyperlinkAction());
menuDef.addShortCut(SeparatorDef.DEFAULT);
menuDef.addShortCut(new MergeCellAction(this));
menuDef.addShortCut(new UnmergeCellAction(this));

3
designer/src/com/fr/start/Designer.java

@ -116,6 +116,9 @@ public class Designer extends BaseDesigner {
if (ActionFactory.getChartPreStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartPreStyleAction());
}
if (ActionFactory.getChartMapEditorAction() != null) {
menuDef.addShortCut(ActionFactory.getChartMapEditorAction());
}
}
insertMenu(menuDef, MenuHandler.SERVER);

14
designer_base/src/com/fr/design/actions/core/ActionFactory.java

@ -32,6 +32,8 @@ public class ActionFactory {
private static UpdateAction chartPreStyleAction = null;
private static UpdateAction chartMapEditorAction = null;
/**
* 待说明
*
@ -69,6 +71,18 @@ public class ActionFactory {
return chartPreStyleAction;
}
/**
* 注册图表的 地图资源
* @param action 地图资源action
*/
public static void registerChartMapEditorAction(UpdateAction action) {
chartMapEditorAction = action;
}
public static UpdateAction getChartMapEditorAction() {
return chartMapEditorAction;
}
/**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
*

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

@ -21,6 +21,7 @@ public interface UIConstants {
public static final Icon BLACK_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/blank.gif");
public static final Border CELL_ATTR_ZEROBORDER = BorderFactory.createEmptyBorder(0, 0, 0, 0);
public static final Border CELL_ATTR_EMPTYBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 0);
public static final Border CELL_ATTR_PRESENTBORDER = BorderFactory.createEmptyBorder(0, 5, 0, 0);
public static final Border CELL_ATTR_NORMALBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 15);

30
designer_base/src/com/fr/design/dialog/BasicScrollPane.java

@ -1,23 +1,15 @@
package com.fr.design.dialog;
import java.awt.AWTEvent;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.*;
import java.awt.*;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = -4293765343535336275L;
private static final int MAXVALUE = 100;
@ -119,7 +111,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
/**
* august:不容易啊 还要用笔画图立个方程才计算出来
*
* @param e
* @param
*/
protected void ajustValues() {
doLayout();
@ -170,6 +162,13 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
beginY = value * (preferheight - maxheight) / (MAXVALUE - scrollBar.getVisibleAmount());
}
}
setLeftContentPaneBounds(parent, scrollBar, beginY, maxheight);
leftcontentPane.validate();
}
}
protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) {
int width = parent.getWidth();
int height = parent.getHeight();
if (leftcontentPane.getPreferredSize().height > maxheight) {
@ -178,9 +177,6 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
} else {
leftcontentPane.setBounds(0, 0, width - DET_WIDTH, height);
}
leftcontentPane.validate();
}
}
protected boolean isShowScrollBar() {

112
designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java

@ -1,112 +0,0 @@
package com.fr.design.dialog.mobile;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
* 由于MobileUserHtmlGroupPane 现在在report和form中均会用到会出现重复代码故放入base中
* Created by fanglei on 2016/12/28.
*/
public abstract class MobileUseHtmlGroupBeanPane<T> extends BasicBeanPane<T> {
private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>();
public MobileUseHtmlGroupBeanPane(String annotation) {
initComponents(annotation);
}
private void initComponents(String annotation) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow()));
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, p, p};
UIRadioButton useApp = new UIRadioButton(Inter.getLocText("FR-mobile_native_analysis"));
useApp.setSelected(true);
UIRadioButton useHTML5 = new UIRadioButton(Inter.getLocText("FR-mobile_html_analysis"));
addToButtonGroup(useApp, useHTML5);
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5},
new Component[]{new UILabel(annotation), null, null}
};
JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10));
this.add(usePane);
}
private void addToButtonGroup(UIRadioButton... radios) {
ButtonGroup buttonGroup = new ButtonGroup();
for (UIRadioButton radio : radios) {
radioButtons.add(radio);
buttonGroup.add(radio);
}
}
/**
* 设置按钮状态
*/
public void setEnabled(boolean enabled) {
for (UIRadioButton radioButton : radioButtons) {
radioButton.setEnabled(enabled);
}
}
/**
* 获取当前选中的按钮index
*
* @return 按钮index
*/
public int getSelectRadioIndex() {
for (int i = 0, len = radioButtons.size(); i < len; i++) {
if (radioButtons.get(i).isSelected()) {
return i;
}
}
return 0;
}
/**
* 选中指定index的按钮
*/
public void selectIndexButton(int index) {
if (index < 0 || index > radioButtons.size() - 1) {
return;
}
UIRadioButton button = radioButtons.get(index);
button.setSelected(true);
}
/**
* 给所有的按钮加上监听
*/
public void addActionListener(ActionListener actionListener) {
for (UIRadioButton radioButton : radioButtons) {
radioButton.addActionListener(actionListener);
}
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-mobile_report_analysis");
}
}

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

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

39
designer_base/src/com/fr/design/foldablepane/HeaderPane.java

@ -11,16 +11,17 @@ import java.awt.image.BufferedImage;
*/
public class HeaderPane extends JPanel {
private static final long serialVersionUID = 1L;
private static final int TITLE_X = 9;
private static final int LEFT_X = 221;
private static final int TITLE_X = 5;
private static final int LEFT_X = 16;
private static final int LEFT_Y = 6;
private int headWidth = 280;
private int headHeight = 25;
private static final int NORMAL_FONTSIZE = 12;
private int headWidth;
private int headHeight;
private Color bgColor;
private boolean isShow;
private String title;
private Image image;
private int fontSize = 13;
private int fontSize;
public void setShow(boolean isShow) {
this.isShow = isShow;
@ -56,21 +57,19 @@ public class HeaderPane extends JPanel {
BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = panelImage.createGraphics();
g2d.setColor(UIConstants.COMPONENT_BACKGROUND_COLOR);
headWidth = this.getWidth();
g2d.fillRect(0, 0, headWidth, headHeight);
// g2d.drawImage(UIConstants.DRAG_BAR, 0, 0, headWidth, headHeight, null);
g2d.setFont(new Font("SimSun", 0, fontSize));
g2d.setPaint(bgColor);
// g2d.drawString(this.title, fontSize/2, headHeight-fontSize/3);
g2d.drawString(this.title, TITLE_X, headHeight - fontSize / 2 - 1);
int leftWdith = headWidth - LEFT_X;
if (this.isShow) {
image = UIConstants.DRAG_DOWN_SELECTED_SMALL;
g2d.drawImage(image, LEFT_X, LEFT_Y, null);
g2d.drawImage(image, leftWdith, LEFT_Y, null);
} else {
image = UIConstants.DRAG_LEFT_NORMAL_SMALL;
g2d.drawImage(image, LEFT_X, LEFT_Y , null);
g2d.drawImage(image, leftWdith, LEFT_Y, null);
}
return panelImage;
}
@ -90,21 +89,21 @@ public class HeaderPane extends JPanel {
}
public HeaderPane(Color bgColor, String title, int headWidth, int headHeight) {
public HeaderPane(Color bgColor, String title, int headHeight) {
this(bgColor);
this.title = title;
this.headHeight = headHeight;
this.headWidth = headWidth;
this.fontSize = NORMAL_FONTSIZE;
}
public static void main(String[] args) {
JFrame mainFrame = new JFrame("UI Demo - Gloomyfish");
mainFrame.getContentPane().setLayout(new BorderLayout());
mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 280, 24), BorderLayout.CENTER);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.pack();
mainFrame.setSize(250, 400);
mainFrame.setVisible(true);
// JFrame mainFrame = new JFrame("UI Demo - Gloomyfish");
// mainFrame.getContentPane().setLayout(new BorderLayout());
// mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 24), BorderLayout.CENTER);
// mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// mainFrame.pack();
// mainFrame.setSize(300, 400);
// mainFrame.setVisible(true);
}
}

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

@ -1,18 +1,17 @@
package com.fr.design.foldablepane;
import com.fr.design.constants.UIConstants;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.*;
/**
* Created by MoMeak on 2017/7/5.
*/
public class UIExpandablePane extends JPanel {
private static final int LEFT_BORDER = 5;
private static final long serialVersionUID = 1L;
private HeaderPane headerPanel;
private JPanel contentPanel;
@ -22,8 +21,7 @@ public class UIExpandablePane extends JPanel {
private int headHeight;
public UIExpandablePane(String title,int headWidth,int headHeight,JPanel contentPanel)
{
public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) {
super();
this.title = title;
this.headWidth = headWidth;
@ -32,29 +30,32 @@ public class UIExpandablePane extends JPanel {
initComponents();
}
public UIExpandablePane(String title, int headHeight, JPanel contentPanel) {
super();
this.title = title;
this.headHeight = headHeight;
this.contentPanel = contentPanel;
initComponents();
}
private void initComponents() {
this.setLayout(new BorderLayout());
headerPanel = new HeaderPane(color, title,headWidth,headHeight);
headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction());
contentPanel.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0));
this.add(headerPanel, BorderLayout.NORTH);
this.add(contentPanel, BorderLayout.CENTER);
setOpaque(false);
}
class PanelAction extends MouseAdapter
{
public void mousePressed(MouseEvent e)
{
class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource();
if(contentPanel.isShowing())
{
if (contentPanel.isShowing()) {
contentPanel.setVisible(false);
hp.setShow(false);
}
else
{
} else {
contentPanel.setVisible(true);
hp.setShow(true);
}
@ -64,34 +65,19 @@ public class UIExpandablePane extends JPanel {
}
public static void main(String[] args)
{
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());
//
// JPanel myPanel = new JPanel();
// myPanel.setLayout(new BorderLayout());
// JPanel Panel = new JPanel();
// Panel.setBackground(Color.blue);
// myPanel.add(new UIExpandablePane("基本",280,25,Panel),BorderLayout.CENTER);
//// myPanel.setLayout(new GridBagLayout());
//// myPanel.add(new JExpandablePanel());
//// GridBagConstraints gbc = new GridBagConstraints();
//// JPanel[] panels = new JPanel[4]; //
//// gbc.insets = new Insets(1,3,0,3);
//// gbc.weightx = 1.0;
//// gbc.fill = GridBagConstraints.HORIZONTAL;
//// gbc.gridwidth = GridBagConstraints.REMAINDER;
//// for(int j = 0; j < panels.length; j++)
//// {
//// panels[j] = new JExpandablePanel();
//// myPanel.add(panels[j], gbc);
//// }
// myPanel.add(new UIExpandablePane("基本", 223, 24, Panel), BorderLayout.CENTER);
// content.add(myPanel, BorderLayout.CENTER);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(280, 400);
// jf.setSize(439, 400);
// jf.setVisible(true);
}

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

@ -301,6 +301,12 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
return;
}
}
// 如果有可见模态对话框,则不隐藏
for (Window window : DesignerContext.getDesignerFrame().getOwnedWindows()) {
if (window instanceof JDialog && window.isVisible() && ((JDialog)window).isModal()) {
return;
}
}
saveSettings();
setVisible(false);
}

2
designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java

@ -1,10 +1,10 @@
package com.fr.design.gui.frpane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.dialog.BasicPane;
import javax.swing.*;
import java.awt.*;

4
designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java

@ -2,7 +2,6 @@ package com.fr.design.gui.frpane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.*;
@ -12,7 +11,6 @@ import java.awt.event.ItemListener;
import java.util.List;
/**
*
* @author zhou
* @since 2012-5-31下午12:25:21
*/
@ -98,7 +96,6 @@ public abstract class UIComboBoxPane<T> extends BasicBeanPane<T> {
JPanel northPane = new JPanel(new BorderLayout());
northPane.add(jcb, BorderLayout.CENTER);
this.add(northPane, BorderLayout.NORTH);
northPane.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
this.add(cardPane, BorderLayout.CENTER);
}
@ -128,7 +125,6 @@ public abstract class UIComboBoxPane<T> extends BasicBeanPane<T> {
}
@Override
public T updateBean() {
return cards.get(jcb.getSelectedIndex()).updateBean();

15
designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java

@ -10,6 +10,7 @@ import com.fr.design.constants.UIConstants;
public class UITabGroup extends UIButtonGroup<Integer> {
private boolean isOneLineTab = false;
private boolean isDrawLine = true;
private static final int BUTTON_NUMBER = 5;
private static final int SEVEN_NUMBER = 7;
private static final int ORIGINAL_WIDTH = 10;
@ -50,7 +51,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.LINE_COLOR);
if (!isTwoLine()) {
int width = isDrawLine() ? ORIGINAL_WIDTH : 0;
int width = isDrawLine ? ORIGINAL_WIDTH : 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
@ -58,7 +59,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
if (isDrawLine()) {
if (isDrawLine) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(ORIGINAL_WIDTH, 0, width - ORIGINAL_WIDTH, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
@ -82,7 +83,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
if (isDrawLine()) {
if (isDrawLine) {
g2d.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2);
}
}
@ -127,12 +128,16 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
protected boolean isDrawLine() {
return true;
return isDrawLine;
}
public void setDrawLine(boolean isDrawLine) {
this.isDrawLine = isDrawLine;
}
@Override
protected Border getGroupBorder() {
if (!isDrawLine()) {
if (!isDrawLine) {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
return BorderFactory.createEmptyBorder(1, GAP, 1, GAP);

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

@ -39,7 +39,7 @@ import java.util.Arrays;
*/
public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver {
private static final int ANGEL = 90;
private static final Dimension SPINNER_DIMENSION = new Dimension(60, 20);
private static final Dimension SPINNER_DIMENSION = new Dimension(70, 20);
private static final String[] TEXT = {Inter.getLocText("FR-Designer_StyleAlignment_Wrap_Text"), Inter.getLocText("FR-Designer_StyleAlignment_Single_Line"),
Inter.getLocText("FR-Designer_StyleAlignment_Single_Line(Adjust_Font)"), Inter.getLocText("FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)")};

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

@ -68,7 +68,6 @@ public class FormatPane extends AbstractBasicStylePane {
*/
public FormatPane() {
this.initComponents(TYPES);
this.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
}
protected void initComponents(Integer[] types) {
@ -113,12 +112,7 @@ public class FormatPane extends AbstractBasicStylePane {
centerPane.setBorder(LEFT_BORDER);
frFontPane.setBorder(LEFT_BORDER);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane},
new Component[]{null, centerPane},
new Component[]{fontPane, frFontPane},
};
Component[][] components = getComponent(fontPane, centerPane, typePane);
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
@ -126,6 +120,16 @@ public class FormatPane extends AbstractBasicStylePane {
this.add(panel, BorderLayout.CENTER);
}
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane},
new Component[]{null, centerPane},
new Component[]{fontPane, frFontPane},
};
}
protected UIComboBoxRenderer createComBoxRender() {
return new UIComboBoxRenderer() {
@Override
@ -383,6 +387,10 @@ public class FormatPane extends AbstractBasicStylePane {
};
typeComboBox.setRenderer(render);
typeComboBox.addItemListener(itemListener);
setTypeComboBoxPane(typeComboBox);
}
protected void setTypeComboBoxPane (UIComboBox typeComboBox) {
this.add(typeComboBox, BorderLayout.NORTH);
}

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

@ -39,17 +39,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static final int POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 360;
private static final String KEY_CELL_ELEMENT = "cellElement";
private static final String KEY_CELL_ATTR = "cellAttr";
private static final String KEY_FLOAT_ELEMENT = "floatElement";
private static final String KEY_WIDGET_SETTINGS = "widgetSettings";
private static final String KEY_CONDITION_ATTR = "conditionAttr";
private static final String KEY_HYPERLINK = "hyperlink";
private static final String KEY_WIDGET_LIB = "widgetLib";
private static final String KEY_AUTHORITY_EDITION = "authorityEdition";
private static final String KEY_CONFIGURED_ROLES = "editedRoles";
private static final String DEFAULT_PANE = "defaultPane";
private static final String DEFAULT_AUTHORITY_PANE = "defaultAuthorityPane";
public static final String KEY_CELL_ELEMENT = "cellElement";
public static final String KEY_CELL_ATTR = "cellAttr";
public static final String KEY_FLOAT_ELEMENT = "floatElement";
public static final String KEY_WIDGET_SETTINGS = "widgetSettings";
public static final String KEY_CONDITION_ATTR = "conditionAttr";
public static final String KEY_HYPERLINK = "hyperlink";
public static final String KEY_WIDGET_LIB = "widgetLib";
public static final String KEY_AUTHORITY_EDITION = "authorityEdition";
public static final String KEY_CONFIGURED_ROLES = "editedRoles";
public static final String DEFAULT_PANE = "defaultPane";
public static final String DEFAULT_AUTHORITY_PANE = "defaultAuthorityPane";
private JPanel defaultPane; // "无可用配置项"面板
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
@ -77,7 +77,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public static final EastRegionContainerPane getInstance() {
if (THIS == null) {
THIS = new EastRegionContainerPane();
// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY());
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth());
}
return THIS;
@ -85,13 +84,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane() {
super();
// setVerticalDragEnabled(false);
initPropertyItemList();
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit"));
switchMode(PropertyMode.REPORT);
// initContentPane();
// super(leftPane, rightPane);
setContainerWidth(CONTAINER_WIDTH);
}
@ -230,8 +226,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) {
super(leftPane, rightPane);
// setVerticalDragEnabled(false);
// setContainerWidth(260);
}
public void replaceUpPane(JComponent pane) {
@ -365,6 +359,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap.get(KEY_WIDGET_SETTINGS).removeHeaderPane();
}
public void switchTabTo(String tabName) {
PropertyItem propertyItem = propertyItemMap.get(tabName);
if (propertyItem == null) {
return;
}
if (propertyItem.isVisible() && propertyItem.isEnabled() && !propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, tabName);
propertyItem.setTabButtonSelected();
}
}
/**
* 刷新右面板
*/
@ -377,29 +382,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hasEnabledTab = true;
if (!propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, name); // 显示第一个可用tab
propertyItem.setTabButtonSelected();
hasAvailableTab = true;
break;
}
}
}
if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE);
} else {
propertyCard.show(rightPane, DEFAULT_PANE);
}
}
// if (this.getRightPane() instanceof DockingView) {
// ((DockingView) this.getRightPane()).refreshDockingView();
// }
}
public void refreshDownPane() {
// JComponent pane = propertyItemList.get(1).getContentPane();
// if (pane instanceof DockingView) {
// ((DockingView) pane).refreshDockingView();
// }
}
private void refreshContainer() {
@ -460,7 +459,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.btnIconName = btnIconName;
initButton();
initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes);
}
@ -576,11 +574,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
// private void refreshContainer() {
// propertyPanel.validate();
// propertyPanel.repaint();
// propertyPanel.revalidate();
// }
private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix;
}
@ -594,6 +587,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
public void setTabButtonSelected() {
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
}
private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() {
@ -614,11 +615,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else {
popupFixedPane();
}
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
setTabButtonSelected();
}
});
}
@ -655,7 +652,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框
public void popupDialog() {
// setIsPoppedOut(true);
if (isPoppedOut) {
return;
}
@ -667,15 +663,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.adjustLocation();
popupDialog.setVisible(true);
}
// initContentPane();
// refreshContainer();
removeItem(this);
}
public void popToFrame() {
if (isPoppedOut) {
isPoppedOut = false;
// popupDialog.dispose();
popupDialog.setVisible(false);
initContentPane();
onResize();
@ -892,7 +885,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
// validate();
adjustLocation();
initListener();

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

@ -9,8 +9,25 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.IndependentChartUIProvider;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.chartinterface.*;
import com.fr.design.chartinterface.AreaIndependentChartInterface;
import com.fr.design.chartinterface.BarIndependentChartInterface;
import com.fr.design.chartinterface.BubbleIndependentChartInterface;
import com.fr.design.chartinterface.ColumnIndependentChartInterface;
import com.fr.design.chartinterface.CustomIndependentChartInterface;
import com.fr.design.chartinterface.DonutIndependentChartInterface;
import com.fr.design.chartinterface.FunnelIndependentChartInterface;
import com.fr.design.chartinterface.GanttIndependentChartInterface;
import com.fr.design.chartinterface.GisMapIndependentChartInterface;
import com.fr.design.chartinterface.LineIndependentChartInterface;
import com.fr.design.chartinterface.MapIndependentChartInterface;
import com.fr.design.chartinterface.MeterIndependentChartInterface;
import com.fr.design.chartinterface.PieIndependentChartInterface;
import com.fr.design.chartinterface.RadarIndependentChartInterface;
import com.fr.design.chartinterface.RangeIndependentChartInterface;
import com.fr.design.chartinterface.StockIndependentChartInterface;
import com.fr.design.chartinterface.XYScatterIndependentChartInterface;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -25,20 +42,58 @@ import com.fr.form.ui.ChartEditor;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.area.AreaIndependentVanChartInterface;
import com.fr.plugin.chart.area.VanChartAreaPlot;
import com.fr.plugin.chart.bar.BarIndependentVanChartInterface;
import com.fr.plugin.chart.bubble.BubbleIndependentVanChartInterface;
import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.column.ColumnIndependentVanChartInterface;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.custom.CustomIndependentVanChartInterface;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.drillmap.DrillMapIndependentVanChartInterface;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
import com.fr.plugin.chart.funnel.designer.FunnelIndependentVanChartInterface;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.plugin.chart.gantt.designer.GanttIndependentVanChartInterface;
import com.fr.plugin.chart.gauge.GaugeIndependentVanChartInterface;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot;
import com.fr.plugin.chart.heatmap.designer.HeatMapIndependentVanChartInterface;
import com.fr.plugin.chart.line.LineIndependentVanChartInterface;
import com.fr.plugin.chart.line.VanChartLinePlot;
import com.fr.plugin.chart.map.MapIndependentVanChartInterface;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.pie.PieIndependentVanChartInterface;
import com.fr.plugin.chart.radar.RadarIndependentVanChartInterface;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
import com.fr.plugin.chart.scatter.ScatterIndependentVanChartInterface;
import com.fr.plugin.chart.scatter.VanChartScatterPlot;
import com.fr.plugin.chart.structure.VanChartStructurePlot;
import com.fr.plugin.chart.structure.desinger.StructureIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.TreeMapIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import com.fr.plugin.chart.wordcloud.designer.WordCloudIndependentVanChartInterface;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* Created by eason on 14/12/29.
@ -58,24 +113,18 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
static {
readDefault();
readVanChart();
StableFactory.registerMarkedObject(XML_TAG, classManager);
}
static {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override
public void on(PluginEvent event) {
public void envChanged() {
//重新注册designModuleFactory
DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption());
}
}, new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraChartType);
DesignImageEvent.registerDefaultCallbackEvent(HistoryTemplateListPane.getInstance());
}
});
}
@ -131,6 +180,36 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
}
private static void readVanChart() {
if (chartTypeInterfaces.containsKey(ChartTypeManager.VAN_CHART_PRIORITY)) {
return;
}
CloseableContainedMap<String, IndependentChartUIProvider, LinkedHashMap> chartUIList =
new CloseableContainedMap<String, IndependentChartUIProvider, LinkedHashMap>(LinkedHashMap.class);
chartUIList.put(PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface());
chartUIList.put(VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface());
chartUIList.put(VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface());
chartUIList.put(VanChartLinePlot.VAN_CHART_LINE_PLOT, new LineIndependentVanChartInterface());
chartUIList.put(VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID, new AreaIndependentVanChartInterface());
chartUIList.put(VanChartGaugePlot.VAN_CHART_GAUGE_PLOT, new GaugeIndependentVanChartInterface());
chartUIList.put(VanChartRadarPlot.VAN_CHART_RADAR_PLOT, new RadarIndependentVanChartInterface());
chartUIList.put(VanChartScatterPlot.VAN_CHART_SCATTER_PLOT_ID, new ScatterIndependentVanChartInterface());
chartUIList.put(VanChartBubblePlot.VAN_CHART_BUBBLE_PLOT_ID, new BubbleIndependentVanChartInterface());
chartUIList.put(VanChartCustomPlot.VAN_CHART_CUSTOM_PLOT_ID, new CustomIndependentVanChartInterface());
chartUIList.put(VanChartMultiPiePlot.VAN_CHART_MULTILAYER_PLOT_ID, new MultiPieIndependentVanChartInterface());
chartUIList.put(VanChartMapPlot.VAN_CHART_MAP_ID, new MapIndependentVanChartInterface());
chartUIList.put(VanChartDrillMapPlot.VAN_CHART_DRILL_MAP_ID, new DrillMapIndependentVanChartInterface());
chartUIList.put(VanChartTreeMapPlot.VAN_CHART_TREE_MAP_PLOT_ID, new TreeMapIndependentVanChartInterface());
chartUIList.put(VanChartFunnelPlot.VAN_CHART_FUNNEL_PLOT_ID, new FunnelIndependentVanChartInterface());
chartUIList.put(VanChartHeatMapPlot.VAN_CHART_HEAT_MAP_ID, new HeatMapIndependentVanChartInterface());
chartUIList.put(VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface());
chartUIList.put(VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
chartUIList.put(VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface());
chartTypeInterfaces.put(ChartTypeManager.VAN_CHART_PRIORITY, chartUIList);
}
private static void readDefault() {

2
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -81,7 +81,7 @@ public class MinMaxValuePane extends JPanel {
};
}
private void checkBoxUse() {
protected void checkBoxUse() {
minValueField.setEnabled(minCheckBox.isSelected());
maxValueField.setEnabled(maxCheckBox.isSelected());

BIN
designer_chart/src/com/fr/design/images/form/toolbar/area.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/bar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/bubble.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/column.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/drillmap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/funnel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/gantt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/gauge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/heatmap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/line.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/multiPie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/pie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/radar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/scatter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/structure.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
designer_chart/src/com/fr/design/images/form/toolbar/treeMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/wordcloud.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_Drill_Map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewBubble.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewCustom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewFunnel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGantt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGauge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewHeatMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewRadar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewScatter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

9
designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java

@ -4,6 +4,9 @@ package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import javax.swing.*;
import java.awt.*;
public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
public abstract void populate(ChartCollection collection);
@ -25,6 +28,12 @@ public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
}
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
/**
* 刷新图表数据界面
* @param collection 图表收集器

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

@ -1,7 +1,6 @@
package com.fr.design.mainframe.chart;
import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
@ -74,12 +73,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
//构建主面板
protected void createTabsPane() {
Icon[] iconArray = new Icon[paneList.size()];
String[] iconArray = new String[paneList.size()];
card = new CardLayout();
center = new JPanel(card);
for (int i = 0; i < paneList.size(); i++) {
AbstractChartAttrPane pane = paneList.get(i);
iconArray[i] = BaseUtils.readIcon(pane.getIconPath());
iconArray[i] = pane.title4PopupWindow();
center.add(pane, pane.title4PopupWindow());
}

44
designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -4,9 +4,9 @@ package com.fr.design.mainframe.chart.gui;
* Created by hufan on 2016/10/20.
*/
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
@ -15,6 +15,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
@ -55,11 +56,9 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style") + ":"),configStyleButton},
new Component[]{null, null},
new Component[]{new JSeparator(), null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style")),configStyleButton},
new Component[]{configPane, null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -84,6 +83,8 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
panel.add(buttonConfigPane, "button");
panel.add(carouselConfigPane, "carousel");
panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
return panel;
}
@ -92,35 +93,33 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p};
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
Component[][] components = new Component[][]{
new Component[]{createTimeIntervalPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createCarouseBackgroundColorPane(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval},
new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
}
private Component createTimeIntervalPane() {
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Time_Interval") + ":", timeInterval);
}
private JPanel createCarouseBackgroundColorPane() {
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4carousel);
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
private JPanel createTitleStylePane(){
styleAttrPane = new ChartTextAttrPane();
styleAttrPane = new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
};
}
};
styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight()));
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style")+":", styleAttrPane);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character")+":", styleAttrPane);
}
private JPanel createButtonBackgroundColorPane(){
colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4button);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background") + ":", colorSelectBox4button);
}
private JPanel createButtonConfigPane() {
@ -130,7 +129,6 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitleStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createButtonBackgroundColorPane(),null},
};

10
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

@ -97,6 +97,12 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
customPane.setPreferredSize(new Dimension(200, 130));
colorGradient.setPreferredSize(new Dimension(120, 30));
this.setLayout(new BorderLayout());
this.add(getContentPane(),BorderLayout.CENTER);
}
protected JPanel getContentPane () {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { f };
@ -105,9 +111,7 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
new Component[]{styleSelectBox},
new Component[]{customPane}
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ColorMatch"},components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
return TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ColorMatch"},components,rowSize,columnSize);
}
@Override

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

@ -1,25 +1,23 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JPanel;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.dialog.BasicPane;
import com.fr.general.FRFont;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L;
@ -147,17 +145,23 @@ public class ChartTextAttrPane extends BasicPane {
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
double[] columnSize = {p,f};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
populate(FRFont.getInstance());
}
protected Component[][] getComponents(JPanel buttonPane) {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return new Component[][]{
new Component[]{null, null},
new Component[]{text, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
}

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

@ -1,24 +1,18 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.util.List;
import javax.swing.JPanel;
import javax.swing.border.Border;
import com.fr.chart.chartattr.Plot;
import com.fr.design.constants.UIConstants;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;
import java.util.List;
public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = 2298609199400393886L;
@ -114,8 +108,8 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
protected static class NamePane {
private String name;
private AbstractChartTabPane pane;
public NamePane(String name, AbstractChartTabPane pane) {
private BasicScrollPane pane;
public NamePane(String name, BasicScrollPane pane) {
this.name = name;
this.pane = pane;
}
@ -125,10 +119,10 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
public void setName(String name) {
this.name = name;
}
public AbstractChartTabPane getPane() {
public BasicScrollPane getPane() {
return pane;
}
public void setPane(AbstractChartTabPane pane) {
public void setPane(BasicScrollPane pane) {
this.pane = pane;
}

19
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java

@ -32,27 +32,31 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
this.parentPane = parent;
fillStylePane = getFillStylePane();
this.setLayout(new BorderLayout());
this.add(getContentPane(custom), BorderLayout.CENTER);
}
protected JPanel getContentPane(boolean custom) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[3][1];
JPanel panel;
if (custom) {
if (!(plot instanceof Bar2DPlot)) {
components[0] = new Component[]{getContentInPlotType()};
components[1] = new Component[]{new JSeparator()};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(panel);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.setLayout(new BorderLayout());
this.add(scrollPane, BorderLayout.CENTER);
} else {
if (fillStylePane != null) {
components[0] = new Component[]{fillStylePane};
@ -64,10 +68,11 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
components[2] = new Component[]{contentPane};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15));
return panel;
}
/**

4
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java

@ -3,9 +3,9 @@ package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.chart.chartattr.Chart;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*;
import java.awt.*;
@ -15,7 +15,7 @@ import java.awt.*;
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-1-5 上午10:31:50
*/
public class ChartSeriesPane extends BasicScrollPane<Chart>{
public class ChartSeriesPane extends AbstractVanChartScrollPane<Chart> {
protected AbstractPlotSeriesPane seriesStyleContentPane;
protected Chart chart;

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

@ -1,27 +1,11 @@
package com.fr.design.mainframe.chart.gui.style.series;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.Formula;
import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.chartglyph.MapHotAreaColor;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -31,12 +15,20 @@ import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10;
@ -105,11 +97,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = createComponents();
upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
upControlPane = TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
this.textFieldList = this.getTextFieldList();
this.textGroup = new TextFieldGroupPane();
@ -122,6 +113,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
refreshGroupPane(colors, getValueArray(number));
}
protected double[] getRowSIze () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
}
protected UIButtonGroup<Integer> getDesignTypeButtonGroup(){
return designTypeButtonGroup;
}

3
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java

@ -10,6 +10,7 @@ import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.ConfigHelper;
/**
* 散点图 属性表 系列界面.
@ -57,7 +58,7 @@ public class XYScatterSeriesPane extends LineSeriesPane {
attrList.remove(attr);
}
if(!ComparatorUtils.equals(markerPane.getSelectedMarkder().getMarkerType(), Marker.NULL_M)){
if(!ComparatorUtils.equals(markerPane.getSelectedMarkder().getMarkerType(), ConfigHelper.NULL_M)){
attrList.addDataSeriesCondition(new AttrMarkerType(markerPane.getSelectedMarkder().getMarkerType()));
}
}

93
designer_chart/src/com/fr/design/module/ChartDesignerModule.java

@ -1 +1,92 @@
package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App<?>[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if (ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } }
package com.fr.design.module;
import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.ChartDialog;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.App;
import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.form.ui.ChartEditor;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.map.server.ChartMapEditorAction;
import com.fr.stable.ArrayUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 7.0.3
* Date: 13-7-8
* Time: 上午9:13
*/
public class ChartDesignerModule extends DesignModule {
public void start() {
super.start();
dealBeforeRegister();
register();
registerFloatEditor();
}
protected void dealBeforeRegister(){
StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class);
StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class);
}
private void register(){
DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup());
DesignModuleFactory.registerChartEditorClass(ChartEditor.class);
DesignModuleFactory.registerChartComponentClass(ChartComponent.class);
DesignModuleFactory.registerChartDialogClass(ChartDialog.class);
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class);
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction());
}
protected void registerFloatEditor() {
ActionFactory.registerChartCollection(ChartCollection.class);
}
/**
* 返回设计器能打开的模板类型的一个数组列表
*
* @return 可以打开的模板类型的数组
*/
public App<?>[] apps4TemplateOpener() {
return new App[0];
}
protected WidgetOption[] options4Show() {
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
for (int i = 0; i < typeName.length; i++) {
String plotID = typeName[i].getPlotID();
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
if (ArrayUtils.isEmpty(rowChart)) {
continue;
}
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID);
Icon icon = IOUtils.readIcon(iconPath);
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]);
}
return child;
}
public String getInterNationalName() {
return Inter.getLocText("FR-Chart-Design_ChartModule");
}
}

40
designer_chart/src/com/fr/plugin/chart/area/AreaIndependentVanChartInterface.java

@ -0,0 +1,40 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI;
/**
* Created by Mitisky on 15/11/18.
*/
public class AreaIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI {
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/area.png";
}
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartAreaPlotPane();
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartAreaConditionPane(plot);
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartAreaSeriesPane(parent, plot);
}
/**
* plot面板的标题
* 插件兼容
*/
public String getPlotTypeTitle4PopupWindow(){
return VanChartAreaPlotPane.TITLE;
}
}

96
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaConditionPane.java

@ -0,0 +1,96 @@
package com.fr.plugin.chart.area;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Plot;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.plugin.chart.attr.EffectHelper;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.base.AttrDataSheet;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.other.condition.item.VanChartAreaFillColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartDataSheetContentPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLineTypeConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartMarkerConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTrendLineConditionPane;
import com.fr.plugin.chart.glyph.VanChartMultiCategoryDataPoint;
import com.fr.plugin.chart.scatter.large.VanChartLargeModelMarkerConditionPane;
import java.awt.*;
/**
* Created by Mitisky on 15/11/18.
*/
public class VanChartAreaConditionPane extends DataSeriesConditionPane {
private static final long serialVersionUID = -7180705321732069806L;
public VanChartAreaConditionPane(Plot plot) {
super(plot);
}
protected void initComponents() {
super.initComponents();
//添加全部条件属性后被遮挡
liteConditionPane.setPreferredSize(new Dimension(300, 400));
}
@Override
protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this));
classPaneMap.put(AttrAreaSeriesFillColorBackground.class, new VanChartAreaFillColorConditionPane(this, plot));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPane(this));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
//是否使用数据表
if (plot.getDataSheet().isVisible()) {
classPaneMap.put(AttrDataSheet.class, new VanChartDataSheetContentPane(this, plot));
}
if(PlotFactory.largeDataModel(plot)){
classPaneMap.put(VanChartAttrMarker.class, new VanChartLargeModelMarkerConditionPane(this));
} else {
classPaneMap.put(VanChartAttrMarker.class, new VanChartMarkerConditionPane(this));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getAreaPlotDefaultEffect()));
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot));
}
}
protected void addStyleAction() {
}
@Override
protected ChartConditionPane createListConditionPane() {
return new ChartConditionPane(){
@Override
public String[] columns2Populate() {
return new String[]{
ChartConstants.CATEGORY_INDEX,
ChartConstants.CATEGORY_NAME,
ChartConstants.SERIES_INDEX,
ChartConstants.SERIES_NAME,
ChartConstants.VALUE,
VanChartMultiCategoryDataPoint.CATEGORY_ARRAY,
};
}
};
}
/**
* 返回图表class对象
* @return class对象
*/
public Class<? extends Plot> class4Correspond() {
return VanChartAreaPlot.class;
}
}

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

@ -0,0 +1,95 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/**
* Created by Mitisky on 15/11/18.
*/
public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewArea");
private static final long serialVersionUID = -8161581682558781651L;
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/area/images/area.png",
"/com/fr/plugin/chart/area/images/stack.png",
"/com/fr/plugin/chart/area/images/percentStack.png",
"/com/fr/plugin/chart/area/images/custom.png",
};
}
@Override
protected String[] getTypeTipName() {
String area = Inter.getLocText("FR-Chart-Type_Area");
String stack = Inter.getLocText("FR-Chart-Type_Stacked");
String percent = Inter.getLocText("FR-Chart-Use_Percent");
return new String[]{
area,
stack + area,
percent + stack + area,
Inter.getLocText("FR-Chart-Mode_Custom")
};
}
/**
* 返回界面标题
* @return 界面标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewArea");
}
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartAreaPlot) {
lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/**
* 获取各图表类型界面ID, 本质是plotID
*
* @return 图表类型界面ID
*/
@Override
protected String getPlotTypeID() {
return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
VanChartAreaPlot newPlot = null;
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes;
for(int i = 0, len = areaChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartAreaPlot)areaChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In AreaChart");
}
return cloned;
}
public Chart getDefaultChart() {
return AreaIndependentVanChart.AreaVanChartTypes[0];
}
}

46
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java

@ -0,0 +1,46 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.plugin.chart.line.VanChartLineSeriesPane;
import javax.swing.*;
import java.awt.*;
public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{
private static final long serialVersionUID = 5497989595104913025L;
public VanChartAreaSeriesPane(ChartStylePane parent, Plot plot){
super(parent, plot);
}
protected JPanel getContentInPlotType(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{getColorPane()},
new Component[]{createLineTypePane()},
new Component[]{createMarkerPane()},
new Component[]{createAreaFillColorPane()},
new Component[]{createStackedAndAxisPane()},
new Component[]{createLargeDataModelPane()},
new Component[]{createTrendLinePane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
return contentPane;
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class;
}
}

BIN
designer_chart/src/com/fr/plugin/chart/area/images/area.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
designer_chart/src/com/fr/plugin/chart/area/images/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

BIN
designer_chart/src/com/fr/plugin/chart/area/images/percentStack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

BIN
designer_chart/src/com/fr/plugin/chart/area/images/stack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

56
designer_chart/src/com/fr/plugin/chart/bar/BarIndependentVanChartInterface.java

@ -0,0 +1,56 @@
package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.column.VanChartColumnConditionPane;
import com.fr.plugin.chart.column.VanChartColumnSeriesPane;
import com.fr.plugin.chart.designer.other.VanChartOtherPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI;
/**
* Created by Mitisky on 15/10/20.
*/
public class BarIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI {
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/bar.png";
}
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartBarPlotPane();
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartColumnConditionPane(plot);
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartColumnSeriesPane(parent, plot);
}
/**
* 图表的属性界面数组
* @return 属性界面
*/
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){
VanChartStylePane stylePane = new VanChartBarStylePane(listener);
VanChartOtherPane otherPane = new VanChartOtherPane();
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
/**
* plot面板的标题
* 插件兼容
*/
public String getPlotTypeTitle4PopupWindow(){
return VanChartBarPlotPane.TITLE;
}
}

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

@ -0,0 +1,96 @@
package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/**
* Created by Mitisky on 15/10/20.
*/
public class VanChartBarPlotPane extends AbstractVanChartTypePane {
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewBar");
private static final long serialVersionUID = 2879689884048643002L;
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/bar/images/bar.png",
"/com/fr/plugin/chart/bar/images/stack.png",
"/com/fr/plugin/chart/bar/images/percentstack.png",
"/com/fr/plugin/chart/bar/images/custom.png",
};
}
@Override
protected String[] getTypeTipName() {
String bar = Inter.getLocText("FR-Chart-Type_Bar");
String stack = Inter.getLocText("FR-Chart-Type_Stacked");
String percent = Inter.getLocText("FR-Chart-Use_Percent");
return new String[]{
bar,
stack + bar,
percent + stack + bar,
Inter.getLocText("FR-Chart-Mode_Custom")
};
}
/**
* 返回界面标题
* @return 界面标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewBar");
}
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/**
* 获取各图表类型界面ID, 本质是plotID
*
* @return 图表类型界面ID
*/
@Override
protected String getPlotTypeID() {
return VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
VanChartColumnPlot newPlot = null;
Chart[] barChart = BarIndependentVanChart.BarVanChartTypes;
for(int i = 0, len = barChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartColumnPlot)barChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In ColumnChart");
}
return cloned;
}
public Chart getDefaultChart() {
return BarIndependentVanChart.BarVanChartTypes[0];
}
}

23
designer_chart/src/com/fr/plugin/chart/bar/VanChartBarStylePane.java

@ -0,0 +1,23 @@
package com.fr.plugin.chart.bar;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.axis.bar.VanChartBarAxisPane;
import java.util.List;
/**
* Created by Mitisky on 16/6/8.
*/
public class VanChartBarStylePane extends VanChartStylePane {
public VanChartBarStylePane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected void createVanChartAxisPane(List<BasicPane> paneList, VanChartAxisPlot plot) {
paneList.add(new VanChartBarAxisPane(plot, VanChartBarStylePane.this));
}
}

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/bar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/percentstack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/stack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

85
designer_chart/src/com/fr/plugin/chart/bubble/BubbleIndependentVanChartInterface.java

@ -0,0 +1,85 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.plugin.chart.designer.other.VanChartOtherPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.vanchart.AbstractIndependentVanChartUI;
/**
* Created by Mitisky on 16/3/31.
*/
public class BubbleIndependentVanChartInterface extends AbstractIndependentVanChartUI {
/**
* 图表的类型定义界面类型就是属性表的第一个界面
*
* @return 图表的类型定义界面类型
*/
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartBubblePlotPane();
}
/**
* 图标路径
*
* @return 图标路径
*/
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/bubble.png";
}
@Override
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartBubbleSeriesPane(parent, plot);
}
@Override
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){
if(((VanChartBubblePlot) plot).isForceBubble()){
return super.getTableDataSourcePane(plot, parent);
}
return new VanChartBubblePlotTableDataContentPane(parent);
}
@Override
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){
if(((VanChartBubblePlot) plot).isForceBubble()){
return super.getReportDataSourcePane(plot, parent);
}
return new BubblePlotReportDataContentPane(parent);
}
/**
* 图表的属性界面数组
* @return 属性界面
*/
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){
VanChartStylePane stylePane = new VanChartBubbleStylePane(listener);
VanChartOtherPane otherPane = new VanChartOtherPane(){
protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartBubbleInteractivePane();
}
};
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartBubbleConditionPane(plot);
}
public String getPlotTypeTitle4PopupWindow(){
return VanChartBubblePlotPane.TITLE;
}
}

94
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionPane.java

@ -0,0 +1,94 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.chartattr.Plot;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.design.chart.series.SeriesCondition.LabelAlphaPane;
import com.fr.plugin.chart.attr.EffectHelper;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.bubble.attr.VanChartAttrBubble;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.other.condition.item.VanChartBubbleSetConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltip;
import com.fr.plugin.chart.scatter.component.label.VanChartScatterLabelConditionPane;
import com.fr.plugin.chart.scatter.component.tooltip.VanChartScatterTooltipConditionPane;
import java.awt.*;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubbleConditionPane extends DataSeriesConditionPane {
private static final long serialVersionUID = -7180705321732069806L;
public VanChartBubbleConditionPane(Plot plot) {
super(plot);
}
protected void initComponents() {
super.initComponents();
//添加全部条件属性后被遮挡
liteConditionPane.setPreferredSize(new Dimension(300, 400));
}
private boolean forceBubble() {
return plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble();
}
@Override
protected ChartConditionPane createListConditionPane() {
return forceBubble() ? new ChartConditionPane() : new VanChartBubbleConditionSelectionPane();
}
@Override
protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrBubble.class, new VanChartBubbleSetConditionPane(this));
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));
if(forceBubble()){
addForceAction();
} else if(PlotFactory.largeDataModel(plot)){
addLargeAction();
} else {
addNormalAction();
}
}
private void addNormalAction() {
classPaneMap.put(ScatterAttrLabel.class, new VanChartScatterLabelConditionPane(this, plot));
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect()));
}
private void addForceAction() {
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect()));
}
private void addLargeAction() {
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot));
}
protected void addStyleAction() {
}
/**
* 返回图表class对象
* @return class对象
*/
public Class<? extends Plot> class4Correspond() {
return VanChartBubblePlot.class;
}
}

22
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionSelectionPane.java

@ -0,0 +1,22 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.base.ChartConstants;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.plugin.chart.scatter.VanChartScatterDataPoint;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubbleConditionSelectionPane extends ChartConditionPane {
public String[] columns2Populate() {
return new String[]{
ChartConstants.SERIES_INDEX,
ChartConstants.SERIES_NAME,
VanChartScatterDataPoint.X,
VanChartScatterDataPoint.Y,
ChartConstants.VALUE
};
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save