Search in sources :

Example 1 with FooterComposite

use of org.talend.designer.hl7.ui.footer.FooterComposite in project tdi-studio-se by Talend.

the class HL7UI method createContent.

/**
     * Comment method "createContent".
     * 
     * @param child
     */
private void createContent(Composite mainComposite) {
    judgeRepository();
    header = new HeaderComposite(mainComposite, SWT.NONE, this.filePath, startChar, endChar, hl7Manager, this.isRepository);
    MsgToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
    MsgToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
    MsgToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
    addMessageViewer(MsgToSchemaSash, 300, 110);
    addSchemaViewer(MsgToSchemaSash, 400, 110);
    MsgToSchemaSash.setWeights(new int[] { 40, 60 });
    linker = new HL7Tree2SchemaLinker(this.MsgToSchemaSash, this.isRepository);
    linker.setMainui(this);
    hl7SchemaEditorView.setLinker(linker);
    GridData data2 = new GridData(GridData.FILL_HORIZONTAL);
    data2.heightHint = 300;
    hl7SchemaEditorView.initGraphicComponents();
    final Composite tableEditorComposite = hl7SchemaEditorView.getMainComposite();
    tableEditorComposite.setLayoutData(data2);
    tableEditorComposite.setBackground(null);
    //$NON-NLS-1$
    metadataEditor = new MetadataEmfTableEditor("");
    //$NON-NLS-1$
    metadataEditor.setDefaultLabel("newColumn");
    metadataEditor.registerDataList(new ArrayList());
    hl7SchemaEditorView.setMetadataEditor(metadataEditor);
    linker.init(messageViewer, hl7SchemaEditorView);
    linker.setManager(hl7Manager);
    initMessageTree();
    new FooterComposite(mainComposite, SWT.NONE, hl7Manager);
    initSchemaCombo(externalNode.getMetadataList());
    initTableViewer();
    initlinkers();
    boolean jobReadOnly = externalNode.getProcess().isReadOnly();
    if (externalNode.getOriginalNode().getJobletNode() != null) {
        jobReadOnly = externalNode.getOriginalNode().isReadOnly();
    }
    if (jobReadOnly || isRepository) {
        hl7SchemaEditorView.setReadOnly(true);
    }
    addModifylistener();
}
Also used : SashForm(org.eclipse.swt.custom.SashForm) HeaderComposite(org.talend.designer.hl7.ui.header.HeaderComposite) Composite(org.eclipse.swt.widgets.Composite) FooterComposite(org.talend.designer.hl7.ui.footer.FooterComposite) MetadataEmfTableEditor(org.talend.core.ui.metadata.editor.MetadataEmfTableEditor) FooterComposite(org.talend.designer.hl7.ui.footer.FooterComposite) HeaderComposite(org.talend.designer.hl7.ui.header.HeaderComposite) GridData(org.eclipse.swt.layout.GridData) ArrayList(java.util.ArrayList) HL7Tree2SchemaLinker(org.talend.designer.hl7.edit.HL7Tree2SchemaLinker)

Example 2 with FooterComposite

use of org.talend.designer.hl7.ui.footer.FooterComposite in project tdi-studio-se by Talend.

the class HL7OutputUI method createContent.

/**
     * Comment method "createContent".
     *
     * @param child
     */
private void createContent(Composite mainComposite) {
    // this.isRepository);
    if (this.hl7Manager.isRepetable()) {
    // header.updateStatus("");
    }
    // Splitter
    xmlToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
    xmlToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
    xmlToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
    canModify = externalNode.getProcess().isReadOnly();
    if (externalNode.getOriginalNode().getJobletNode() != null) {
        canModify = externalNode.getOriginalNode().isReadOnly();
    }
    IElementParameter propertyParam = externalNode.getElementParameter(EParameterName.PROPERTY_TYPE.getName());
    if (propertyParam != null) {
        isRespo = propertyParam.getValue().equals("REPOSITORY");
    }
    addSchemaViewer(xmlToSchemaSash, 300, 110);
    addXMLViewer(xmlToSchemaSash, 400, 110);
    xmlToSchemaSash.setWeights(new int[] { 40, 60 });
    linker = new SchemaXMLLinker(this.xmlToSchemaSash);
    linker.init(schemaViewer.getTable(), xmlViewer);
    linker.setManager(hl7Manager);
    initSchemaTable();
    new FooterComposite(mainComposite, SWT.NONE, hl7Manager);
    redrawLinkers();
}
Also used : SashForm(org.eclipse.swt.custom.SashForm) FooterComposite(org.talend.designer.hl7.ui.footer.FooterComposite) GridData(org.eclipse.swt.layout.GridData) IElementParameter(org.talend.core.model.process.IElementParameter) SchemaXMLLinker(org.talend.designer.hl7.ui.edit.SchemaXMLLinker)

Aggregations

SashForm (org.eclipse.swt.custom.SashForm)2 GridData (org.eclipse.swt.layout.GridData)2 FooterComposite (org.talend.designer.hl7.ui.footer.FooterComposite)2 ArrayList (java.util.ArrayList)1 Composite (org.eclipse.swt.widgets.Composite)1 IElementParameter (org.talend.core.model.process.IElementParameter)1 MetadataEmfTableEditor (org.talend.core.ui.metadata.editor.MetadataEmfTableEditor)1 HL7Tree2SchemaLinker (org.talend.designer.hl7.edit.HL7Tree2SchemaLinker)1 SchemaXMLLinker (org.talend.designer.hl7.ui.edit.SchemaXMLLinker)1 HeaderComposite (org.talend.designer.hl7.ui.header.HeaderComposite)1