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;
}
Aggregations