@ -111,12 +111,7 @@ public class PolyBlockProperTable extends JPanel {
if ( isPopulating | | block = = null ) {
if ( isPopulating | | block = = null ) {
return ;
return ;
}
}
if ( blockPropertyPane . getWidgetNameField ( ) ! = null ) {
setBlockName ( block ) ;
String toSetWidgetName = blockPropertyPane . getWidgetNameField ( ) . getText ( ) ;
if ( isBlockNameValid ( toSetWidgetName , block . getBlockName ( ) ) ) {
block . setBlockName ( toSetWidgetName ) ;
}
}
PolyBoundsGroup boundsgroup = new PolyBoundsGroup ( block , designer . getTarget ( ) ) ;
PolyBoundsGroup boundsgroup = new PolyBoundsGroup ( block , designer . getTarget ( ) ) ;
boundsgroup . setValue ( x . getValue ( ) , 0 , 1 ) ;
boundsgroup . setValue ( x . getValue ( ) , 0 , 1 ) ;
boundsgroup . setValue ( y . getValue ( ) , 1 , 1 ) ;
boundsgroup . setValue ( y . getValue ( ) , 1 , 1 ) ;
@ -125,6 +120,18 @@ public class PolyBlockProperTable extends JPanel {
firePropertyEdit ( ) ;
firePropertyEdit ( ) ;
}
}
public void setBlockName ( TemplateBlock block ) {
if ( isPopulating | | block = = null | | blockPropertyPane = = null ) {
return ;
}
if ( blockPropertyPane . getWidgetNameField ( ) ! = null ) {
String toSetWidgetName = blockPropertyPane . getWidgetNameField ( ) . getText ( ) ;
if ( isBlockNameValid ( toSetWidgetName , block . getBlockName ( ) ) ) {
block . setBlockName ( toSetWidgetName ) ;
}
}
}
/ * *
/ * *
* 校验一下要设置的名称 , 不能为空 , 不能重名
* 校验一下要设置的名称 , 不能为空 , 不能重名
*
*