|
|
@ -1,16 +1,23 @@ |
|
|
|
package com.fr.design.mainframe; |
|
|
|
package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
|
|
|
|
import com.fr.design.fun.CellWidgetOptionProvider; |
|
|
|
import com.fr.design.gui.core.UserDefinedWidgetOption; |
|
|
|
import com.fr.design.gui.core.UserDefinedWidgetOption; |
|
|
|
import com.fr.design.gui.core.WidgetOption; |
|
|
|
import com.fr.design.gui.core.WidgetOption; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
import com.fr.form.ui.*; |
|
|
|
import com.fr.form.ui.*; |
|
|
|
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
import com.fr.plugin.context.PluginContext; |
|
|
|
|
|
|
|
import com.fr.plugin.injectable.PluginModule; |
|
|
|
|
|
|
|
import com.fr.plugin.manage.PluginFilter; |
|
|
|
|
|
|
|
import com.fr.plugin.observer.PluginEvent; |
|
|
|
|
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
@ -34,14 +41,33 @@ public class FormParaPane extends JPanel { |
|
|
|
private static final int TOOLTIP_X = 5; |
|
|
|
private static final int TOOLTIP_X = 5; |
|
|
|
private static final int TOOLTIP_Y = 10; |
|
|
|
private static final int TOOLTIP_Y = 10; |
|
|
|
private static Dimension originalSize; |
|
|
|
private static Dimension originalSize; |
|
|
|
private static FormParaPane THIS; |
|
|
|
|
|
|
|
|
|
|
|
private static volatile FormParaPane THIS; |
|
|
|
private java.util.List<WidgetOption> predifinedwidgeList = new ArrayList<WidgetOption>(); |
|
|
|
private java.util.List<WidgetOption> predifinedwidgeList = new ArrayList<WidgetOption>(); |
|
|
|
private UIButton predefineButton; |
|
|
|
private UIButton predefineButton; |
|
|
|
private FormWidgetPopWindow predifinedWindow; |
|
|
|
private FormWidgetPopWindow predifinedWindow; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private FormDesigner designer; |
|
|
|
private FormDesigner designer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static { |
|
|
|
|
|
|
|
GeneralContext.listenPluginRunningChanged(new PluginEventListener() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
THIS = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, new PluginFilter() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean accept(PluginContext context) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return context.contain(PluginModule.ExtraDesign, CellWidgetOptionProvider.XML_TAG); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static final FormParaPane getInstance(FormDesigner designer) { |
|
|
|
public static final FormParaPane getInstance(FormDesigner designer) { |
|
|
|
if(THIS == null) { |
|
|
|
if(THIS == null) { |
|
|
|
THIS = new FormParaPane(); |
|
|
|
THIS = new FormParaPane(); |
|
|
|