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

extensions.Widgets.ext Maven / Gradle / Ivy

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

extension extensions::Validation;
extension extensions::Field;
extension extensions::FieldFlags;
extension extensions::XMAPage;
extension extensions::XMAComposite;
extension extensions::SimpleTypeExtension;
extension org::openxma::dsl::common::extensions::LogUtil;


/**
 * Default implementation, should never be called at runtime.
 */
List[emf::EObject] createWidgetsForGuiElement(GuiElement guiElement, XMAComposite parentXMAComposite, List businessDataList):
	error("Default implementation for 'createWidgetsForGuiElement(GuiElement guiElement,...' called for "+guiElement.id())->
	null;

/**
 * Set the LayoutData from Xmadsl as a property to the xmaWidget to be able to
 * use it for generation of the XMA Formlayout
 */
Void setLayoutDataPropertyFromGuiElement(XMAWidget xmaWidget, GuiElement guiElement):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.setLayoutDataPropertyFromGuiElement(at.spardat.xma.guidesign.XMAWidget,
			org.openxma.dsl.pom.model.GuiElement);
			
List[XMAWidget] getGeneratedXMAWidgetsForGuiElement(GuiElement guiElement):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.getGeneratedXMAWidgetsForGuiElement(org.openxma.dsl.pom.model.GuiElement);						
			
/**
 * Create nested composite
 */
List[emf::EObject] createWidgetsForGuiElement(ReferencedXMAComposite composite, XMAComposite parentXMAComposite, List businessDataList):
	(composite.referencingPageComposite && composite.content != null)
		? composite.content.elements.createWidgetsForGuiElement(parentXMAComposite,businessDataList)		 
		: null;			

/**
 * Create nested composite
 */
List[emf::EObject] createWidgetsForGuiElement(XmadslComposite composite, XMAComposite parentXMAComposite, List businessDataList):

	let newComposite = composite.createXMAComposite():
	let objectToBeAddedToParent = (newComposite.eContainer != null)
		? newComposite.eContainer
		: newComposite:

	parentXMAComposite.controls.add(objectToBeAddedToParent)->

	newComposite.extendComposite(composite,businessDataList)->

	{objectToBeAddedToParent};
	
/**
 * Create nested tabfolder
 */
List[emf::EObject] createWidgetsForGuiElement(TabFolder tabFolder, XMAComposite parentXMAComposite, List businessDataList):

	let newTabFolder = tabFolder.createXMATabFolder():

	parentXMAComposite.controls.add(newTabFolder)->

	newTabFolder.extendTabFolder(tabFolder,businessDataList)->
	{newTabFolder};	
	
/**
 * Create SashForm
 */
List[emf::EObject] createWidgetsForGuiElement(pom::SplitPanel splitPanel, XMAComposite parentXMAComposite, List businessDataList):
    
	let newSashForm = splitPanel.createXMASashForm():    
    
	newSashForm.setRatLeftChildSize(splitPanel.splitPosition)->
	parentXMAComposite.controls.add(newSashForm)->
	
	(splitPanel.orientation == pom::Orientation::VERTICAL)
		? newSashForm.setCodSplitDirection(guidesign::types::SplitDirectionType::VERTICAL)
		: newSashForm.setCodSplitDirection(guidesign::types::SplitDirectionType::HORIZONTAL)->		
	
	createWidgetsForSplitPanelContent(splitPanel,newSashForm,businessDataList)->	
	
	{newSashForm};			
	
/**
 * Create nested composite
 */
List[emf::EObject] createWidgetsForSplitPanelContent(SplitPanel splitPanel, XMASashForm parentSashForm, List businessDataList):

	let firstComposite = splitPanel.firstPanel.createXMAComposite():
	let firstObjectToBeAddedToParent = (firstComposite.eContainer != null)
		? firstComposite.eContainer
		: firstComposite:
		
	let secondComposite = splitPanel.secondPanel.createXMAComposite():
	let secondObjectToBeAddedToParent = (secondComposite.eContainer != null)
		? secondComposite.eContainer
		: secondComposite:

	parentSashForm.setLeftEl(firstObjectToBeAddedToParent)->
	parentSashForm.setRightEl(secondObjectToBeAddedToParent)->	

	firstComposite.extendComposite(splitPanel.firstPanel,businessDataList)->
    secondComposite.extendComposite(splitPanel.secondPanel,businessDataList)-> 	

	{firstComposite,secondComposite};	

XMALabel createXMALabel(Label label):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createXMALabel(org.openxma.dsl.pom.model.Label);

XMAWidget createXMAImage(Image image):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createXMAImage(org.openxma.dsl.pom.model.Image);

XMAText createXMAText(Text text):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createXMAText(org.openxma.dsl.pom.model.Text);

XMAComposite createXMAComposite(XmadslComposite composite):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createXMAComposite(org.openxma.dsl.pom.model.XmadslComposite);

XMATabFolder createXMATabFolder(TabFolder tabFolder):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createXMATabFolder(org.openxma.dsl.pom.model.TabFolder);

XMASashForm createXMASashForm(SplitPanel splitPanel):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createXMASashForm(org.openxma.dsl.pom.model.SplitPanel);

NotebookPage createNotebookPage(TabPage tabPage):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createNotebookPage(org.openxma.dsl.pom.model.TabPage);

XMAComposite createAndAddPageComposite(NotebookPage notebookPage, TabPage tabPage):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createAndAddPageComposite(at.spardat.xma.guidesign.NotebookPage,org.openxma.dsl.pom.model.TabPage);

/**
 * Create a Table
 */
List[emf::EObject] createWidgetsForGuiElement(Table table, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Table, at.spardat.xma.guidesign.XMAComposite, java.util.List);

/**
 * Create a TableCombo
 */
List[emf::EObject] createWidgetsForGuiElement(TableCombo table, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.TableCombo, at.spardat.xma.guidesign.XMAComposite, java.util.List);

/**
 * Create a ListBox
 */
List[emf::EObject] createWidgetsForGuiElement(ListBox listBox, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.ComplexTypeExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.ListBox, at.spardat.xma.guidesign.XMAComposite, java.util.List);

String getLabelString(LabelText labelText):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.getLabelString(org.openxma.dsl.pom.model.LabelText);	

/**
 * Create button
 */
List[emf::EObject] createWidgetsForGuiElement(Button button, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Button, at.spardat.xma.guidesign.XMAComposite, java.util.List);
	
/**
 * Create CheckBox
 */
List[emf::EObject] createWidgetsForGuiElement(pom::CheckBox button, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.CheckBox, at.spardat.xma.guidesign.XMAComposite, java.util.List);
	
/**
 * Create Tree
 */
List[emf::EObject] createWidgetsForGuiElement(pom::Tree tree, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Tree, at.spardat.xma.guidesign.XMAComposite, java.util.List);	

/**
 * Create Container
 */
List[emf::EObject] createWidgetsForGuiElement(pom::IncludePanel includePanel, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.IncludePanel, at.spardat.xma.guidesign.XMAComposite, java.util.List);	
	
/**
 * Create RadioButton
 */
List[emf::EObject] createWidgetsForGuiElement(pom::RadioButton button, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.RadioButton, at.spardat.xma.guidesign.XMAComposite, java.util.List);
	
/**
 * Create field
 */
List[emf::EObject] createWidgetsForGuiElement(CustomizeableField customizeableField, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.CustomizeableField, at.spardat.xma.guidesign.XMAComposite, java.util.List);	
	
/**
 * Create Seperator
 */
List[emf::EObject] createWidgetsForGuiElement(pom::Seperator seperator, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Seperator, at.spardat.xma.guidesign.XMAComposite, java.util.List);
			
/**
 * Create text
 */
List[emf::EObject] createWidgetsForGuiElement(Text text, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Text, at.spardat.xma.guidesign.XMAComposite, java.util.List);

/**
 * Create combo
 */
List[emf::EObject] createWidgetsForGuiElement(Combo combo, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Combo, at.spardat.xma.guidesign.XMAComposite, java.util.List);

/**
 * Create label
 */
List[emf::EObject] createWidgetsForGuiElement(Label label, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Label, at.spardat.xma.guidesign.XMAComposite, java.util.List);
	
/**
 * Create image
 */
List[emf::EObject] createWidgetsForGuiElement(Image image, XMAComposite parentXMAComposite, List businessDataList):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.createWidgetsForGuiElement(org.openxma.dsl.pom.model.Image, at.spardat.xma.guidesign.XMAComposite, java.util.List);


XMAWidget setGuiElementProperty(XMAWidget xmaWidget, emf::EObject obj):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.setGuiElementProperty(at.spardat.xma.guidesign.XMAWidget,org.eclipse.emf.ecore.EObject);

GuiElement getGuiElementProperty(XMAWidget xmaWidget):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.getGuiElementProperty(at.spardat.xma.guidesign.XMAWidget);

Void setSourceModelElementProperty(emf::EObject xmaWidget, emf::EObject obj):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.setSourceModelElementProperty(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject);

emf::EObject getSourceModelElementProperty(emf::EObject xmaWidget):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.getSourceModelElementProperty(org.eclipse.emf.ecore.EObject);

FieldPart getFieldPartProperty(XMAWidget xmaWidget):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.getFieldPartProperty(at.spardat.xma.guidesign.XMAWidget);

FieldPartSpecification getFieldPartSpecificationProperty(XMAWidget widget):
JAVA org.openxma.dsl.generator.helper.WidgetExtension.getFieldPartSpecificationProperty(at.spardat.xma.guidesign.XMAWidget);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy