use of org.eclipse.jface.databinding.viewers.ObservableListContentProvider in project linuxtools by eclipse.
the class RunImageEnvironmentTab method createEnvironmentVariablesTable.
private TableViewer createEnvironmentVariablesTable(Composite container) {
final Table table = new Table(container, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
final TableViewer tableViewer = new TableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
addTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunResourceVolVarPage.nameColumn"), 200);
addTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunResourceVolVarPage.valueColumn"), 200);
tableViewer.setContentProvider(new ObservableListContentProvider());
return tableViewer;
}
use of org.eclipse.jface.databinding.viewers.ObservableListContentProvider in project linuxtools by eclipse.
the class RunImageLinksTab method createLinksTable.
private TableViewer createLinksTable(final Composite container) {
final Table table = new Table(container, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
final TableViewer tableViewer = new TableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
createTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunSelectionPage.containerNameColumn"), 200);
createTableViewerColumn(tableViewer, // $NON-NLS-1$
WizardMessages.getString("ImageRunSelectionPage.aliasColumn"), 150);
tableViewer.setContentProvider(new ObservableListContentProvider());
return tableViewer;
}
use of org.eclipse.jface.databinding.viewers.ObservableListContentProvider in project linuxtools by eclipse.
the class RunImagePortsTab method createPortSettingsTable.
private CheckboxTableViewer createPortSettingsTable(final Composite container) {
final Table table = new Table(container, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.CHECK);
final CheckboxTableViewer tableViewer = new CheckboxTableViewer(table);
table.setHeaderVisible(true);
table.setLinesVisible(true);
createTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunSelectionPage.containerPortColumn"), 100);
createTableViewerColumn(tableViewer, // $NON-NLS-1$
WizardMessages.getString("ImageRunSelectionPage.typeColumn"), 50);
createTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunSelectionPage.hostAddressColumn"), 100);
createTableViewerColumn(tableViewer, WizardMessages.getString(// $NON-NLS-1$
"ImageRunSelectionPage.hostPortColumn"), 100);
tableViewer.setContentProvider(new ObservableListContentProvider());
return tableViewer;
}
use of org.eclipse.jface.databinding.viewers.ObservableListContentProvider in project linuxtools by eclipse.
the class RunImageVolumesTab method bind.
/**
* Same as
* {@link org.eclipse.jface.databinding.viewers.ViewerSupport#bind(StructuredViewer, IObservableList, org.eclipse.core.databinding.property.value.IValueProperty[])
* but with a custom LabelProvider, DataVolumesLabelProvider
*
* @param viewer
* @param input
* @param labelProperties
*/
private void bind(final StructuredViewer viewer, final IObservableList input, final IBeanValueProperty[] labelProperties) {
final ObservableListContentProvider contentProvider = new ObservableListContentProvider();
if (viewer.getInput() != null) {
viewer.setInput(null);
}
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new DataVolumesLabelProvider(Properties.observeEach(contentProvider.getKnownElements(), labelProperties)));
if (input != null) {
viewer.setInput(input);
}
}
use of org.eclipse.jface.databinding.viewers.ObservableListContentProvider in project linuxtools by eclipse.
the class ImageRunResourceVolumesVariablesPage method bind.
/**
* Same as
* {@link ViewerSupport#bind(StructuredViewer, IObservableList, org.eclipse.core.databinding.property.value.IValueProperty[])
* but with a custom LabelProvider, DataVolumesLabelProvider
*
* @param viewer
* @param input
* @param labelProperties
*/
private void bind(final StructuredViewer viewer, final IObservableList input, final IBeanValueProperty[] labelProperties) {
final ObservableListContentProvider contentProvider = new ObservableListContentProvider();
if (viewer.getInput() != null) {
viewer.setInput(null);
}
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new DataVolumesLabelProvider(Properties.observeEach(contentProvider.getKnownElements(), labelProperties)));
if (input != null) {
viewer.setInput(input);
}
}
Aggregations