Search in sources :

Example 1 with MultiSchemaDialog

use of org.talend.designer.filemultischemas.ui.dialog.MultiSchemaDialog in project tdi-studio-se by Talend.

the class MultiSchemasMain method createDialog.

public Dialog createDialog(Shell parentShell) {
    MultiSchemaDialog dialog = new MultiSchemaDialog(parentShell, this);
    IComponent component = connector.getComponent();
    dialog.setIcon(CoreImageProvider.getComponentIcon(component, ICON_SIZE.ICON_32));
    dialog.setTitle("Talend Open Studio - " + connector.getUniqueName());
    Rectangle boundsMapper = ExternalMultiSchemasUIProperties.getBoundsMapper();
    if (ExternalMultiSchemasUIProperties.isShellMaximized()) {
        dialog.setMaximized(ExternalMultiSchemasUIProperties.isShellMaximized());
        dialog.setSize(boundsMapper);
        parentShell.setBounds(boundsMapper);
    } else {
        boundsMapper = ExternalMultiSchemasUIProperties.getBoundsMapper();
        if (boundsMapper.x < 0) {
            boundsMapper.x = 0;
        }
        if (boundsMapper.y < 0) {
            boundsMapper.y = 0;
        }
        dialog.setSize(boundsMapper);
    }
    dialog.open();
    return dialog;
}
Also used : IComponent(org.talend.core.model.components.IComponent) MultiSchemaDialog(org.talend.designer.filemultischemas.ui.dialog.MultiSchemaDialog) Rectangle(org.eclipse.swt.graphics.Rectangle)

Aggregations

Rectangle (org.eclipse.swt.graphics.Rectangle)1 IComponent (org.talend.core.model.components.IComponent)1 MultiSchemaDialog (org.talend.designer.filemultischemas.ui.dialog.MultiSchemaDialog)1