|
|
|
@ -4,6 +4,7 @@ import com.fr.design.beans.location.Absorptionline;
|
|
|
|
|
import com.fr.design.designer.beans.AdapterBus; |
|
|
|
|
import com.fr.design.designer.beans.HoverPainter; |
|
|
|
|
import com.fr.design.designer.beans.LayoutAdapter; |
|
|
|
|
import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter; |
|
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
|
import com.fr.design.designer.beans.location.Direction; |
|
|
|
|
import com.fr.design.designer.beans.location.Location; |
|
|
|
@ -136,6 +137,14 @@ public class StateModel {
|
|
|
|
|
private boolean addBean(XLayoutContainer container, int mouseX, int mouseY) { |
|
|
|
|
LayoutAdapter adapter = container.getLayoutAdapter(); |
|
|
|
|
Rectangle rectangleContainer = ComponentUtils.getRelativeBounds(container); |
|
|
|
|
// 判断是否能把控件从表单布局中拖拽到参数面板中
|
|
|
|
|
if (adapter instanceof FRParameterLayoutAdapter) { |
|
|
|
|
for (XCreator xCreator : selectionModel.getSelection().getSelectedCreators()) { |
|
|
|
|
if (!xCreator.canEnterIntoParaPane()) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (selectionModel.getSelection().size() == 1) { |
|
|
|
|
return adapter.addBean(selectionModel.getSelection().getSelectedCreator(), |
|
|
|
|
mouseX + designer.getArea().getHorizontalValue() - rectangleContainer.x, |
|
|
|
|