|
|
|
@ -57,6 +57,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; |
|
|
|
@ -68,6 +69,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; |
|
|
|
@ -375,4 +377,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; |
|
|
|
|
} |
|
|
|
|
} |