use of org.eclipse.swt.events.ModifyEvent in project tdi-studio-se by Talend.
the class ToolsPreferencePage method createUpdatePeriodTextField.
/**
* Creates the update period text field.
*
* @param parent
* The parent composite
*/
private void createUpdatePeriodTextField(Composite parent) {
Group group = new Group(parent, SWT.NONE);
group.setLayout(new GridLayout(2, false));
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
group.setText(Messages.autoDetectGroupLabel);
Label label = new Label(group, SWT.NONE);
label.setText(Messages.updatePeriodLabel);
updatePeriodText = new Text(group, SWT.BORDER);
updatePeriodText.setText(String.valueOf(getPreferenceStore().getInt(IConstants.UPDATE_PERIOD)));
updatePeriodText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
updatePeriodText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validateUpdatePeriod();
}
});
}
use of org.eclipse.swt.events.ModifyEvent in project tdi-studio-se by Talend.
the class ToolsPreferencePage method createJdkRootDirectoryGroup.
/**
* Creates the JDK root directory group.
*
* @param parent
* The parent composite
*/
private void createJdkRootDirectoryGroup(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(3, false));
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label label = new Label(composite, SWT.NONE);
label.setText(Messages.jdkRootDirectoryLabel);
jdkRootDirectoryText = new Text(composite, SWT.BORDER);
jdkRootDirectoryText.setText(getPreferenceStore().getString(IConstants.JDK_ROOT_DIRECTORY));
jdkRootDirectoryText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
jdkRootDirectoryText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validateJdkRootDirectory();
}
});
Button button = new Button(composite, SWT.NONE);
button.setText(Messages.browseButton);
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(e.display.getActiveShell());
dialog.setMessage(Messages.selectJdkRootDirectoryMsg);
String path = dialog.open();
if (path == null) {
return;
}
File file = new File(path);
if (file.isDirectory()) {
jdkRootDirectoryText.setText(path);
}
}
});
}
use of org.eclipse.swt.events.ModifyEvent in project tdi-studio-se by Talend.
the class ToolsPreferencePage method createMemoryGroup.
/**
* Creates the memory group.
*
* @param parent
* The parent composite
*/
private void createMemoryGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
group.setText(Messages.memoryGroupLabel);
GridLayout layout = new GridLayout(2, false);
group.setLayout(layout);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label label = new Label(group, SWT.NONE);
label.setText(Messages.maxNumberOfClassesLabel);
maxNumberOfClassesText = new Text(group, SWT.BORDER);
maxNumberOfClassesText.setText(String.valueOf(getPreferenceStore().getInt(IConstants.MAX_CLASSES_NUMBER)));
maxNumberOfClassesText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validateMaxNumberOfClasses();
}
});
maxNumberOfClassesText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
use of org.eclipse.swt.events.ModifyEvent in project tdi-studio-se by Talend.
the class InfoPage method createSnapshotSection.
/**
* Creates the snapshot section.
*
* @param parent The parent composite
* @param toolkit The toolkit
*/
private void createSnapshotSection(Composite parent, FormToolkit toolkit) {
ExpandableComposite section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
section.setText(Messages.snapshotSectionLabel);
section.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite composite = toolkit.createComposite(section);
section.setClient(composite);
composite.setLayout(new GridLayout(2, false));
dateText = createText(composite, toolkit, Messages.dateLabel);
commentsText = createEditableText(composite, toolkit, Messages.commentsLabel);
commentsText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
editor.firePropertyChange(IEditorPart.PROP_DIRTY);
}
});
}
use of org.eclipse.swt.events.ModifyEvent in project tdi-studio-se by Talend.
the class JavaMonitorPreferencePage method createUpdatePeriodText.
/**
* Creates the update period text field.
*
* @param parent The parent composite
*/
private void createUpdatePeriodText(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(2, false));
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label label = new Label(composite, SWT.NONE);
label.setText(Messages.updatePeriodLabel);
updatePeriodText = new Text(composite, SWT.BORDER);
updatePeriodText.setText(String.valueOf(getPreferenceStore().getInt(IConstants.UPDATE_PERIOD)));
updatePeriodText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
updatePeriodText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
validateUpdatePeriod();
}
});
}
Aggregations