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