All Downloads are FREE. Search and download functionalities are using the official Maven repository.

extensions.Events.ext Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
import guidesign;
import pom;

extension extensions::XMAComponent;
extension extensions::XMAComposite;
extension extensions::XMAFunction;
extension extensions::XMAPage;
extension org::openxma::dsl::common::extensions::LogUtil;
/**
 * Create the event-mapping of a component
 */
Void extendEventMappingForComponent(EventMappingList eventMappingList, XMAComponent c):
JAVA org.openxma.dsl.generator.helper.EventExtension.extendEventMappingForComponent(org.openxma.dsl.pom.model.EventMappingList,at.spardat.xma.guidesign.XMAComponent);


/**
 * Create all event-mapping of a page
 */
cached EventMappingList extendEventMappingForPage(EventMappingList eventMappingList, Page page, XMAComponent c):

	let xmaPage = c.findXMAPage(page):
	
	// InitEventMapping and Page
	if (eventMappingList != null) then ( 
		eventMappingList.createInitEventMapping(c,xmaPage)->	
		eventMappingList.mapping.typeSelect(ControlEventMapping).createControlEventMapping(c,xmaPage))->		
		
	eventMappingList;

/**
 * Create init-event-mapping of a page
 */
Void createInitEventMapping(EventMappingList eventMappingList, XMAComponent c, XMAPage p):
JAVA org.openxma.dsl.generator.helper.EventExtension.createInitEventMapping(org.openxma.dsl.pom.model.EventMappingList,at.spardat.xma.guidesign.XMAComponent,at.spardat.xma.guidesign.XMAPage);
	
/**
 * Call event-mapping for widgets. Determine the XMA-widget and pass it
 * to the creation method.
 */
guidesign::XMAWidget createControlEventMapping(ControlEventMapping eventMapping, XMAComponent c, XMAPage p):
	error("Default implementation of function 'extendEventMapping' used for "+eventMapping);		
guidesign::XMAWidget createControlEventMapping(XMAWidgetEventMapping eventMapping, XMAComponent c, XMAPage p):
	let w = p.getWidgetForName(eventMapping.control.namInstance):
	createWidgetEventMapping(w,eventMapping,c,p);
guidesign::XMAWidget createControlEventMapping(GuiElementEventMapping eventMapping, XMAComponent c, XMAPage p):
	(MenuItem.isInstance(eventMapping.control)) 
	? ( 
	    createMenuEventMapping(eventMapping,c,p)
	)
	: (
	    let w = p.getWidgetForGuiElementWithEvent(eventMapping.control):
	    createWidgetEventMapping(w,eventMapping,c,p)
	);
	
	
guidesign::XMAWidget getWidgetForGuiElementWithEvent(XMAPage p ,IGuiElementWithEvent e):
JAVA org.openxma.dsl.generator.helper.EventExtension.getWidgetForGuiElementWithEvent(at.spardat.xma.guidesign.XMAPage, org.openxma.dsl.pom.model.IGuiElementWithEvent);

/**
 * Create event-mapping for widgets.
 */
guidesign::XMAWidget createWidgetEventMapping(XMAWidget w, ControlEventMapping eventMapping, XMAComponent c, XMAPage p):
JAVA org.openxma.dsl.generator.helper.EventExtension.createWidgetEventMapping(at.spardat.xma.guidesign.XMAWidget,org.openxma.dsl.pom.model.ControlEventMapping,at.spardat.xma.guidesign.XMAComponent,at.spardat.xma.guidesign.XMAPage);

Void createMenuEventMapping(GuiElementEventMapping eventMapping, XMAComponent c, XMAPage p):
JAVA org.openxma.dsl.generator.helper.EventExtension.createMenuEventMapping(org.openxma.dsl.pom.model.GuiElementEventMapping,at.spardat.xma.guidesign.XMAComponent,at.spardat.xma.guidesign.XMAPage);

guidesign::XMAWidget setEventFunction(XMAWidget w, EventType ev, flex::XMAFunction xmaFunction):
JAVA org.openxma.dsl.generator.helper.EventExtension.setEventFunction(at.spardat.xma.guidesign.XMAWidget, org.openxma.dsl.pom.model.EventType,at.spardat.xma.guidesign.flex.XMAFunction);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy