Browse Source

Merge remote-tracking branch 'origin/release/10.0' into feature/10.0

research/10.0
richie 6 years ago
parent
commit
f287320ed0
  1. 2
      designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java
  3. 2
      designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java
  4. 2
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java
  5. 2
      designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java
  6. 2
      designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java
  7. 11
      designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java
  8. 11
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RecordableTextAction.java
  9. 60
      designer-base/src/main/java/com/fr/design/gui/syntax/util/RTextAreaActionI18nMappingUtil.java
  10. 43
      designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java
  11. 2
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  12. 0
      designer-base/src/main/resources/com/fr/design/images/bbs/solution.png
  13. 8
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  14. 9
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  15. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java
  16. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartsEditPane.java
  17. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  18. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  19. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java
  20. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java
  21. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java
  22. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java
  23. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java
  24. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java
  25. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java
  26. 16
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java
  27. 16
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java
  28. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java
  29. 19
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java
  30. 28
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java
  31. 28
      designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedStylePane.java
  32. 44
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java
  33. 9
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java
  34. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  35. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java
  36. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java
  37. 170
      designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java
  38. 142
      designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java
  39. 50
      designer-realize/src/main/java/com/fr/poly/PolyDesigner.java
  40. 2
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

2
designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java

@ -21,7 +21,7 @@ public class TechSolutionAction extends UpdateAction{
this.setMenuKeySet(TSO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images//bbs/solotion.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/solution.png"));
}

2
designer-base/src/main/java/com/fr/design/data/datapane/TableDataCreatorProducer.java

@ -69,7 +69,7 @@ public class TableDataCreatorProducer {
}
public TableDataNameObjectCreator[] createServerTableDataCreator() {
TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Database_Query"), "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class,
TableDataNameObjectCreator dataBase = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Database_Query"), "/com/fr/design/images/data/dock/serverdatabase.png", DBTableData.class,
DBTableDataPane.class);
TableDataNameObjectCreator ds_Class = new TableDataNameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Type_Class"), "/com/fr/design/images/data/dock/serverclasstabledata.png", ClassTableData.class,
ClassTableDataPane.class);

2
designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java

@ -42,7 +42,7 @@ public class InstallFromDiskCallback extends AbstractPluginTaskCallback {
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Dependence")),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Install_Dependence"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,

2
designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java

@ -30,7 +30,7 @@ public class UninstallPluginCallback extends AbstractPluginTaskCallback {
}else if (result.errorCode() == PluginErrorCode.NeedUninstallDependingPluginFirst) {
int rv = JOptionPane.showOptionDialog(
null,
com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Dependence")),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Delete_Dependence"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,

2
designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java

@ -42,7 +42,7 @@ public class UpdateFromDiskCallback extends AbstractPluginTaskCallback {
} else if (result.errorCode() == PluginErrorCode.NeedDealWithPluginDependency) {
int rv = JOptionPane.showOptionDialog(
null,
com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence")),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Update_Dependence"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Warning"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,

2
designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java

@ -36,7 +36,7 @@ public class UpdateOnlineCallback implements ProgressCallback {
} else if (result.errorCode() == PluginErrorCode.OperationNotSupport) {
int rv = JOptionPane.showOptionDialog(
null,
com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Install_Dependence")),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Install_Dependence"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Plugin_Install_Success"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE,

11
designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java

@ -3,13 +3,13 @@
*/
package com.fr.design.gui.icombobox;
import java.awt.Component;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.util.function.DataFunction;
import com.fr.design.utils.gui.FunctionClassMappingUtils;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JList;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.util.function.DataFunction;
import java.awt.Component;
/**
* DataFunction combobox.
@ -60,7 +60,8 @@ public class FunctionComboBox extends UIComboBox {
if (value instanceof DataFunction) {
DataFunction function = (DataFunction) value;
this.setText(" " + DataCoreUtils.getFunctionDisplayName(function));
String functionBriefName = DataCoreUtils.getFunctionBriefName(function);
this.setText(com.fr.design.i18n.Toolkit.i18nText(FunctionClassMappingUtils.getLocaleKey(functionBriefName)));
}
return this;

11
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RecordableTextAction.java

@ -11,13 +11,14 @@ package com.fr.design.gui.syntax.ui.rtextarea;
import java.awt.event.ActionEvent;
import java.util.ResourceBundle;
import com.fr.design.gui.syntax.util.RTextAreaActionI18nMappingUtil;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import javax.swing.text.DefaultEditorKit;
import javax.swing.text.JTextComponent;
import javax.swing.text.TextAction;
import java.awt.event.ActionEvent;
/**
@ -258,9 +259,9 @@ public abstract class RecordableTextAction extends TextAction {
* property.
*/
public void setProperties(String keyRoot) {
setName(com.fr.design.i18n.Toolkit.i18nText(keyRoot + ".Name"));
setMnemonic(com.fr.design.i18n.Toolkit.i18nText(keyRoot + ".Mnemonic").charAt(0));
setShortDescription(com.fr.design.i18n.Toolkit.i18nText(keyRoot + ".Desc"));
setName(com.fr.design.i18n.Toolkit.i18nText(RTextAreaActionI18nMappingUtil.getActionName(keyRoot)));
setMnemonic(com.fr.design.i18n.Toolkit.i18nText(RTextAreaActionI18nMappingUtil.getActionMnemonic(keyRoot)).charAt(0));
setShortDescription(com.fr.design.i18n.Toolkit.i18nText(RTextAreaActionI18nMappingUtil.getActionDesc(keyRoot)));
}

60
designer-base/src/main/java/com/fr/design/gui/syntax/util/RTextAreaActionI18nMappingUtil.java

@ -0,0 +1,60 @@
package com.fr.design.gui.syntax.util;
import com.fr.stable.StringUtils;
/**
* @author Harrison
* @date 2018/08/29
* @description: RTextArea 类中的 Action.xxx 准备的国际化匹配文件
**/
public enum RTextAreaActionI18nMappingUtil {
Action_CollapseAllFolds("Action.CollapseAllFolds","Fine-Design_Basic_Action_CollapseAllFolds_Name","Fine-Design_Basic_Action_CollapseAllFolds_Mnemonic","Fine-Design_Basic_Action_CollapseAllFolds_Desc"),
Action_CollapseCommentFolds("Action.CollapseCommentFolds","Fine-Design_Basic_Action_CollapseCommentFolds_Name","Fine-Design_Basic_Action_CollapseCommentFolds_Mnemonic","Fine-Design_Basic_Action_CollapseCommentFolds_Desc"),
Action_Copy("Action.Copy","Fine-Design_Basic_Action_Copy_Name","Fine-Design_Basic_Action_Copy_Mnemonic","Fine-Design_Basic_Action_Copy_Desc"),
Action_Cut("Action.Cut","Fine-Design_Basic_Action_Cut_Name","Fine-Design_Basic_Action_Cut_Mnemonic","Fine-Design_Basic_Action_Cut_Desc"),
Action_Delete("Action.Delete","Fine-Design_Basic_Action_Delete_Name","Fine-Design_Basic_Action_Delete_Mnemonic","Fine-Design_Basic_Action_Delete_Desc"),
Action_ExpandAllFolds("Action.ExpandAllFolds","Fine-Design_Basic_Action_ExpandAllFolds_Name","Fine-Design_Basic_Action_ExpandAllFolds_Mnemonic","Fine-Design_Basic_Action_ExpandAllFolds_Desc"),
Action_Paste("Action.Paste","Fine-Design_Basic_Action_Paste_Name","Fine-Design_Basic_Action_Paste_Mnemonic","Fine-Design_Basic_Action_Paste_Desc"),
Action_Redo("Action.Redo","Fine-Design_Basic_Action_Redo_Name","Fine-Design_Basic_Action_Redo_Mnemonic","Fine-Design_Basic_Action_Redo_Desc"),
Action_SelectAll("Action.SelectAll","Fine-Design_Basic_Action_SelectAll_Name","Fine-Design_Basic_Action_SelectAll_Mnemonic","Fine-Design_Basic_Action_SelectAll_Desc"),
Action_ToggleCurrentFold("Action.ToggleCurrentFold","Fine-Design_Basic_Action_ToggleCurrentFold_Name","Fine-Design_Basic_Action_ToggleCurrentFold_Mnemonic","Fine-Design_Basic_Action_ToggleCurrentFold_Desc"),
Action_Undo("Action.Undo","Fine-Design_Basic_Action_Undo_Name","Fine-Design_Basic_Action_Undo_Mnemonic","Fine-Design_Basic_Action_Undo_Desc");
private String actionRawKey;
private String actionName;
private String actionMnemonic;
private String actionDesc;
RTextAreaActionI18nMappingUtil(String actionRawKey, String actionName, String actionMnemonic, String actionDesc) {
this.actionRawKey = actionRawKey;
this.actionName = actionName;
this.actionMnemonic = actionMnemonic;
this.actionDesc = actionDesc;
}
public static String getActionName(String actionKey) {
for (RTextAreaActionI18nMappingUtil mapping: RTextAreaActionI18nMappingUtil.values()) {
if (StringUtils.equals(mapping.actionRawKey, actionKey)) {
return mapping.actionName;
}
}
return actionKey;
}
public static String getActionMnemonic(String actionKey) {
for (RTextAreaActionI18nMappingUtil mapping: RTextAreaActionI18nMappingUtil.values()) {
if (StringUtils.equals(mapping.actionRawKey, actionKey)) {
return mapping.actionMnemonic;
}
}
return actionKey;
}
public static String getActionDesc(String actionKey) {
for (RTextAreaActionI18nMappingUtil mapping: RTextAreaActionI18nMappingUtil.values()) {
if (StringUtils.equals(mapping.actionRawKey, actionKey)) {
return mapping.actionDesc;
}
}
return actionKey;
}
}

43
designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java

@ -0,0 +1,43 @@
package com.fr.design.utils.gui;
import com.fr.stable.StringUtils;
/**
* @author Harrison
* @date 2018/08/28
* @description: Function 类的名字做匹配, 从而方便国际化的类
**/
public enum FunctionClassMappingUtils {
DataFunction_Sum("Sum", "Fine-Design_DataFunction_Sum"),
DataFunction_Average("Average","Fine-Design_DataFunction_Average"),
DataFunction_Max("Max","Fine-Design_DataFunction_Max"),
DataFunction_Min("Min","Fine-Design_DataFunction_Min"),
DataFunction_Count("Count","Fine-Design_DataFunction_Count"),
DataFunction_None("None","Fine-Design_DataFunction_None");
private final String functionClassName;
private final String localeKey;
FunctionClassMappingUtils(String functionClassName, String localeKey) {
this.functionClassName = functionClassName;
this.localeKey = localeKey;
}
public String getFunctionClassName() {
return functionClassName;
}
public String getLocaleKey() {
return localeKey;
}
public static String getLocaleKey(String functionClassName) {
for (FunctionClassMappingUtils value : FunctionClassMappingUtils.values()) {
if (StringUtils.equals(value.getFunctionClassName(), functionClassName)) {
return value.getLocaleKey();
}
}
return functionClassName;
}
}

2
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -108,7 +108,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private static final String[] DML_CONFIG_TYPES = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Smart_Submit"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Delete_Submit"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Smart_Submit"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Insert_Submit"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Update_Submit")};
/**

0
designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png → designer-base/src/main/resources/com/fr/design/images/bbs/solution.png

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

8
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -278,6 +278,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
return name;
}
public String getTitle4PopupWindow(String plotID) {
IndependentChartUIProvider provider = getChartTypeInterface(plotID);
if (provider != null) {
return provider.getPlotTypeTitle4PopupWindow();
}
return StringUtils.EMPTY;
}
/**
* 获取指定图表的标题

9
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -21,7 +21,6 @@ import com.fr.design.mainframe.chart.gui.ChartTypePane;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -154,7 +153,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
this.isDefaultPane = true;
}else{
ChartDataPane chartDataPane = createChartDataPane(plotID);
paneList.add(chartDataPane);
if (chartDataPane != null) {
paneList.add(chartDataPane);
}
AbstractChartAttrPane[] otherPaneList = ChartTypeInterfaceManager.getInstance().getAttrPaneArray(plotID, listener);
for(int i = 0; i < otherPaneList.length; i++){
otherPaneList[i].addAttributeChangeListener(listener);
@ -169,7 +170,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
protected ChartDataPane createChartDataPane(String plotID) {
ChartDataPane chartDataPane = ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener);
chartDataPane.setSupportCellData(dataPane4SupportCell.isSupportCellData());
if (chartDataPane != null) {
chartDataPane.setSupportCellData(dataPane4SupportCell.isSupportCellData());
}
return chartDataPane;
}

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java

@ -42,7 +42,9 @@ public class ChartHyperEditPane extends ChartEditPane {
@Override
protected ChartDataPane createChartDataPane(String plotID) {
ChartDataPane dataPane = ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener);
dataPane.setSupportCellData(false);
if (dataPane != null) {
dataPane.setSupportCellData(false);
}
return dataPane;
}

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartsEditPane.java

@ -4,7 +4,7 @@ import com.fr.chart.chartattr.Chart;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import java.awt.*;
import java.awt.BorderLayout;
import java.util.ArrayList;
/**
@ -43,7 +43,9 @@ public class ChartsEditPane extends ChartEditPane {
dataPane4SupportCell = createChartDataPane(plotID);
chartsConfigPane = ChartTypeInterfaceManager.getInstance().getChartConfigPane(plotID);
paneList.add(dataPane4SupportCell);
if (dataPane4SupportCell != null) {
paneList.add(dataPane4SupportCell);
}
paneList.add(chartsConfigPane);
createTabsPane();

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -1,8 +1,8 @@
package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.TableData;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TableDataDefinition;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.data.impl.NameTableData;
@ -14,9 +14,9 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
import java.awt.Dimension;
public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private static final long serialVersionUID = 4740461028440155147L;
@ -72,8 +72,8 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
}
protected AbstractTableDataContentPane getContentPane(Plot plot) {
return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(plot, parent);
protected AbstractTableDataContentPane getContentPane(Chart chart) {
return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(chart.getPlot(), parent);
}
/**
@ -106,7 +106,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
* @param collection 图表属性的集合
*/
public void refreshContentPane(ChartCollection collection) {
refreshContentPane(getContentPane(collection.getSelectedChart().getPlot()));
refreshContentPane(getContentPane(collection.getSelectedChart()));
}
protected void refreshContentPane(AbstractTableDataContentPane contentPane) {

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -316,7 +316,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
new Component[]{tooltipShowTypeLabel, tooltipShowType},
new Component[]{tooltipStyleLabel, tooltipStyle}
};
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartData-Tooltip"}, components, rowSize, columnSize);
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Data_Point_Tooltip"}, components, rowSize, columnSize);
}
private void relayoutDataPointToolTipPane(Plot plot) {
@ -338,7 +338,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
new Component[]{isAddressTittle, tmpButton},
new Component[]{isDatapointValue, dataPointValueFormat},
};
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartData-Tooltip"}, components, rowSize, columnSize);
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Data_Point_Tooltip"}, components, rowSize, columnSize);
} else if (plot.isSupportValuePercent()) {
Component[][] components;
if (plot.isSupportTooltipSeriesType()) {
@ -357,13 +357,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
getTooltipStyleComponent()
};
}
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartData-Tooltip"}, components, rowSize, columnSize);
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Data_Point_Tooltip"}, components, rowSize, columnSize);
} else {
Component[][] components = new Component[][]{
new Component[]{isDatapointValue, dataPointValueFormat},
getTooltipStyleComponent()
};
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartData-Tooltip"}, components, rowSize, columnSize);
tooltipPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Data_Point_Tooltip"}, components, rowSize, columnSize);
}
}
@ -396,7 +396,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
Component[][] components = new Component[][]{
new Component[]{isAxisShowToolTip},
};
axisShowPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Axis", "Chart-Interactive"}, components, rowSize, columnSize);
axisShowPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Interactive"}, components, rowSize, columnSize);
}
private void initAutoRefreshPane() {
@ -414,7 +414,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
}, 1)},
new Component[]{new UILabel("<html><font size='2' face='Microsoft Yahei' color='red'>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Not_Support_Img_And_Cell") + "</font></html>"), null},
};
autoRefreshPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data-Check"}, components, rowSize, columnSize);
autoRefreshPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Data_Check"}, components, rowSize, columnSize);
}
private void initSuperlinkPane() {
@ -426,7 +426,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
new Component[]{superLink, null},
};
superlinkPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Hyperlink"}, components, rowSize, columnSize);
superlinkPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Report_Hyperlink"}, components, rowSize, columnSize);
}
private void relayoutWithPlot(Plot plot) {

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java

@ -61,7 +61,7 @@ public class ChartAxisLineStylePane extends BasicPane{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")),null},
new Component[]{null,secondTickPosition}
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Axis", "Style"},components,rowSize,columnSize);
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Style"},components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java

@ -78,7 +78,7 @@ public class ChartBackgroundPane extends BasicPane{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alpha_Degree")), null},
new Component[]{null, transparent}
};
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Background"}, components,rowSize,columnSize);
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Background"}, components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
this.add(new JSeparator(), BorderLayout.SOUTH);

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java

@ -30,7 +30,7 @@ public class ChartBeautyPane extends BasicBeanPane<Integer>{
Component[][] components = new Component[][]{
new Component[]{styleBox},
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"InterfaceStyle"},components,rowSize,columnSize);
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Style"},components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
}

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java

@ -38,7 +38,7 @@ public class ChartBorderPane extends BasicPane{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color")+":"),currentLineColorPane},
new Component[]{null,isRoundBorder}
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Border"},components,rowSize,columnSize);
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Border"},components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER) ;
this.add(new JSeparator(), BorderLayout.SOUTH);

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

@ -116,7 +116,7 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
new Component[]{styleSelectBox},
new Component[]{customPane}
} ;
return TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ColorMatch"},components,rowSize,columnSize);
return TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Color_Match"},components,rowSize,columnSize);
}
@Override

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java

@ -68,15 +68,15 @@ public class ChartAnalysisLinePane extends BasicScrollPane<Chart>{
double f = TableLayout.FILL;
double[] row = {p};
double[] col = {f};
trendLine = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Chart_TrendLine"}, new Component[][]{new Component[]{trendLinePane}}, row, col);
trendLine = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_TrendLine"}, new Component[][]{new Component[]{trendLinePane}}, row, col);
}
//最多有两条坐标轴是值类型的
if(plot.getAlertLinePaneTitle().length == 2){
String[] title = plot.getAlertLinePaneTitle();
firstAlertPane = this.createAlertLinePane(new String[]{title[0], "ChartF-Alert-Line"}, true);
secondAlertPane = this.createAlertLinePane(new String[]{title[1], "ChartF-Alert-Line"}, false);
firstAlertPane = this.createAlertLinePane(new String[]{title[0], "Fine-Design_Chart_Alert_Line"}, true);
secondAlertPane = this.createAlertLinePane(new String[]{title[1], "Fine-Design_Chart_Alert_Line"}, false);
}else if(plot.getyAxis() instanceof ValueAxis){
firstAlertPane = this.createAlertLinePane(new String[]{"ChartF-Alert-Line"}, true);
firstAlertPane = this.createAlertLinePane(new String[]{"Fine-Design_Chart_Alert_Line"}, true);
}
Component[][] component = null;;
if(trendLine != null){

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java

@ -59,7 +59,7 @@ public class DefaultAxisAreaPane extends ChartAxisAreaPane {
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Top_To_Bottom") + ":"),verticalColorPane},
};
backgroundPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Chart_Interval_Back"}, components, rowSize, columnSize);
backgroundPane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Interval_Background"}, components, rowSize, columnSize);
}
//初始化网格线
@ -82,7 +82,7 @@ public class DefaultAxisAreaPane extends ChartAxisAreaPane {
new Component[]{container,null}
};
gridlinePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Grid_Line"}, components, rowSize, columnSize);
gridlinePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Grid_Line"}, components, rowSize, columnSize);
}

16
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java

@ -61,7 +61,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
private JPanel getPaneWithOutLineStyle(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Axis", "Type"}, new Component[][]{
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Type"}, new Component[][]{
new Component[]{axisValuePane}}, new double[]{p}, new double[]{f});
double[] columnSize = {f};
double[] rowSize = { p, p, p, p, p, p, p, p, p, p};
@ -73,7 +73,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{axisReversed},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -84,7 +84,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
private JPanel getPaneWithLineStyle(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Axis", "Type"}, new Component[][]{
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Type"}, new Component[][]{
new Component[]{axisValuePane}}, new double[]{p}, new double[]{f});
double[] columnSize = {f};
double[] rowSize = { p, p, p, p, p, p, p, p, p, p, p, p};
@ -98,7 +98,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{axisReversed},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -217,7 +217,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
private JPanel getPaneWithOutAxisRevertAndLineStyle(){
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Axis", "Type"}, new Component[][]{
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Type"}, new Component[][]{
new Component[]{axisValuePane}}, new double[]{p}, new double[]{f});
double[] columnSize = {f};
double[] rowSize = { p, p, p, p, p, p, p, p};
@ -227,7 +227,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{getAxisTitlePane()},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -239,7 +239,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
private JPanel getPaneWithOutAxisRevert(){
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Axis", "Type"}, new Component[][]{
JPanel axisTypePane = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Axis_Type"}, new Component[][]{
new Component[]{axisValuePane}}, new double[]{p}, new double[]{f});
double[] columnSize = {f};
double[] rowSize = { p, p, p, p, p, p, p, p, p, p};
@ -251,7 +251,7 @@ public class ChartCategoryPane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{axisLineStylePane},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},

16
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -109,10 +109,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{axisReversed},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Units"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Units"}, new Component[][]{
new Component[]{unitCombox}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -135,10 +135,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
new Component[]{new JSeparator()},
new Component[]{axisReversed},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Units"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Units"}, new Component[][]{
new Component[]{unitCombox}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -327,10 +327,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
new Component[]{axisLineStylePane},
new Component[]{zeroPane},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Units"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Units"}, new Component[][]{
new Component[]{unitCombox}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},
@ -352,10 +352,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
Component[][] components = new Component[][]{
new Component[]{getAxisTitlePane()},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ChartF-Units"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Units"}, new Component[][]{
new Component[]{unitCombox}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Data_Type"}, new Component[][]{
new Component[]{TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_DataType"}, new Component[][]{
new Component[]{formatPane}}, new double[]{p}, new double[]{f})},
new Component[]{new JSeparator()},
new Component[]{axisLabelPane},

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java

@ -54,11 +54,11 @@ public class Donut2DSeriesPane extends AbstractPlotSeriesPane{
Component[][] components = new Component[][]{
new Component[]{stylePane, null},
new Component[]{new JSeparator(), null},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"InnerRadis"},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Inner_Radius"},
new Component[][]{new Component[]{innerRadiusPercent}}, singleRow, singleCol)},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"FR-Chart-Gap_Series"},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Gap_Series"},
new Component[][]{new Component[]{seriesGap}}, singleRow, singleCol)},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"FR-Chart-Gap_Category"},
new Component[]{null, TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Fine-Design_Chart_Gap_Category"},
new Component[][]{new Component[]{categoryGap}}, singleRow, singleCol)},
};

19
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java

@ -58,17 +58,20 @@ public abstract class AbstractExtendedChartReportDataPane<T extends AbstractData
protected abstract T update();
public void populateBean(ChartCollection collection) {
if (collection == null || collection.getSelectedChart() == null) {
return;
}
Chart chart = collection.getSelectedChart();
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart) {
AbstractDataConfig dataConfig = ((AbstractChart) chart).getDataConfig();
if (dataConfig != null) {
populate((T) dataConfig);
}
if (chart.getFilterDefinition() instanceof ExtendedReportDataSet) {
ExtendedReportDataSet dataSet = (ExtendedReportDataSet) chart.getFilterDefinition();
AbstractDataConfig dataConfig = dataSet.getDataConfig();
if (dataConfig != null) {
populate((T) dataConfig);
}
}
}

28
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java

@ -84,20 +84,26 @@ public abstract class AbstractExtendedChartTableDataPane<T extends AbstractDataC
@Override
public void populateBean(ChartCollection collection) {
if (collection == null || collection.getSelectedChart() == null) {
return;
}
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart) {
AbstractDataConfig dataConfig = ((AbstractChart) chart).getDataConfig();
if (dataConfig != null) {
populate((T) dataConfig);
}
if (hasFunction() && chart.getFilterDefinition() instanceof ExtendedTableDataSet) {
ExtendedTableDataSet dataSet = (ExtendedTableDataSet) chart.getFilterDefinition();
function.populateBean((AbstractDataFunction) dataSet.getDataFunction());
}
Chart chart = collection.getSelectedChart();
if (chart.getFilterDefinition() instanceof ExtendedTableDataSet) {
ExtendedTableDataSet dataSet = (ExtendedTableDataSet) chart.getFilterDefinition();
AbstractDataConfig dataConfig = dataSet.getDataConfig();
if (dataConfig != null) {
populate((T) dataConfig);
}
if (hasFunction()) {
function.populateBean((AbstractDataFunction) dataSet.getDataFunction());
}
}
}

28
designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedStylePane.java

@ -38,6 +38,20 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
this.listener = listener;
}
protected void setChart(Chart chart) {
if (chart instanceof AbstractChart) {
this.chart = (T) chart;
}
}
protected T getChart() {
return this.chart;
}
protected AttributeChangeListener getListener() {
return this.listener;
}
@Override
protected JPanel createContentPane() {
@ -95,8 +109,11 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart){
this.chart = (T)chart;
if (chart != null) {
setChart(chart);
}
if (this.chart != null) {
paneList.get(tabPane.getSelectedIndex()).populateBean(this.chart);
}
@ -109,8 +126,11 @@ public abstract class AbstractExtendedStylePane<T extends AbstractChart> extends
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart){
this.chart = (T)chart;
if (chart != null) {
setChart(chart);
}
if (this.chart != null) {
paneList.get(tabPane.getSelectedIndex()).updateBean(this.chart);
}

44
designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java

@ -9,7 +9,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
@ -28,29 +27,42 @@ public class ExtendedOtherPane extends AbstractChartAttrPane {
private UISpinner autoRefreshTime;
private JPanel contentPane;
protected AbstractChart getAbstractChart(Chart chart) {
if (chart != null && chart instanceof AbstractChart) {
return (AbstractChart) chart;
}
return null;
}
@Override
public void populate(ChartCollection collection) {
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart) {
hyperLinkPane.populateBean((AbstractChart) chart);
autoRefreshTime.setValue(((AbstractChart) chart).getAutoRefreshTime());
refreshEnabled.setSelectedIndex(((AbstractChart) chart).isRefreshEnabled() ? 0 : 1);
checkRefreshEnable();
}
if (collection == null || collection.getSelectedChart() == null) {
return;
}
AbstractChart chart = getAbstractChart(collection.getSelectedChart());
if (chart != null) {
hyperLinkPane.populateBean(chart);
autoRefreshTime.setValue(chart.getAutoRefreshTime());
refreshEnabled.setSelectedIndex(chart.isRefreshEnabled() ? 0 : 1);
checkRefreshEnable();
}
}
@Override
public void update(ChartCollection collection) {
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null && chart instanceof AbstractChart) {
hyperLinkPane.updateBean((AbstractChart) chart);
((AbstractChart) chart).setAutoRefreshTime(autoRefreshTime.getValue());
((AbstractChart) chart).setRefreshEnabled(refreshEnabled.getSelectedIndex() == 0);
}
if (collection == null || collection.getSelectedChart() == null) {
return;
}
AbstractChart chart = getAbstractChart(collection.getSelectedChart());
if (chart != null) {
hyperLinkPane.updateBean(chart);
chart.setAutoRefreshTime(autoRefreshTime.getValue());
chart.setRefreshEnabled(refreshEnabled.getSelectedIndex() == 0);
}
}

9
designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java

@ -27,6 +27,12 @@ public class ExtendedTypePane<T extends AbstractChart> extends AbstractChartType
protected void setType(T chart, int index) {
}
protected void populate(T chart) {
}
protected void update(T chart) {
}
@Override
public void populateBean(Chart chart) {
if (getTypeIconPath().length > 0) {
@ -36,10 +42,13 @@ public class ExtendedTypePane<T extends AbstractChart> extends AbstractChartType
typeDemo.get(getTypeIndex((T) chart)).isPressing = true;
checkDemosBackground();
}
populate((T) chart);
}
@Override
public void updateBean(Chart chart) {
update((T) chart);
if (getTypeIconPath().length > 0) {
for (int index = 0, len = typeDemo.size(); index < len; index++) {
if (typeDemo.get(index).isPressing) {

2
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -178,7 +178,7 @@ public class VanChartPlotLegendPane extends BasicPane {
initPositionListener();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout"), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), panel);
}
private void initPositionListener(){

4
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.gantt.designer.data.link;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartattr.Chart;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.TableDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
@ -14,7 +14,7 @@ public class GanttLinkTableDataPane extends TableDataPane {
}
@Override
protected AbstractTableDataContentPane getContentPane(Plot plot) {
protected AbstractTableDataContentPane getContentPane(Chart chart) {
return new GanttLinkTableDataContentPane();
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -121,7 +121,7 @@ public class CellStylePane extends AbstractCellAttrPane {
@Override
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Style"));
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Style");
}
public void setSelectedByIds(int level, String... id) {

170
designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java

@ -0,0 +1,170 @@
package com.fr.poly;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itooltip.MultiLineToolTip;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.dnd.SerializableTransferable;
import com.fr.log.FineLoggerFactory;
import com.fr.report.poly.PolyECBlock;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.JToolTip;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragSource;
import java.awt.dnd.DragSourceDragEvent;
import java.awt.dnd.DragSourceDropEvent;
import java.awt.dnd.DragSourceEvent;
import java.awt.dnd.DragSourceListener;
import java.io.Serializable;
/**
* 拖动聚合块的那个竖的动作条
*
* @editor zhou
* @since 2012-3-23下午3:42:10
*/
public class PolyComponentsBar extends JToolBar {
private SerIcon[] serIcons;
private static final int MAX_BAR_NUM = 15;
public PolyComponentsBar() {
setOrientation(SwingConstants.VERTICAL);
setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
setFloatable(false);
setBackground(UIConstants.TOOLBARUI_BACKGROUND);
setLayout(FRGUIPaneFactory.create1ColumnGridLayout());
BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames();
int typeLen = typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM;
serIcons = new SerIcon[typeLen + 1];
serIcons[0] = new SerIcon(
PolyECBlock.class,
Toolkit.i18nText("Fine-Design_Report_Poly_Report_Block"),
"com/fr/design/images/poly/toolbar/Poly-Report_Block.png"
);
this.add(serIcons[0]);
for (int i = 0; i < typeLen; i++) {
BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID());
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(typeName[i].getPlotID());
serIcons[i + 1] = new SerIcon(rowChart[0], Toolkit.i18nText(typeName[i].getName()), iconPath);
this.add(serIcons[i + 1]);
}
}
/**
* 设置是否可用状态
*/
public void checkEnable() {
for (SerIcon serIcon : serIcons) {
serIcon.setEnabled(!DesignerMode.isAuthorityEditing());
}
}
private class SerIcon extends UIButton implements DragGestureListener, DragSourceListener {
private DragSource dragSource;
private Serializable serializable;
/**
* @param serializable s
* @param text 按钮名
* @param iconPath 图标路径
*/
public SerIcon(Serializable serializable, String text, String iconPath) {
super(BaseUtils.readIcon(iconPath));
this.serializable = serializable;
this.setToolTipText(text);
this.set4ToolbarButton();
dragSource = new DragSource();
dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, this);
}
@Override
public Dimension getPreferredSize() {
return new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight());
}
@Override
public JToolTip createToolTip() {
MultiLineToolTip tip = new MultiLineToolTip();
tip.setComponent(this);
tip.setOpaque(false);
return tip;
}
@Override
public void dragGestureRecognized(DragGestureEvent dge) {
Transferable t = new SerializableTransferable(serializable);
dragSource.startDrag(dge, DragSource.DefaultCopyDrop, t, this);
getModel().setArmed(false);
getModel().setRollover(false);
repaint();
}
@Override
public void dragEnter(DragSourceDragEvent dsde) {
}
@Override
public void dragOver(DragSourceDragEvent dsde) {
}
@Override
public void dropActionChanged(DragSourceDragEvent dsde) {
}
@Override
public void dragExit(DragSourceEvent dse) {
}
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
}
}
/**
* 测试下
*
* @param args 参数
*/
public static void main(String... args) {
try {
UIManager.setLookAndFeel(new WindowsLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
JFrame f = new JFrame();
JPanel p = (JPanel) f.getContentPane();
p.setLayout(FRGUIPaneFactory.createBorderLayout());
PolyComponentsBar pbp = new PolyComponentsBar();
p.add(pbp, BorderLayout.CENTER);
f.setSize(400, 300);
f.setVisible(true);
}
}

142
designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java

@ -1,142 +0,0 @@
package com.fr.poly;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itooltip.MultiLineToolTip;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.dnd.SerializableTransferable;
import com.fr.report.poly.PolyECBlock;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.*;
import java.io.Serializable;
/**
* 拖动聚合块的那个竖的动作条
* @editor zhou
* @since 2012-3-23下午3:42:10
*/
public class PolyComponetsBar extends JToolBar {
private static Color FOLDER_PANE_BACKGROUND = new Color(214, 223, 247);
private BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames();
private SerIcon[] serIcons;
private static final int MAX_BAR_NUM = 15;
public PolyComponetsBar() {
setOrientation(SwingConstants.VERTICAL);
setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
setFloatable(false);
setBackground(UIConstants.TOOLBARUI_BACKGROUND);
setLayout(FRGUIPaneFactory.create1ColumnGridLayout());
int typeLen = typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM;
serIcons = new SerIcon[typeLen + 1];
serIcons[0] = new SerIcon(PolyECBlock.class, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Poly_Report_Block"), "Fine-Design_Report_Poly_Report_Block");
this.add(serIcons[0]);
for (int i = 0; i < typeLen; i++) {
BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID());
serIcons[i + 1] = new SerIcon(rowChart[0], com.fr.design.i18n.Toolkit.i18nText(typeName[i].getName()), typeName[i].getName());
this.add(serIcons[i + 1]);
}
}
/**
* 设置是否可用状态
*/
public void checkEnable() {
for (SerIcon serIcon : serIcons) {
serIcon.setEnabled(!DesignerMode.isAuthorityEditing());
}
}
private class SerIcon extends UIButton implements DragGestureListener, DragSourceListener {
private DragSource dragSource;
private Serializable serializable;
public SerIcon(Serializable serializable, String text, String iconName) {
super(BaseUtils.readIcon("com/fr/design/images/poly/toolbar/" + iconName + ".png"));
this.serializable = serializable;
this.setToolTipText(text);
this.set4ToolbarButton();
dragSource = new DragSource();
dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, this);
}
@Override
public Dimension getPreferredSize() {
return new Dimension(getIcon().getIconWidth(), getIcon().getIconHeight());
}
@Override
public JToolTip createToolTip() {
MultiLineToolTip tip = new MultiLineToolTip();
tip.setComponent(this);
tip.setOpaque(false);
return tip;
}
@Override
public void dragGestureRecognized(DragGestureEvent dge) {
Transferable t = new SerializableTransferable(serializable);
dragSource.startDrag(dge, DragSource.DefaultCopyDrop, t, this);
getModel().setArmed(false);
getModel().setRollover(false);
repaint();
}
@Override
public void dragEnter(DragSourceDragEvent dsde) {
}
@Override
public void dragOver(DragSourceDragEvent dsde) {
}
@Override
public void dropActionChanged(DragSourceDragEvent dsde) {
}
@Override
public void dragExit(DragSourceEvent dse) {
}
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
}
}
/**
* 测试下
* @param args 参数
*/
public static void main(String... args) {
try {
UIManager.setLookAndFeel(new WindowsLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
FRContext.getLogger().error(e.getMessage(), e);
}
JFrame f = new JFrame();
JPanel p = (JPanel) f.getContentPane();
p.setLayout(FRGUIPaneFactory.createBorderLayout());
PolyComponetsBar pbp = new PolyComponetsBar();
p.add(pbp, BorderLayout.CENTER);
f.setSize(400, 300);
f.setVisible(true);
}
}

50
designer-realize/src/main/java/com/fr/poly/PolyDesigner.java

@ -3,7 +3,6 @@
*/
package com.fr.poly;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
@ -19,7 +18,18 @@ import com.fr.design.designer.EditingState;
import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.AuthorityEditPane;
import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.ElementCasePaneAuthorityEditPane;
import com.fr.design.mainframe.FormScrollBar;
import com.fr.design.mainframe.JSliderPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.NoSupportAuthorityEdit;
import com.fr.design.mainframe.ReportComponent;
import com.fr.design.mainframe.ReportComponentComposite;
import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
@ -35,7 +45,11 @@ import com.fr.design.utils.gui.LayoutUtils;
import com.fr.general.ComparatorUtils;
import com.fr.grid.selection.Selection;
import com.fr.poly.actions.DeleteBlockAction;
import com.fr.poly.creator.*;
import com.fr.poly.creator.BlockCreator;
import com.fr.poly.creator.BlockEditor;
import com.fr.poly.creator.ECBlockCreator;
import com.fr.poly.creator.ECBlockEditor;
import com.fr.poly.creator.PolyElementCasePane;
import com.fr.poly.hanlder.DataEditingListener;
import com.fr.poly.hanlder.PolyDesignerDropTarget;
import com.fr.poly.model.AddedData;
@ -51,9 +65,23 @@ import com.fr.stable.unit.OLDPIX;
import com.fr.stable.unit.UNIT;
import com.fr.stable.unit.UnitRectangle;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.AbstractAction;
import javax.swing.ActionMap;
import javax.swing.InputMap;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import javax.swing.KeyStroke;
import java.awt.AWTEvent;
import java.awt.Adjustable;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.util.ArrayList;
import java.util.List;
@ -92,7 +120,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
private JScrollBar verScrollBar;
private JScrollBar horScrollBar;
private PolyComponetsBar polyComponetsBar = new PolyComponetsBar();
private PolyComponentsBar polyComponentsBar = new PolyComponentsBar();
private JComponent[] toolBarComponent = null;
private JPanel ployareaPane;
private JSliderPane jSliderContainer;
@ -142,7 +170,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
@Override
public void mouseWheelMoved(MouseWheelEvent evt) {
int id = evt.getID();
if (id == MouseEvent.MOUSE_WHEEL){
if (id == MouseEvent.MOUSE_WHEEL) {
if (!InputEventBaseOnOS.isControlDown(evt)) {
int rotations = evt.getWheelRotation();
verScrollBar.setValue(verScrollBar.getValue() + rotations * ROTATIONS);
@ -167,7 +195,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
ployareaPane.add(PolyDesignerLayout.HRuler, new HorizontalRuler(this));
ployareaPane.setBackground(Color.WHITE);
this.add(ployareaPane, BorderLayout.CENTER);
this.add(polyComponetsBar, BorderLayout.WEST);
this.add(polyComponentsBar, BorderLayout.WEST);
}
private void initPolyBlocks() {
@ -749,7 +777,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* @return 工具按钮
*/
public JComponent[] toolBarButton4Form() {
polyComponetsBar.checkEnable();
polyComponentsBar.checkEnable();
if (selection != null) {
selection.checkButtonEnable();
}
@ -848,7 +876,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
public void updateJSliderValue() {
ReportComponentComposite reportComposite = (ReportComponentComposite) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentReportComponentPane();
JSliderPane jSliderContainer = reportComposite.getjSliderContainer();
jSliderContainer.getShowVal().setValue((int)Math.ceil((double)this.resolution * HUND / ScreenResolution.getScreenResolution()));
jSliderContainer.getShowVal().setValue((int) Math.ceil((double) this.resolution * HUND / ScreenResolution.getScreenResolution()));
}

2
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -856,7 +856,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Top_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Bottom_N"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Odd"),
com.fr.design.i18n.Toolkit.i18nText("Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Even"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Specify")
});
rsComboBox.addActionListener(actionListener);

Loading…
Cancel
Save