diff --git a/designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java index a31999f68..d929399d4 100644 --- a/designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java @@ -62,7 +62,7 @@ public abstract class DedicateLayoutContainer extends XLayoutContainer { public void resetCreatorName(String name) { super.resetCreatorName(name); XCreator child = getXCreator(XWScaleLayout.INDEX); - //TODO 这里是怎么实现改名的 + //实现WTitleLayout的SetWidgetName child.toData().setWidgetName(name); } diff --git a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java index e96080e4d..8816e1c8b 100644 --- a/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer_form/src/com/fr/design/mainframe/FormSelectionUtils.java @@ -121,10 +121,10 @@ public class FormSelectionUtils { private static Widget copyWidget(FormDesigner formDesigner, XCreator xCreator) throws CloneNotSupportedException { - ArrayList clonedNameList = new ArrayList(); + ArrayList nameSpace = new ArrayList(); Widget copied = (Widget) xCreator.toData().clone(); //重命名拷贝的组件 - String name = getCopiedName(formDesigner, copied, clonedNameList); + String name = getCopiedName(formDesigner, copied, nameSpace); if (copied instanceof WTitleLayout) { XWTitleLayout xwTitleLayout = new XWTitleLayout((WTitleLayout) copied, xCreator.getSize()); xwTitleLayout.resetCreatorName(name); @@ -144,15 +144,15 @@ public class FormSelectionUtils { * * @param formDesigner * @param copied - * @param clonedNameList + * @param nameSpace * @return name */ - private static String getCopiedName(FormDesigner formDesigner, Widget copied, ArrayList clonedNameList) { + private static String getCopiedName(FormDesigner formDesigner, Widget copied, ArrayList nameSpace) { String name = copied.getWidgetName(); do { name += postfix; - } while (formDesigner.getTarget().isNameExist(name) || clonedNameList.contains(name)); - clonedNameList.add(name); + } while (formDesigner.getTarget().isNameExist(name) || nameSpace.contains(name)); + nameSpace.add(name); return name; }