Search in sources :

Example 1 with RowGeneratorDialog

use of org.talend.designer.rowgenerator.ui.dialogs.RowGeneratorDialog in project tdi-studio-se by Talend.

the class RowGenMain method createRowGeneratorDialog.

/**
     * yzhang Comment method "createRowGeneratorDialog".
     * 
     * @param parentShell
     * @return
     */
public Dialog createRowGeneratorDialog(Shell parentShell) {
    RowGeneratorDialog dialog = new RowGeneratorDialog(parentShell, this);
    IComponent component = connector.getComponent();
    IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    String productName = brandingService.getFullProductName();
    Rectangle boundsRG = ExternalRowGeneratorUiProperties.getBoundsRowGen();
    if (ExternalRowGeneratorUiProperties.isShellMaximized()) {
        dialog.setMaximized(ExternalRowGeneratorUiProperties.isShellMaximized());
    } else {
        boundsRG = ExternalRowGeneratorUiProperties.getBoundsRowGen();
        if (boundsRG.x < 0) {
            boundsRG.x = 0;
        }
        if (boundsRG.y < 0) {
            boundsRG.y = 0;
        }
        dialog.setSize(boundsRG);
    }
    dialog.setIcon(CoreImageProvider.getComponentIcon(component, ICON_SIZE.ICON_32));
    //$NON-NLS-1$
    dialog.setTitle(Messages.getString("RowGenMain.ShellTitle", productName, connector.getUniqueName()));
    return dialog;
}
Also used : RowGeneratorDialog(org.talend.designer.rowgenerator.ui.dialogs.RowGeneratorDialog) IComponent(org.talend.core.model.components.IComponent) Rectangle(org.eclipse.swt.graphics.Rectangle) IBrandingService(org.talend.core.ui.branding.IBrandingService)

Aggregations

Rectangle (org.eclipse.swt.graphics.Rectangle)1 IComponent (org.talend.core.model.components.IComponent)1 IBrandingService (org.talend.core.ui.branding.IBrandingService)1 RowGeneratorDialog (org.talend.designer.rowgenerator.ui.dialogs.RowGeneratorDialog)1