@ -7,6 +7,7 @@ import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.LayoutAdapter ;
import com.fr.design.designer.beans.LayoutAdapter ;
import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter ;
import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter ;
import com.fr.design.designer.beans.events.DesignerEvent ;
import com.fr.design.designer.beans.events.DesignerEvent ;
import com.fr.design.designer.beans.models.ModelUtil ;
import com.fr.design.designer.beans.models.SelectionModel ;
import com.fr.design.designer.beans.models.SelectionModel ;
import com.fr.design.designer.creator.CRPropertyDescriptor ;
import com.fr.design.designer.creator.CRPropertyDescriptor ;
import com.fr.design.designer.creator.XCreator ;
import com.fr.design.designer.creator.XCreator ;
@ -21,6 +22,7 @@ import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.editors.BooleanEditor ;
import com.fr.design.mainframe.widget.editors.BooleanEditor ;
import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor ;
import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor ;
import com.fr.design.mainframe.widget.editors.DoubleEditor ;
import com.fr.design.mainframe.widget.editors.DoubleEditor ;
import com.fr.form.main.Form ;
import com.fr.form.ui.CardAddButton ;
import com.fr.form.ui.CardAddButton ;
import com.fr.form.ui.CardSwitchButton ;
import com.fr.form.ui.CardSwitchButton ;
import com.fr.form.ui.LayoutBorderStyle ;
import com.fr.form.ui.LayoutBorderStyle ;
@ -39,6 +41,7 @@ import com.fr.general.cardtag.DefaultTemplateStyle;
import com.fr.general.cardtag.TemplateStyle ;
import com.fr.general.cardtag.TemplateStyle ;
import com.fr.stable.ArrayUtils ;
import com.fr.stable.ArrayUtils ;
import com.fr.stable.Constants ;
import com.fr.stable.Constants ;
import com.fr.stable.StringUtils ;
import com.fr.stable.core.PropertyChangeAdapter ;
import com.fr.stable.core.PropertyChangeAdapter ;
import javax.swing.border.Border ;
import javax.swing.border.Border ;
@ -246,7 +249,13 @@ public class XWCardLayout extends XLayoutContainer {
* /
* /
@Override
@Override
protected void setWrapperName ( XLayoutContainer parentPanel , String widgetName ) {
protected void setWrapperName ( XLayoutContainer parentPanel , String widgetName ) {
parentPanel . toData ( ) . setWidgetName ( "tablayout" + widgetName . replaceAll ( createDefaultName ( ) , "" ) ) ;
FormDesigner formDesigner = WidgetPropertyPane . getInstance ( ) . getEditingFormDesigner ( ) ;
Form form = formDesigner . getTarget ( ) ;
String name = "tablayout" + widgetName . replaceAll ( createDefaultName ( ) , StringUtils . EMPTY ) ;
if ( form . isNameExist ( name ) ) {
name = ModelUtil . uniqueName ( formDesigner . getTarget ( ) , parentPanel . createDefaultName ( ) ) ;
}
parentPanel . toData ( ) . setWidgetName ( name ) ;
}
}
/ * *
/ * *