Search in sources :

Example 1 with ColumnViewer

use of org.eclipse.jface.viewers.ColumnViewer in project eclipse.platform.text by eclipse.

the class DecoratingFileSearchLabelProvider method refresh.

private void refresh() {
    ColumnViewer viewer = getViewer();
    if (viewer == null) {
        return;
    }
    boolean showColoredLabels = showColoredLabels();
    if (showColoredLabels != isOwnerDrawEnabled()) {
        setOwnerDrawEnabled(showColoredLabels);
        viewer.refresh();
    } else if (showColoredLabels) {
        viewer.refresh();
    }
}
Also used : ColumnViewer(org.eclipse.jface.viewers.ColumnViewer)

Example 2 with ColumnViewer

use of org.eclipse.jface.viewers.ColumnViewer in project dbeaver by serge-rider.

the class LockManagerViewer method setTableLockSelect.

public void setTableLockSelect(DBAServerLock lock) {
    ColumnViewer itemsViewer = lockTable.getItemsViewer();
    itemsViewer.getControl().setRedraw(false);
    try {
        itemsViewer.setSelection(new StructuredSelection(lock), true);
    } finally {
        itemsViewer.getControl().setRedraw(true);
    }
    curLock = lock;
}
Also used : ColumnViewer(org.eclipse.jface.viewers.ColumnViewer) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 3 with ColumnViewer

use of org.eclipse.jface.viewers.ColumnViewer in project cubrid-manager by CUBRID.

the class DecoratingLabelProvider method refresh.

private void refresh() {
    ColumnViewer viewer = getViewer();
    if (viewer == null) {
        return;
    }
    boolean showColoredLabels = showColoredLabels();
    if (showColoredLabels != isOwnerDrawEnabled()) {
        setOwnerDrawEnabled(showColoredLabels);
        viewer.refresh();
    } else if (showColoredLabels) {
        viewer.refresh();
    }
}
Also used : ColumnViewer(org.eclipse.jface.viewers.ColumnViewer)

Example 4 with ColumnViewer

use of org.eclipse.jface.viewers.ColumnViewer in project dbeaver by dbeaver.

the class LockManagerViewer method setTableLockSelect.

public void setTableLockSelect(DBAServerLock lock) {
    ColumnViewer itemsViewer = lockTable.getItemsViewer();
    itemsViewer.getControl().setRedraw(false);
    try {
        itemsViewer.setSelection(new StructuredSelection(lock), true);
    } finally {
        itemsViewer.getControl().setRedraw(true);
    }
    curLock = lock;
}
Also used : ColumnViewer(org.eclipse.jface.viewers.ColumnViewer) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Example 5 with ColumnViewer

use of org.eclipse.jface.viewers.ColumnViewer in project bndtools by bndtools.

the class PropertiesTableLabelProvider method update.

@Override
public void update(ViewerCell cell) {
    ColumnViewer viewer = getViewer();
    @SuppressWarnings("unchecked") Map<String, String> map = (Map<String, String>) viewer.getInput();
    String key = (String) cell.getElement();
    if (cell.getColumnIndex() == 0) {
        cell.setText(key);
    } else if (cell.getColumnIndex() == 1) {
        cell.setText(map.get(key));
    }
}
Also used : ColumnViewer(org.eclipse.jface.viewers.ColumnViewer) Map(java.util.Map)

Aggregations

ColumnViewer (org.eclipse.jface.viewers.ColumnViewer)5 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 Map (java.util.Map)1