use of org.eclipse.jface.viewers.ILabelDecorator in project tmdm-studio-se by Talend.
the class RepositoryViewObjectCheckedWidget method installColumns.
private void installColumns() {
treeViewer.getTree().setHeaderVisible(true);
//
TreeViewerColumn nameColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
nameColumn.getColumn().setWidth(320);
nameColumn.getColumn().setText(Messages.ConsistencyConflict_name);
ILabelDecorator labelDecorator = RepositoryPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
DecoratingStyledCellLabelProvider consistencyLabelProvider = new DecoratingStyledCellLabelProvider(new MDMRepositoryLabelProvider(), labelDecorator, null);
nameColumn.setLabelProvider(consistencyLabelProvider);
// compare result
TreeViewerColumn resultColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
resultColumn.getColumn().setWidth(120);
resultColumn.getColumn().setText(Messages.ConsistencyConflict_compareResult);
resultColumn.setLabelProvider(new CompareResultColumnProvider());
//
localTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
localTimeColumn.getColumn().setText(Messages.ConsistencyConflict_retrievalTimestamp);
localTimeColumn.setLabelProvider(new TimeStampColumnProvider(true));
//
serverTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
serverTimeColumn.getColumn().setText(Messages.ConsistencyConflict_serverTimestamp);
serverTimeColumn.setLabelProvider(new TimeStampColumnProvider(false));
//
showTimeStampColumns(false);
}
use of org.eclipse.jface.viewers.ILabelDecorator in project tmdm-studio-se by Talend.
the class ConsistencyConflictDialog method installColumns.
private void installColumns() {
treeViewer.getTree().setHeaderVisible(true);
nameColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
nameColumn.getColumn().setWidth(320);
nameColumn.getColumn().setText(Messages.ConsistencyConflict_name);
ILabelDecorator labelDecorator = RepositoryPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
DecoratingStyledCellLabelProvider consistencyLabelProvider = new DecoratingStyledCellLabelProvider(new MDMRepositoryLabelProvider(), labelDecorator, null) {
@Override
public Color getBackground(Object element) {
IRepositoryViewObject viewObj = (IRepositoryViewObject) element;
return getBackgroundColor(viewObj);
}
};
nameColumn.setLabelProvider(consistencyLabelProvider);
resultColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
resultColumn.getColumn().setWidth(120);
resultColumn.getColumn().setText(Messages.ConsistencyConflict_compareResult);
resultColumn.setLabelProvider(new CompareResultColumnProvider());
//
operationColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
operationColumn.getColumn().setWidth(120);
operationColumn.getColumn().setText(Messages.ConsistencyConflictDialog_Operation);
operationColumn.setLabelProvider(new OperationProvider());
//
localTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
localTimeColumn.getColumn().setText(Messages.ConsistencyConflict_retrievalTimestamp);
localTimeColumn.setLabelProvider(new TimeStampColumnProvider(true));
//
serverTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
serverTimeColumn.getColumn().setText(Messages.ConsistencyConflict_serverTimestamp);
serverTimeColumn.setLabelProvider(new TimeStampColumnProvider(false));
//
showTimeStampColumns(false);
}
use of org.eclipse.jface.viewers.ILabelDecorator in project tmdm-studio-se by Talend.
the class LockedObjectDialog method createDialogArea.
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gridLayout = (GridLayout) container.getLayout();
gridLayout.marginHeight = 5;
titleLabel = new Label(container, SWT.WRAP);
GridData gd_titleLabel = new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1);
gd_titleLabel.heightHint = 40;
gd_titleLabel.verticalIndent = 5;
titleLabel.setLayoutData(gd_titleLabel);
if (mutliObjAlertMsg != null) {
if (canContinueRestOperation()) {
titleLabel.setText(mutliObjAlertMsg);
} else {
titleLabel.setText(singleObjAlertMsg);
}
}
treeViewer = new TreeViewer(container, SWT.BORDER);
Tree tree = treeViewer.getTree();
GridData gd_tree = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_tree.verticalIndent = 5;
tree.setLayoutData(gd_tree);
treeViewer.setContentProvider(new TreeContentProvider());
ILabelDecorator labelDecorator = RepositoryPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(new MDMRepositoryLabelProvider(), labelDecorator);
treeViewer.setLabelProvider(labelProvider);
// init input
treeViewer.setInput(lockedObjs);
return container;
}
Aggregations