use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tdi-studio-se by Talend.
the class ConnectionFormComposite method addListeners.
private void addListeners() {
repositoryCombo.addPostSelectionChangedListener(repositoryListener);
nameText.addModifyListener(standardTextListener);
descriptionText.addModifyListener(standardTextListener);
userText.addModifyListener(standardTextListener);
passwordText.addModifyListener(standardTextListener);
workSpaceText.addModifyListener(standardTextListener);
for (IRepositoryFactory f : dynamicControls.keySet()) {
for (LabelText control : dynamicControls.get(f).values()) {
control.addModifyListener(standardTextListener);
}
}
for (IRepositoryFactory f : dynamicChoices.keySet()) {
for (LabelledCombo control : dynamicChoices.get(f).values()) {
control.getCombo().addModifyListener(standardTextListener);
}
}
deleteProjectsButton.addSelectionListener(deleteProjectClickListener);
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tdi-studio-se by Talend.
the class ConnectionFormComposite method showHideDynamicsControls.
private void showHideDynamicsControls() {
// 1. Hide all controls:
for (IRepositoryFactory f : dynamicControls.keySet()) {
for (LabelText control : dynamicControls.get(f).values()) {
// control.setVisible(false);
hideControl(control.getLabelControl(), true, false);
hideControl(control.getTextControl(), true, false);
}
for (Button control : dynamicButtons.get(f).values()) {
// control.setVisible(false);
hideControl(control, true, false);
}
for (LabelledCombo control : dynamicChoices.get(f).values()) {
// control.setVisible(false);
hideControl(control.getCombo(), true, false);
}
}
// 2. Show active repository controls:
if (getRepository() != null) {
for (LabelText control : dynamicControls.get(getRepository()).values()) {
// control.setVisible(true);
hideControl(control.getLabelControl(), false, false);
hideControl(control.getTextControl(), false, false);
}
for (Button control : dynamicButtons.get(getRepository()).values()) {
// control.setVisible(true);
hideControl(control, false, false);
}
for (LabelledCombo control : dynamicChoices.get(getRepository()).values()) {
// control.setVisible(true);
hideControl(control.getCombo(), false, false);
}
}
nameText.getParent().layout();
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tdi-studio-se by Talend.
the class ConnectionFormComposite method removeListeners.
private void removeListeners() {
repositoryCombo.removePostSelectionChangedListener(repositoryListener);
nameText.removeModifyListener(standardTextListener);
descriptionText.removeModifyListener(standardTextListener);
userText.removeModifyListener(standardTextListener);
passwordText.removeModifyListener(standardTextListener);
workSpaceText.removeModifyListener(standardTextListener);
for (IRepositoryFactory f : dynamicControls.keySet()) {
for (LabelText control : dynamicControls.get(f).values()) {
control.removeModifyListener(standardTextListener);
}
}
for (IRepositoryFactory f : dynamicChoices.keySet()) {
for (LabelledCombo control : dynamicChoices.get(f).values()) {
control.getCombo().removeModifyListener(standardTextListener);
}
}
deleteProjectsButton.removeSelectionListener(deleteProjectClickListener);
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tdi-studio-se by Talend.
the class PublishOnSpagoExportWizardPage method createOptions.
/**
* Create the buttons for the group that determine if the entire or selected directory structure should be created.
*
* @param optionsGroup
* @param font
*/
protected void createOptions(Composite optionsGroup, Font font) {
// create directory structure radios
List<SpagoBiServer> listServerSapgo = null;
List<String> listEngine = new ArrayList<String>();
// TODO SML remove unused lines if this fabulous code works fine
// ProxyRepositoryFactory proxyRepositoryFactory = ProxyRepositoryFactory.getInstance();
// try {
// listServerSapgo = proxyRepositoryFactory.getSpagoBiServer();
listServerSapgo = SpagoBiServerHelper.parse(new SpagoBiPreferencePage().getPreferenceStore().getString(SpagoBiServer.SPAGOBI_SERVER));
if (listServerSapgo != null && !listServerSapgo.isEmpty()) {
Iterator<SpagoBiServer> iterator = listServerSapgo.iterator();
while (iterator.hasNext()) {
SpagoBiServer spagoBiServer = iterator.next();
listEngine.add(spagoBiServer.getEngineName());
}
}
// } catch (PersistenceException e) {
// displayErrorDialog(e.getMessage());
// }
serverSpagoBi = new LabelledCombo(optionsGroup, Messages.getString("PublishOnSpagoExportWizardPage.SpagoBI.Server"), Messages.getString("PublishOnSpagoExportWizardPage.SpecifyServer.PublishJob"), //$NON-NLS-1$ //$NON-NLS-2$
listEngine);
serverSpagoBi.select(0);
//$NON-NLS-1$
jobLabel = new LabelledText(optionsGroup, Messages.getString("PublishOnSpagoExportWizardPage.jobLabel"), true);
jobLabel.setText(jobLabelName);
//$NON-NLS-1$
jobName = new LabelledText(optionsGroup, Messages.getString("PublishOnSpagoExportWizardPage.jobName"), true);
jobName.setText(jobLabelName);
//$NON-NLS-1$
jobDescription = new LabelledText(optionsGroup, Messages.getString("PublishOnSpagoExportWizardPage.jobDescription"), true);
jobDescription.setText(jobPurposeDescription);
contextButton = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
//$NON-NLS-1$
contextButton.setText(Messages.getString("JobScriptsExportWizardPage.contextPerlScripts"));
contextButton.setSelection(true);
contextButton.setFont(font);
contextCombo = new Combo(optionsGroup, SWT.PUSH);
// spagoVisible = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
// spagoVisible.setText(Messages.getString("PublishOnSpagoExportWizardPage.spagoVisible")); //$NON-NLS-1$
// spagoVisible.setSelection(true);
// spagoVisible.setFont(font);
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tdi-studio-se by Talend.
the class MultiSchemasUI method addGroupMultiSchemaSettings.
private void addGroupMultiSchemaSettings(final Composite mainComposite) {
//$NON-NLS-1$
Group group = Form.createGroup(mainComposite, 1, Messages.getString("FileStep2.groupDelimitedFileSettings"), 280);
Composite composite = new Composite(group, SWT.NONE);
GridLayout gridLayout = new GridLayout(4, false);
gridLayout.marginHeight = 1;
composite.setLayout(gridLayout);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(gd);
EMetadataEncoding[] values = EMetadataEncoding.values();
String[] encodingData = new String[values.length];
for (int j = 0; j < values.length; j++) {
encodingData[j] = values[j].getName();
}
encodingCombo = new LabelledCombo(composite, Messages.getString("FileStep2.encoding"), //$NON-NLS-1$
Messages.getString("FileStep2.encodingTip"), encodingData, 3, true, //$NON-NLS-1$
SWT.NONE);
// Field Separator Combo & Text
String[] fieldSeparatorData = getFieldSeparatorStyleSupportByLanguage();
fieldSeparatorCombo = new LabelledCombo(composite, Messages.getString("FileStep2.fieldSeparator"), //$NON-NLS-1$
Messages.getString("FileStep2.fieldSeparatorDelimitedTip"), fieldSeparatorData, 1, true, //$NON-NLS-1$
SWT.READ_ONLY);
//$NON-NLS-1$
fieldSeparatorText = new LabelledText(composite, "", 1, true, SWT.RIGHT);
// Dimension of columb of Separator Text
GridData gridData = new GridData(SWT.FILL, SWT.BOTTOM, true, false);
gridData.minimumWidth = 80;
fieldSeparatorText.setLayoutData(gridData);
// Row Separator Combo & Text
String[] rowSeparatorData = { RowSeparator.STANDART_EOL_LITERAL.getLiteral(), RowSeparator.CUSTOM_STRING_LITERAL.getLiteral() };
rowSeparatorCombo = new LabelledCombo(composite, Messages.getString("FileStep2.rowSeparator"), //$NON-NLS-1$
Messages.getString("FileStep2.rowSeparatorTip"), rowSeparatorData, 1, true, //$NON-NLS-1$
SWT.READ_ONLY);
//$NON-NLS-1$
rowSeparatorText = new LabelledText(composite, "", 1, true, SWT.RIGHT);
useMultiSaparators = new Button(group, SWT.CHECK);
Composite multiComp = new Composite(group, SWT.NONE);
gridLayout = new GridLayout(2, false);
gridLayout.marginHeight = 1;
multiComp.setLayout(gridLayout);
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
multiComp.setLayoutData(gd);
useMultiSaparators.setText(Messages.getString("MultiSchemasUI.useMultiSchemabtn"));
//$NON-NLS-1$
multiSeparatorsText = new LabelledText(multiComp, "Multiple Separators", 1, true);
multiSeparatorsText.setEditable(false);
//$NON-NLS-1$
keyValuesText = new LabelledText(multiComp, Messages.getString("MultiSchemasUI.keyValues"), 1, true);
keyValuesText.setEditable(false);
//$NON-NLS-1$
keyIndexText = new LabelledText(multiComp, Messages.getString("MultiSchemasUI.keyIndex"), 1, true);
keyIndexText.setEditable(false);
}
Aggregations