|
|
@ -3,6 +3,7 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package com.fr.design.designer.beans.adapters.layout; |
|
|
|
package com.fr.design.designer.beans.adapters.layout; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.beans.GroupModel; |
|
|
|
import com.fr.design.beans.GroupModel; |
|
|
|
import com.fr.design.designer.beans.ConstraintsGroupModel; |
|
|
|
import com.fr.design.designer.beans.ConstraintsGroupModel; |
|
|
|
import com.fr.design.designer.beans.HoverPainter; |
|
|
|
import com.fr.design.designer.beans.HoverPainter; |
|
|
@ -18,6 +19,7 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout; |
|
|
|
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; |
|
|
|
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; |
|
|
|
import com.fr.design.designer.properties.FRFitLayoutConstraints; |
|
|
|
import com.fr.design.designer.properties.FRFitLayoutConstraints; |
|
|
|
import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; |
|
|
|
import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel; |
|
|
|
|
|
|
|
import com.fr.design.fun.FormWidgetOptionProvider; |
|
|
|
import com.fr.design.utils.ComponentUtils; |
|
|
|
import com.fr.design.utils.ComponentUtils; |
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
import com.fr.form.ui.LayoutBorderStyle; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
@ -32,6 +34,7 @@ import java.awt.Dimension; |
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 自适应布局的容器适配器 |
|
|
|
* 自适应布局的容器适配器 |
|
|
@ -161,7 +164,8 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { |
|
|
|
|
|
|
|
|
|
|
|
//布局控件要先判断是不是可编辑
|
|
|
|
//布局控件要先判断是不是可编辑
|
|
|
|
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); |
|
|
|
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); |
|
|
|
if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) { |
|
|
|
boolean access = topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class) && !isExtraContainer(comp); |
|
|
|
|
|
|
|
if (access) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -178,6 +182,18 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { |
|
|
|
return y > upHeight && y < downHeight ? horizonValid : verticalValid; |
|
|
|
return y > upHeight && y < downHeight ? horizonValid : verticalValid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isExtraContainer(Component comp) { |
|
|
|
|
|
|
|
if (container != null) { |
|
|
|
|
|
|
|
Set<FormWidgetOptionProvider> set = ExtraDesignClassManager.getInstance().getArray(FormWidgetOptionProvider.XML_TAG); |
|
|
|
|
|
|
|
for (FormWidgetOptionProvider provider : set) { |
|
|
|
|
|
|
|
if (provider.isContainer() && ComparatorUtils.equals(provider.appearanceForWidget(), comp.getClass())) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 间隔区域
|
|
|
|
// 间隔区域
|
|
|
|
private boolean checkInterval(Component comp) { |
|
|
|
private boolean checkInterval(Component comp) { |
|
|
|
return container.getComponentCount() > 0 && comp == container; |
|
|
|
return container.getComponentCount() > 0 && comp == container; |
|
|
|