|
|
|
@ -10,14 +10,21 @@ import com.fr.design.mainframe.share.collect.ComponentCollector;
|
|
|
|
|
import com.fr.design.mainframe.share.collect.SharableCollectorManager; |
|
|
|
|
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; |
|
|
|
|
import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler; |
|
|
|
|
import com.fr.design.mainframe.share.ui.block.LocalWidgetBlock; |
|
|
|
|
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; |
|
|
|
|
import com.fr.design.mainframe.share.util.ShareComponentUtils; |
|
|
|
|
import com.fr.design.share.utils.EffectItemUtils; |
|
|
|
|
import com.fr.form.share.ShareLoader; |
|
|
|
|
import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; |
|
|
|
|
import com.fr.form.share.encrypt.engine.ClazzCreatorFactory; |
|
|
|
|
import com.fr.form.ui.AbstractBorderStyleWidget; |
|
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
|
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.json.JSONArray; |
|
|
|
|
import com.fr.stable.EnvChangedListener; |
|
|
|
|
import com.fr.stable.bridge.BridgeMark; |
|
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@ -27,6 +34,7 @@ public class SharableManager {
|
|
|
|
|
listenEnv(); |
|
|
|
|
ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); |
|
|
|
|
ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance()); |
|
|
|
|
registerSharableEncryptDefinePanes(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void saveTemplate(JTemplate jt) { |
|
|
|
@ -61,4 +69,25 @@ public class SharableManager {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void registerSharableEncryptDefinePane(Class<? extends Widget> mainClazz) { |
|
|
|
|
String newClazzName = ClazzCreatorFactory.getInstance().createName(mainClazz); |
|
|
|
|
Class<? extends Widget> newClazz; |
|
|
|
|
try { |
|
|
|
|
newClazz = (Class<? extends Widget>) Class.forName(newClazzName, false, mainClazz.getClassLoader()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
newClazz = (Class<? extends Widget>) ClazzCreatorFactory.getInstance().newSharableClazz(mainClazz.getClassLoader(), mainClazz); |
|
|
|
|
} |
|
|
|
|
if (FormWidgetDefinePaneFactoryBase.getDefinePane(newClazz) == null) { |
|
|
|
|
FormWidgetDefinePaneFactoryBase.registerDefinePane(newClazz, FormWidgetDefinePaneFactoryBase.getDefinePane(mainClazz)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void registerSharableEncryptDefinePanes() { |
|
|
|
|
registerSharableEncryptDefinePane(ElementCaseEditor.class); |
|
|
|
|
registerSharableEncryptDefinePane(StableFactory.getMarkedClass(BridgeMark.CHART_EDITOR, AbstractBorderStyleWidget.class)); |
|
|
|
|
registerSharableEncryptDefinePane(WAbsoluteLayout.class); |
|
|
|
|
registerSharableEncryptDefinePane(WCardMainBorderLayout.class); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|