diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java index 27873385a6..1e170c8443 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/InstallFromDiskCallback.java +++ b/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, diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java index f503776993..a6f781b94b 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UninstallPluginCallback.java +++ b/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, diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java b/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java index de753f9ce4..cd0ccab848 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/callback/UpdateFromDiskCallback.java +++ b/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, diff --git a/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java b/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java index 193ad0c005..468e923166 100644 --- a/designer-base/src/main/java/com/fr/design/extra/tradition/callback/UpdateOnlineCallback.java +++ b/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, diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java index a5da615b0c..74db09f921 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/FunctionComboBox.java +++ b/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; diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RecordableTextAction.java b/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RecordableTextAction.java index 7487f9fa83..9fc0bf93e5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/ui/rtextarea/RecordableTextAction.java +++ b/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))); } diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/util/RTextAreaActionI18nMappingUtil.java b/designer-base/src/main/java/com/fr/design/gui/syntax/util/RTextAreaActionI18nMappingUtil.java new file mode 100644 index 0000000000..bdaa13046e --- /dev/null +++ b/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; + } +} diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/FunctionClassMappingUtils.java new file mode 100644 index 0000000000..374f953b99 --- /dev/null +++ b/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; + } + +} diff --git a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java index 06e74b39ca..5d54adff73 100644 --- a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java +++ b/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; + } /** * 获取指定图表的标题 diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index a301af6971..5fce5c3669 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/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; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java index 936304b4e1..bae6e20bce 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java +++ b/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; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartsEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartsEditPane.java index 3f35c585dc..b9f5a2fbdc 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartsEditPane.java +++ b/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(); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index da79f2691b..5248fb08b1 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/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{ private static final long serialVersionUID = 4740461028440155147L; @@ -72,8 +72,8 @@ public class TableDataPane extends FurtherBasicBeanPane{ } } - 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{ * @param collection 图表属性的集合 */ public void refreshContentPane(ChartCollection collection) { - refreshContentPane(getContentPane(collection.getSelectedChart().getPlot())); + refreshContentPane(getContentPane(collection.getSelectedChart())); } protected void refreshContentPane(AbstractTableDataContentPane contentPane) { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java index 24128ec286..8af8ad92d2 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java @@ -316,7 +316,7 @@ public class ChartInteractivePane extends BasicScrollPane 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 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 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 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 implements UIOb }, 1)}, new Component[]{new UILabel("" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Not_Support_Img_And_Cell") + ""), 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 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) { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java index eaffb94983..76f45c26d6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java +++ b/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); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java index ccd7f08981..a2c8f6d4dc 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java +++ b/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); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java index ed7666cf84..8a8c479d00 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java @@ -30,7 +30,7 @@ public class ChartBeautyPane extends BasicBeanPane{ 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); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java index 8c9cbb0b92..6de66828bd 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java +++ b/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); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java index 5b1dca34cc..39bc49a903 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java @@ -116,7 +116,7 @@ public class ChartFillStylePane extends BasicBeanPane{ 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 diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java index 64987d571c..e9eafa4de3 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java @@ -68,15 +68,15 @@ public class ChartAnalysisLinePane extends BasicScrollPane{ 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){ diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java index 00471c19f7..f846866268 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java +++ b/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); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java index 289bef4eb0..c0842ab15e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java @@ -61,7 +61,7 @@ public class ChartCategoryPane extends ChartAxisUsePane{ 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{ 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{ 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{ 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{ 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{ 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{ 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{ 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}, diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index 844f3f81f3..32e6564799 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -109,10 +109,10 @@ public class ChartValuePane extends ChartAxisUsePane{ 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{ 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{ 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{ 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}, diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java index 514c5398ba..001829b4a3 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java +++ b/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)}, }; diff --git a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java index c633fa755f..9e4a84f038 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java @@ -58,17 +58,20 @@ public abstract class AbstractExtendedChartReportDataPane 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 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 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); } diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java index e2e3e67c4b..a92e100e53 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java +++ b/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); } } diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java index a1375938d5..9e5ddd7b48 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java @@ -27,6 +27,12 @@ public class ExtendedTypePane 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 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) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index c1b43e946d..fbe2d903e1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/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(){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java index 992d13d54e..56e2381312 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataPane.java +++ b/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(); } } diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java index ee873ba013..af1aaa12dd 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java @@ -138,7 +138,7 @@ public class CompositeComponentAdapter implements ComponentAdapter { public void adjustGroupNamesPosition(ArrayList groupNames){ for(String groupName : groupNames){ - if(groupName.equals("Form-Basic_Properties")){ + if(groupName.equals("Fine-Design_Basic_Form_Basic_Properties")){ groupNames.remove(groupName); groupNames.add(0,groupName); break; diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java b/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java index ba77fddaf0..e94022ebe8 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XButton.java @@ -90,28 +90,28 @@ public class XButton extends XWidgetCreator { protected CRPropertyDescriptor creatNonListenerStyle(int i) throws IntrospectionException{ CRPropertyDescriptor[] crPropertyDescriptors = { new CRPropertyDescriptor("text", this.data.getClass()).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass( - ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("initialBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("overBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Click")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FR_Font")) .setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon")) .setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("hotkeys", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setEditorClass(ShortCutTextEditor.class) }; @@ -163,7 +163,7 @@ public class XButton extends XWidgetCreator { return new CRPropertyDescriptor[]{ new CRPropertyDescriptor("text", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -173,7 +173,7 @@ public class XButton extends XWidgetCreator { }), new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass( - ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -183,10 +183,10 @@ public class XButton extends XWidgetCreator { }), new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon")) .setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("hotkeys", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setEditorClass(ShortCutTextEditor.class) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java index 8045ed8ec7..29ce253f56 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java @@ -115,7 +115,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator { }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java index 2399496ce1..ab74ccd984 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBox.java @@ -30,7 +30,7 @@ public class XCheckBox extends XWidgetCreator { public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { return (CRPropertyDescriptor[]) ArrayUtils.addAll(super.supportedDescriptor(), new CRPropertyDescriptor[] { new CRPropertyDescriptor("text", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Text")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -40,7 +40,7 @@ public class XCheckBox extends XWidgetCreator { }), new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -53,7 +53,7 @@ public class XCheckBox extends XWidgetCreator { }), new CRPropertyDescriptor("fontSize", this.data.getClass(), "getFontSize", "setFontSize") .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Font_Size")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java index e745af1b18..26f1421a64 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCheckBoxGroup.java @@ -35,10 +35,10 @@ public class XCheckBoxGroup extends XFieldEditor { CRPropertyDescriptor [] sup = (CRPropertyDescriptor[]) ArrayUtils.addAll(new CRPropertyDescriptor[] { new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("dictionary", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Dictionary")).setEditorClass(DictionaryEditor.class).setRendererClass( - DictionaryRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")},super.supportedDescriptor()); + DictionaryRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")},super.supportedDescriptor()); CRPropertyDescriptor [] properties = (CRPropertyDescriptor[]) ArrayUtils.addAll(sup,getCRPropertyDescriptor()); return properties; } @@ -46,26 +46,26 @@ public class XCheckBoxGroup extends XFieldEditor { private CRPropertyDescriptor[] getCRPropertyDescriptor() throws IntrospectionException { CRPropertyDescriptor[] crp = new CRPropertyDescriptor[] { new CRPropertyDescriptor("adaptive", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Adaptive")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced").setEditorClass(InChangeBooleanEditor.class), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced").setEditorClass(InChangeBooleanEditor.class), new CRPropertyDescriptor("chooseAll", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Choose_Type_All")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("returnString", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Return_String")).setEditorClass(InChangeBooleanEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }; + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }; if (((CheckBoxGroup) this.toData()).isReturnString()) { crp = (CRPropertyDescriptor[]) ArrayUtils.addAll(crp, new CRPropertyDescriptor[] { new CRPropertyDescriptor("delimiter", this.data.getClass()).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Delimiter")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Delimiter")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("startSymbol", this.data.getClass()).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_Start_Symbol")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_Start_Symbol")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("endSymbol", this.data.getClass()).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_End_Symbol")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }); + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_End_Symbol")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }); } if (!((CheckBoxGroup) this.toData()).isAdaptive()) { crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("columnsInRow", this.data .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); } return crp; } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java index cc291eb589..22393ca847 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XComboBox.java @@ -40,9 +40,9 @@ public class XComboBox extends XCustomWriteAbleRepeatEditor { public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { return (CRPropertyDescriptor[]) ArrayUtils.addAll( new CRPropertyDescriptor[]{ - new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("dictionary", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")).setEditorClass(DictionaryEditor.class).setRendererClass(DictionaryRenderer.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }, super.supportedDescriptor()); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java b/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java index 4c95cc04ae..241c11bb94 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XComboCheckBox.java @@ -33,19 +33,19 @@ public class XComboCheckBox extends XComboBox { "Advanced"), new CRPropertyDescriptor("returnString", this.data.getClass()).setEditorClass( InChangeBooleanEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Return_String")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") } : new CRPropertyDescriptor[] { + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") } : new CRPropertyDescriptor[] { new CRPropertyDescriptor("delimiter", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Delimiter")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), new CRPropertyDescriptor("returnString", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Return_String")).setEditorClass(InChangeBooleanEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("startSymbol", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_Start_Symbol")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("endSymbol", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Combo_CheckBox_End_Symbol")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }); + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }); } @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java index 233619a5a7..c6ec47a3bc 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XDateEditor.java @@ -61,7 +61,7 @@ public class XDateEditor extends XDirectWriteEditor { new CRPropertyDescriptor[]{ new CRPropertyDescriptor("formatText", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format")).setEditorClass(formatClass()).setRendererClass( - DateCellRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + DateCellRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("startDate", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("FR-Design_Form_Start_Date")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced").setEditorClass(DateRangeEditor.class), diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java b/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java index f2bf95aec6..1797ce9fbd 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XElementCase.java @@ -90,7 +90,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -100,10 +100,10 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme }), new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_Padding")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("toolBars", this.data.getClass()).setEditorClass(ElementCaseToolBarEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_EC_Toolbar")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }; CRPropertyDescriptor[] extraTableEditor = getExtraTableEditor(); return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraTableEditor); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XFileUploader.java b/designer-form/src/main/java/com/fr/design/designer/creator/XFileUploader.java index fe0878dbe1..f3f880ce14 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XFileUploader.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XFileUploader.java @@ -34,7 +34,7 @@ public class XFileUploader extends XFieldEditor { new CRPropertyDescriptor[]{ new CRPropertyDescriptor("allowTypes", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_File_Allow_Upload_Files")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XIframeEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XIframeEditor.java index 42747042ed..576bfcdd32 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XIframeEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XIframeEditor.java @@ -43,10 +43,10 @@ public class XIframeEditor extends XWidgetCreator { }), new CRPropertyDescriptor("overflowx", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Preference_Horizontal_Scroll_Bar_Visible")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("overflowy", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Preference_Vertical_Scroll_Bar_Visible")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("parameters", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters")).setEditorClass(ParameterEditor.class) .setRendererClass(ParameterRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java b/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java index 989be4fc81..233c369c41 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XLabel.java @@ -59,7 +59,7 @@ public class XLabel extends XWidgetCreator { new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass( - WidgetValueEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + WidgetValueEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -70,17 +70,17 @@ public class XLabel extends XWidgetCreator { }), new CRPropertyDescriptor("wrap", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_StyleAlignment_Wrap_Text")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("verticalCenter", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Page_Setup_Vertically")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("textalign", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Alignment-Style")).setEditorClass(ItemCellEditor.class) .setRendererClass(LabelHorizontalAlignmentRenderer.class).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font")) .setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced")}); + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")}); } @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java b/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java index b45a1a4694..edf6018989 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java @@ -66,7 +66,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Form-Widget_Name")), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override @@ -76,7 +76,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme }), new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_Padding_Duplicate")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), }; } @@ -99,7 +99,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme public CRPropertyDescriptor createMarginDescriptor() throws IntrospectionException { return new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_Padding_Duplicate")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"); } /** diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XMultiFileUploader.java b/designer-form/src/main/java/com/fr/design/designer/creator/XMultiFileUploader.java index c24cab9ab5..da2bf7cd03 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XMultiFileUploader.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XMultiFileUploader.java @@ -38,13 +38,13 @@ public class XMultiFileUploader extends XFieldEditor { new CRPropertyDescriptor[]{ new CRPropertyDescriptor("singleFile", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Single_File_Upload")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("accept", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_File_Allow_Upload_Files")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("maxSize", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_File_Size_Limit")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java index 9671d3b868..7083f087a7 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java @@ -44,7 +44,7 @@ public class XNumberEditor extends XWrapperedFieldEditor { new CRPropertyDescriptor("widgetValue", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")) .setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")} + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")} ,super.supportedDescriptor()); CRPropertyDescriptor allowDecimal = new CRPropertyDescriptor("allowDecimals", this.data.getClass()) .setEditorClass(InChangeBooleanEditor.class) @@ -71,7 +71,7 @@ public class XNumberEditor extends XWrapperedFieldEditor { .putKeyValue(XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate"), new CRPropertyDescriptor("waterMark", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("regErrorMessage", this.data.getClass()) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Verify_Message")) .putKeyValue(XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate") diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java b/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java index 2b54ef0736..af10fbc170 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XRadioGroup.java @@ -42,10 +42,10 @@ public class XRadioGroup extends XFieldEditor { CRPropertyDescriptor [] sup = (CRPropertyDescriptor[]) ArrayUtils.addAll(new CRPropertyDescriptor[] { new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("dictionary", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Dictionary")).setEditorClass(DictionaryEditor.class).setRendererClass( - DictionaryRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")},super.supportedDescriptor()); + DictionaryRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")},super.supportedDescriptor()); CRPropertyDescriptor [] properties = (CRPropertyDescriptor[]) ArrayUtils.addAll(sup,getCRPropertyDescriptor()); return properties; } @@ -53,11 +53,11 @@ public class XRadioGroup extends XFieldEditor { private CRPropertyDescriptor[] getCRPropertyDescriptor() throws IntrospectionException { CRPropertyDescriptor[] crp = new CRPropertyDescriptor[] { new CRPropertyDescriptor("adaptive", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Adaptive")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced").setEditorClass(InChangeBooleanEditor.class)}; + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced").setEditorClass(InChangeBooleanEditor.class)}; if (!toData().isAdaptive()) { crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("columnsInRow", this.data .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Group_Display_Columns")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); } return crp; } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java index d4083ecc9a..d7e1c2d37b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeComboBoxEditor.java @@ -45,7 +45,7 @@ public class XTreeComboBoxEditor extends XTreeEditor { protected CRPropertyDescriptor[] addWaterMark(CRPropertyDescriptor[] crp) throws IntrospectionException { return (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("waterMark", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); } protected CRPropertyDescriptor[] addAllowEdit(CRPropertyDescriptor[] crp) throws IntrospectionException{ diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java index d17f5cca53..c5672b389f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java @@ -40,10 +40,10 @@ public class XTreeEditor extends XWidgetCreator { new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("model", this.data.getClass(), "getNodeOrDict", "setNodeOrDict").setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")).setEditorClass(TreeModelEditor.class).setRendererClass( - TreeModelRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + TreeModelRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("allowBlank", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Blank")).setEditorClass(InChangeBooleanEditor.class) .putKeyValue(XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate"), @@ -54,10 +54,10 @@ public class XTreeEditor extends XWidgetCreator { : new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetValue", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Value")).setEditorClass(WidgetValueEditor.class) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("model", this.data.getClass(), "getNodeOrDict", "setNodeOrDict").setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")).setEditorClass(TreeModelEditor.class).setRendererClass( - TreeModelRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + TreeModelRenderer.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("allowBlank", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Blank")).setEditorClass(InChangeBooleanEditor.class).putKeyValue( XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate"),}; @@ -66,10 +66,10 @@ public class XTreeEditor extends XWidgetCreator { crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("fontSize", this.data.getClass(), "getFontSize", "setFontSize") .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Font_Size")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("multipleSelection", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced").setEditorClass(InChangeBooleanEditor.class)); + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced").setEditorClass(InChangeBooleanEditor.class)); crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("ajax", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, @@ -79,9 +79,9 @@ public class XTreeEditor extends XWidgetCreator { crp = this.addCustomData(crp); crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("selectLeafOnly", this.data - .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Select_Leaf_Only")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Select_Leaf_Only")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("returnFullPath", this.data - .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Return_Full_Path")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")); + .getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Return_Full_Path")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")); return (CRPropertyDescriptor[]) ArrayUtils.addAll(super.supportedDescriptor(), crp); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java index 2699f05731..6190ffaebb 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -74,7 +74,7 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Form-Widget_Name")), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java index bdd7e7e41f..cb288c98cc 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java @@ -61,16 +61,16 @@ public class XWParameterLayout extends XWAbsoluteLayout { new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Toolkit.i18nText("Fine-Design_Form-Widget_Name")), new CRPropertyDescriptor("background", this.data.getClass()).setEditorClass(BackgroundEditor.class) .setRendererClass(BackgroundRenderer.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("delayDisplayContent", this.data.getClass()).setEditorClass(BooleanEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("position", this.data.getClass()).setEditorClass(WidgetDisplayPosition.class) .setRendererClass(WidgetDisplayPositionRender.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Display_Position")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("useParamsTemplate", this.data.getClass()).setEditorClass(BooleanEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), }; return ArrayUtils.addAll(propertyTableEditor, getExtraTableEditor()); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java index 9118a45941..8b72102459 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java @@ -57,7 +57,7 @@ public abstract class XWidgetCreator extends XCreator { }), new CRPropertyDescriptor("labelName", this.data.getClass(), "getLabelName", "setLabelName") .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }; } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWriteAbleRepeatEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWriteAbleRepeatEditor.java index 92bba90571..d6ff25d73e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWriteAbleRepeatEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWriteAbleRepeatEditor.java @@ -26,8 +26,8 @@ public abstract class XWriteAbleRepeatEditor extends XDirectWriteEditor { return (CRPropertyDescriptor[]) ArrayUtils.addAll( super.supportedDescriptor(), new CRPropertyDescriptor[]{ - new CRPropertyDescriptor("removeRepeat", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Remove_Repeat")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), - new CRPropertyDescriptor("waterMark", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("removeRepeat", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Remove_Repeat")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), + new CRPropertyDescriptor("waterMark", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), }); } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 304ee91f06..53a72e9112 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -373,7 +373,7 @@ public class XWCardLayout extends XLayoutContainer { }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( CardTagWLayoutBorderStyleEditor.class).setI18NName( - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 4db7cab59f..f2f58f17b3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -177,7 +177,7 @@ public class XWTabFitLayout extends XWFitLayout { return new CRPropertyDescriptor[]{ new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Title_Style")).setEditorClass( - ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override public void propertyChange() { @@ -192,16 +192,16 @@ public class XWTabFitLayout extends XWFitLayout { CRPropertyDescriptor[] crPropertyDescriptors = { new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Title_Style")).setEditorClass( - ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("initialBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("overBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"), new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Click")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced") }; return crPropertyDescriptors[i]; } diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java index 15c4c65689..6f7eb0396e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java @@ -72,7 +72,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ CRPropertyDescriptor heightLimitProperty = new CRPropertyDescriptor("heightPercent", this.xCreator.toData().getClass()) .setEditorClass(RefinedDoubleEditor.class) .setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_EC_Heightpercent")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"); ArrayList defaultList = (ArrayList) createNonListenerProperties(); defaultList.add(heightLimitProperty); return defaultList.toArray(new CRPropertyDescriptor[defaultList.size()]); diff --git a/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java b/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java index b19fff9363..54b32ca6cd 100644 --- a/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java +++ b/designer-form/src/main/java/com/fr/design/form/util/XCreatorConstants.java @@ -19,7 +19,7 @@ public class XCreatorConstants { public static final String WIDGETNAME = "widgetName"; // 描述属性的分类 public static final String PROPERTY_CATEGORY = "category"; - public static final String DEFAULT_GROUP_NAME = "Form-Basic_Properties"; + public static final String DEFAULT_GROUP_NAME = "Fine-Design_Basic_Form_Basic_Properties"; public static final String PROPERTY_VALIDATE = "Fine-Design_Basic_Validate"; public static final Color FORM_BG = new Color(255, 255, 255); // 拖拽标识块的大小 diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index db369c1efe..1487908e77 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/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) { diff --git a/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java b/designer-realize/src/main/java/com/fr/poly/PolyComponentsBar.java new file mode 100644 index 0000000000..3130a4b864 --- /dev/null +++ b/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); + + } +} diff --git a/designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java b/designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java deleted file mode 100644 index d6e3b5999d..0000000000 --- a/designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java +++ /dev/null @@ -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); - - } -} diff --git a/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java b/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java index 2307765e33..a0d2db47e4 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java +++ b/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