Example usage for org.eclipse.jface.viewers AbstractListViewer getElementAt

List of usage examples for org.eclipse.jface.viewers AbstractListViewer getElementAt

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers AbstractListViewer getElementAt.

Prototype

public Object getElementAt(int index) 

Source Link

Document

Returns the element with the given index from this list viewer.

Usage

From source file:org.eclipse.riena.ui.ridgets.swt.AbstractListRidget.java

License:Open Source License

@Override
public Object getOption(final int index) {
    if (getRowObservables() == null || index < 0 || index >= getOptionCount()) {
        throw new IllegalArgumentException("index: " + index); //$NON-NLS-1$
    }//from ww  w  .java  2s  . c o  m
    final AbstractListViewer viewer = getViewer();
    if (viewer != null) {
        return viewer.getElementAt(index); // sorted
    }
    return getRowObservables().get(index); // unsorted
}