Search in sources :

Example 11 with GridPos

use of org.jkiss.dbeaver.ui.controls.lightgrid.GridPos in project dbeaver by dbeaver.

the class SpreadsheetFindReplaceTarget method setSelection.

@Override
public void setSelection(int offset, int length) {
    int columnCount = owner.getSpreadsheet().getColumnCount();
    List<GridPos> selRows = new ArrayList<>();
    for (int rowNum = 0; rowNum < length; rowNum++) {
        for (int col = 0; col < columnCount; col++) {
            selRows.add(new GridPos(col, offset + rowNum));
        }
    }
    owner.setSelection(new StructuredSelection(selRows));
}
Also used : GridPos(org.jkiss.dbeaver.ui.controls.lightgrid.GridPos) ArrayList(java.util.ArrayList) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) Point(org.eclipse.swt.graphics.Point)

Aggregations

GridPos (org.jkiss.dbeaver.ui.controls.lightgrid.GridPos)11 GridCell (org.jkiss.dbeaver.ui.controls.lightgrid.GridCell)7 Point (org.eclipse.swt.graphics.Point)4 ArrayList (java.util.ArrayList)2 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2 PatternSyntaxException (java.util.regex.PatternSyntaxException)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 DBDAttributeBinding (org.jkiss.dbeaver.model.data.DBDAttributeBinding)2 ResultSetModel (org.jkiss.dbeaver.ui.controls.resultset.ResultSetModel)2 ResultSetRow (org.jkiss.dbeaver.ui.controls.resultset.ResultSetRow)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 ModifyEvent (org.eclipse.swt.events.ModifyEvent)1 ModifyListener (org.eclipse.swt.events.ModifyListener)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1