diff --git a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java index 1c11aad2e4..c9128627cc 100644 --- a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java @@ -61,11 +61,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane regPane.getRegComboBox().addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { RegExp regExp = (RegExp) regPane.getRegComboBox().getSelectedItem(); - if (!StringUtils.isNotEmpty(regExp.toRegText())) { - getRegErrorMsgTextField().setEnabled(false); - } else { - getRegErrorMsgTextField().setEnabled(true); - } + getRegErrorMsgTextField().setEnabled(regExp.errorMessageEditable()); } }); diff --git a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java index 45cd0cea70..a76d4a1059 100644 --- a/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/BasicTableDataTreePane.java @@ -118,7 +118,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp if (StringUtils.isBlank(tempName)) { nPanel.setShowText(Inter.getLocText(new String[]{"DS-TableData", "ISEMPTY", "PLEASE", "GIVE-NAME"}, new String[]{"", ",", "", "!"})); dg.setButtonEnabled(false); - } else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName, allDSNames)) { + } else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) { String[] waring = new String[]{"DS-TableData", "Utils-has_been_existed", "PLEASE", "Rename"}; String[] sign = new String[]{tempName, ",", "", "!"}; nPanel.setShowText(Inter.getLocText(waring, sign)); @@ -324,20 +324,22 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp private String createDsName(String prefix) { int count = 1; allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook()); - while (isDsNameRepeaded(prefix + count, allDSNames)) { + while (isDsNameRepeaded(prefix + count)) { count++; } return prefix + count; } - private boolean isDsNameRepeaded(String name, String[] names) { - boolean repeat = false; - for (int i = 0; i < names.length; i++) { - if (ComparatorUtils.equals(name, names[i])) { - repeat = true; + protected boolean isDsNameRepeaded(String name) { + if (allDSNames == null) { + allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook()); + } + for (int i = 0; i < allDSNames.length; i++) { + if (ComparatorUtils.equals(name, allDSNames[i])) { + return true; } } - return repeat; + return false; } protected KeyAdapter getTableTreeNodeListener(final UpdateAction editAction, final UpdateAction previewTableDataAction, final UpdateAction removeAction, final TableDataSourceOP op, final TableDataTree dataTree) { diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index 2e605cafcf..219093c6d9 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -276,13 +276,14 @@ public class TableDataTreePane extends BasicTableDataTreePane { * @param tableDataSource 数据集 */ public void addTableData(String srcName, TableDataSource tableDataSource) { + allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook()); DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); TableDataSource tds = tc.getBook(); Iterator tdIterator = tableDataSource.getTableDataNameIterator(); while (tdIterator.hasNext()) { String tdName = (String) tdIterator.next(); TableData td = tableDataSource.getTableData(tdName); - if (tds.getTableData(tdName) != null) {//如果有同名的就拼上来源名称 + if (tds.getTableData(tdName) != null || isDsNameRepeaded(tdName)) {//如果有同名的就拼上来源名称 tdName = srcName + tdName; } int i = 0; diff --git a/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java b/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java index 65df6f0625..a8a72fc1e3 100644 --- a/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java @@ -23,6 +23,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.util.Arrays; public class TreeSettingPane extends BasicPane implements DataCreatorUI { private JTreeControlPane controlPane; @@ -133,7 +134,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { for (LayerConfig layerConfig : layerConfigList) { layerConfigs[i++] = layerConfig; } - this.layerDataControlPane.populate(new NameObject("tree", layerConfigs)); + this.layerDataControlPane.populate(new NameObject("Tree Layer Data", layerConfigs)); } else { buildBox.setSelectedIndex(2); } @@ -154,10 +155,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { if (buildBox.getSelectedIndex() == 1) { TableDataDictionary dictionary = this.autoBuildPane.update(); te.setAutoBuild(true); + te.setLayerBuild(false); te.setDictionary(dictionary); te.setNodeOrDict(dictionary); } else if (buildBox.getSelectedIndex() == 2) { te.setAutoBuild(false); + te.setLayerBuild(false); NameObject no = this.controlPane.update(); if (no != null) { TreeEditor editor = (TreeEditor) no.getObject(); @@ -174,6 +177,11 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { te.setNodeOrDict(editor.getTreeNodeAttr()); te.setPerformanceFirst(editor.isPerformanceFirst()); } + } else { + LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject(); + te.setAutoBuild(false); + te.setLayerBuild(true); + te.setLayerConfigs(Arrays.asList(configs)); } return te; } @@ -206,15 +214,17 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { if (buildBox.getSelectedIndex() == 1) { TableDataDictionary dictionary = this.autoBuildPane.update(); tcb.setAutoBuild(true); - tcb.setDictionary(dictionary); - tcb.setNodeOrDict(dictionary); - } else if (buildBox.getSelectedIndex() == 2) { - tcb.setAutoBuild(false); - NameObject no = this.controlPane.update(); - if (no != null) { - if (no.getObject() instanceof TreeComboBoxEditor) { - return (TreeComboBoxEditor) no.getObject(); - } + tcb.setLayerBuild(false); + tcb.setDictionary(dictionary); + tcb.setNodeOrDict(dictionary); + } else if (buildBox.getSelectedIndex() == 2) { + tcb.setAutoBuild(false); + tcb.setLayerBuild(false); + NameObject no = this.controlPane.update(); + if (no != null) { + if (no.getObject() instanceof TreeComboBoxEditor) { + return (TreeComboBoxEditor) no.getObject(); + } TreeEditor editor = (TreeEditor) no.getObject(); tcb.setAllowBlank(editor.isAllowBlank()); @@ -230,7 +240,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI { tcb.setNodeOrDict(editor.getTreeNodeAttr()); tcb.setPerformanceFirst(editor.isPerformanceFirst()); } - } + }else { + LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject(); + tcb.setAutoBuild(false); + tcb.setLayerBuild(true); + tcb.setLayerConfigs(Arrays.asList(configs)); + } return tcb; } diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 8df23d70d9..2a3fa28d35 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -138,8 +138,31 @@ public abstract class ToolBarMenuDock { // 添加帮助菜单 menuList.add(createHelpMenuDef()); + // 添加社区菜单 + addCommunityMenuDef(menuList); + return menuList.toArray(new MenuDef[menuList.size()]); } + + public void addCommunityMenuDef(java.util.List menuList){ + Locale locale = FRContext.getLocale(); + Locale [] locales =supportCommunityLocales(); + for(int i = 0; i < locales.length; i++) { + if(locale.equals(locales[i])){ + menuList.add(createCommunityMenuDef()); + break; + } + } + } + + public Locale[] supportCommunityLocales() { + return new Locale[]{ + Locale.CHINA, + Locale.JAPAN, + Locale.TAIWAN, + Locale.US, + }; + } public void insertTemplateExtendMenu(ToolBarMenuDockPlus plus, MenuDef[] menuDefs) { // 给菜单加插件入口 diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 3515be8f24..0b76dd2d75 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -485,7 +485,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh extraChartDesignInterfaceList.add(tagName); } if (IndependentChartUIProvider.XML_TAG.equals(tagName)) { - addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.CHART_PRIORITY),reader.getAttrAsString("plotID", ""), simplify); + addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.DEFAULT_PRIORITY),reader.getAttrAsString("plotID", ""), simplify); } } } diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java index fe2107fb42..8ba1bb4319 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java @@ -27,13 +27,22 @@ import java.util.Iterator; * Time : 上午9:16 */ public class DataSeriesConditionPane extends ConditionAttributesPane { + protected Plot plot; - - public DataSeriesConditionPane() { + public DataSeriesConditionPane(Plot plot) { + this.plot = plot; initAvailableActionList(); initComponents(); } + public void setPlot(Plot plot) { + this.plot = plot; + } + + public DataSeriesConditionPane() { + this(null); + } + private void initAvailableActionList() { addBasicAction(); addAxisPositionAction(); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java index 1cfdb220f0..6afc7b7d76 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java @@ -432,7 +432,7 @@ public class ChartDatapointLabelPane extends BasicPane{ this.percentFormatPane = new FormatPane(); } if(this.percentFormat == null){ - DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat(), "#.##%"); + DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat("#.##%"), "#.##%"); percentFormatPane.populateBean(defaultFormat); this.percentFormat = defaultFormat; } diff --git a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java index 9f53dddcce..f69771a54a 100644 --- a/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java +++ b/designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java @@ -21,6 +21,7 @@ import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout; +import com.fr.general.ComparatorUtils; public class WidgetPropertyTable extends AbstractPropertyTable { @@ -71,7 +72,7 @@ public class WidgetPropertyTable extends AbstractPropertyTable { if (size == 0 || size == 1) { XCreator creator = size == 0 ? designer.getRootComponent() : designer.getSelectionModel().getSelection() .getSelectedCreator(); - if (designer.isRoot(creator)) { + if (ComparatorUtils.equals(creator, designer.getRootComponent())) { groups = designer.getDesignerMode().createRootDesignerPropertyGroup(); } else { groups = getCreatorPropertyGroup(designer, creator); diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 6f5fe2a473..a3b197e91d 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -853,7 +853,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection * @return 是则返回true */ public boolean isRoot(XCreator comp) { - return comp == rootComponent; + return comp == rootComponent || comp.acceptType(XWAbsoluteBodyLayout.class); } // 计算鼠标事件e所发生的位置相对根组件的位置关系