|
|
|
@ -71,6 +71,7 @@ import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
|
|
|
|
|
import com.fr.form.ui.container.cardlayout.WCardTagLayout; |
|
|
|
|
import com.fr.form.ui.container.cardlayout.WCardTitleLayout; |
|
|
|
|
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.invoke.Reflect; |
|
|
|
@ -82,6 +83,7 @@ import com.fr.plugin.observer.PluginEvent;
|
|
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.third.javax.annotation.Nonnull; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
@ -446,4 +448,28 @@ public class XCreatorUtils {
|
|
|
|
|
|
|
|
|
|
return xCreator; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean isExtraContainer(XCreator creator) { |
|
|
|
|
Set<FormWidgetOptionProvider> set = ExtraDesignClassManager.getInstance().getArray(FormWidgetOptionProvider.XML_TAG); |
|
|
|
|
for (FormWidgetOptionProvider provider : set) { |
|
|
|
|
if (provider.isContainer() |
|
|
|
|
&& ComparatorUtils.equals(provider.appearanceForWidget(), provider.appearanceForWidget()) |
|
|
|
|
&& ComparatorUtils.equals(provider.classForWidget(), creator.toData().getClass())) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static XLayoutContainer getParent(XCreator source) { |
|
|
|
|
if (source.acceptType(XWCardTagLayout.class) ) { |
|
|
|
|
return (XLayoutContainer)source.getParent(); |
|
|
|
|
} |
|
|
|
|
XLayoutContainer container = XCreatorUtils.getParentXLayoutContainer(source); |
|
|
|
|
boolean accept = (source.acceptType(XWFitLayout.class) || source.acceptType(XWParameterLayout.class)) && !isExtraContainer(source); |
|
|
|
|
if (accept) { |
|
|
|
|
container = null; |
|
|
|
|
} |
|
|
|
|
return container; |
|
|
|
|
} |
|
|
|
|
} |