|
|
|
@ -16,6 +16,7 @@ import com.fr.design.utils.ComponentUtils;
|
|
|
|
|
import com.fr.env.utils.DesignerInteractionHistory; |
|
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; |
|
|
|
|
import com.fr.form.ui.container.WBorderLayout; |
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
|
|
|
|
@ -129,11 +130,10 @@ public abstract class AccessDirection implements Direction {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private WAbsoluteLayout getLayout(final FormDesigner designer){ |
|
|
|
|
XLayoutContainer formLayoutContainer = (XLayoutContainer) XCreatorUtils.createXCreator( |
|
|
|
|
designer.getTarget().getContainer()); |
|
|
|
|
private WAbsoluteLayout getLayout(final FormDesigner designer) { |
|
|
|
|
WAbsoluteLayout layout; |
|
|
|
|
if (formLayoutContainer.acceptType(XWBorderLayout.class)) {//看起来这边的作用应该是为了区别cpt(得到XWParameterLayout)还是frm(得到XWBorderLayout)的参数界面
|
|
|
|
|
//看起来这边的作用应该是为了区别cpt(得到XWParameterLayout)还是frm(得到XWBorderLayout)的参数界面
|
|
|
|
|
if (designer.getTarget().getContainer().acceptType(WBorderLayout.class)) { |
|
|
|
|
Container container = designer.getSelectionModel().getSelection().getSelectedCreator().getParent(); |
|
|
|
|
if (container instanceof XWAbsoluteLayout) { |
|
|
|
|
layout = ((XWAbsoluteLayout) container).toData(); |
|
|
|
@ -161,13 +161,13 @@ public abstract class AccessDirection implements Direction {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
//设定控件最小高度21,因每次拖曳至少移动1,防止控件高度等于21时,拖曳导致rec.y的变化使得控件不停的向上或向下移动。
|
|
|
|
|
if(rec.height == MINHEIGHT){ |
|
|
|
|
if (rec.height == MINHEIGHT) { |
|
|
|
|
ymin = rec.y; |
|
|
|
|
} |
|
|
|
|
if(rec.height == MINHEIGHT - 1){ |
|
|
|
|
if (rec.height == MINHEIGHT - 1) { |
|
|
|
|
ymin = ymin == rec.y ? rec.y : rec.y - 1; |
|
|
|
|
} |
|
|
|
|
if(rec.height < MINHEIGHT){ |
|
|
|
|
if (rec.height < MINHEIGHT) { |
|
|
|
|
rec.height = MINHEIGHT; |
|
|
|
|
rec.y = ymin; |
|
|
|
|
} |
|
|
|
@ -175,7 +175,7 @@ public abstract class AccessDirection implements Direction {
|
|
|
|
|
if (rec.width == MINWIDTH) { |
|
|
|
|
xmin = rec.x; |
|
|
|
|
} |
|
|
|
|
if(rec.width == MINWIDTH - 1){ |
|
|
|
|
if (rec.width == MINWIDTH - 1) { |
|
|
|
|
xmin = xmin == rec.x ? rec.x : rec.x - 1; |
|
|
|
|
} |
|
|
|
|
if (rec.width < MINWIDTH) { |
|
|
|
|