|
|
|
@ -1,29 +1,30 @@
|
|
|
|
|
package com.fr.design.widget; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.gui.controlpane.UIListGroupControlPane; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.CellWidgetPropertyPane; |
|
|
|
|
import com.fr.design.write.submit.DBManipulationPane; |
|
|
|
|
import com.fr.design.write.submit.SmartInsertDBManipulationInWidgetEventPane; |
|
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
|
import com.fr.design.gui.controlpane.UIListGroupControlPane; |
|
|
|
|
import com.fr.design.gui.frpane.ListenerUpdatePane; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.javascript.JavaScriptActionPane; |
|
|
|
|
import com.fr.design.mainframe.CellWidgetPropertyPane; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.design.write.submit.DBManipulationPane; |
|
|
|
|
import com.fr.design.write.submit.SmartInsertDBManipulationInWidgetEventPane; |
|
|
|
|
import com.fr.form.event.Listener; |
|
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
|
import com.fr.grid.selection.Selection; |
|
|
|
|
|
|
|
|
|
import com.fr.general.NameObject; |
|
|
|
|
import com.fr.grid.selection.CellSelection; |
|
|
|
|
import com.fr.grid.selection.Selection; |
|
|
|
|
import com.fr.js.Commit2DBJavaScript; |
|
|
|
|
import com.fr.stable.AssistUtils; |
|
|
|
|
import com.fr.stable.Nameable; |
|
|
|
|
import com.fr.write.JavaScriptResourceInfo; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
|
|
|
|
|
|
public class WidgetEventPane extends UIListGroupControlPane { |
|
|
|
|
private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1); |
|
|
|
@ -32,6 +33,8 @@ public class WidgetEventPane extends UIListGroupControlPane {
|
|
|
|
|
|
|
|
|
|
private ElementCasePane object; |
|
|
|
|
|
|
|
|
|
private Widget targetWidget; |
|
|
|
|
|
|
|
|
|
public WidgetEventPane(ElementCasePane pane) { |
|
|
|
|
this.object = pane; |
|
|
|
|
if (pane != null) { |
|
|
|
@ -125,14 +128,17 @@ public class WidgetEventPane extends UIListGroupControlPane {
|
|
|
|
|
if (widget == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.targetWidget = widget; |
|
|
|
|
refreshPane(widget, EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新 |
|
|
|
|
* |
|
|
|
|
* @return 监听器 |
|
|
|
|
*/ |
|
|
|
|
public Listener[] updateListeners() { |
|
|
|
|
public Listener[] updateListeners(Widget widget) { |
|
|
|
|
this.targetWidget = widget; |
|
|
|
|
Nameable[] res = this.update(); |
|
|
|
|
Listener[] res_array = new Listener[res.length]; |
|
|
|
|
for (int i = 0, len = res.length; i < len; i++) { |
|
|
|
@ -181,6 +187,14 @@ public class WidgetEventPane extends UIListGroupControlPane {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void wrapperListener(Listener listener) { |
|
|
|
|
if (listener.getAction() instanceof Commit2DBJavaScript) { |
|
|
|
|
Commit2DBJavaScript commit2DBJavaScript = (Commit2DBJavaScript) listener.getAction(); |
|
|
|
|
commit2DBJavaScript.setJsResourceInfo(new JavaScriptResourceInfo(JavaScriptResourceInfo.Type.WIDGET, targetWidget.getWidgetName())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected String getWrapperLabelText() { |
|
|
|
|
return Toolkit.i18nText("Fine-Design_Report_Event"); |
|
|
|
|
} |
|
|
|
|