|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.data.ui.utils.TableViewerHelper
public final class TableViewerHelper
Helper class which contains common operations on table viewers.
| Method Summary | |
|---|---|
static void |
adjustColumnWidth(org.eclipse.jface.viewers.TableViewer tableViewer)
Adjust columns width to their content in specified table viewer. |
void |
expandColumn(org.eclipse.swt.widgets.TableColumn column)
Expands the specified column. |
static TableViewerHelper |
getInstance()
|
static void |
initErrorTable(org.eclipse.jface.viewers.TableViewer tableViewer,
String[] captions,
boolean isSortable,
int defaultSorterColumnNo)
Initialized the error table. |
static void |
initTable(org.eclipse.jface.viewers.TableViewer tableViewer,
String[] captions,
int[] selectedColumns,
boolean isSortable,
int defaultSorterColumnNo,
BrokenDataInfo errors,
boolean isEditable,
ValidationPageComposite composite)
Initialize table viewer: creates columns chosen from selected columns and sets sorter for each column (if isSortable == true). |
static void |
setSelectedRows(org.eclipse.jface.viewers.TableViewer tableViewer,
List<DataRow> selectedDataRows)
Sets selected data rows within a specified table viewer. |
void |
shrinkColumn(org.eclipse.swt.widgets.TableColumn column)
Shrinks the specified column. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TableViewerHelper getInstance()
public static void initTable(org.eclipse.jface.viewers.TableViewer tableViewer,
String[] captions,
int[] selectedColumns,
boolean isSortable,
int defaultSorterColumnNo,
BrokenDataInfo errors,
boolean isEditable,
ValidationPageComposite composite)
tableViewer - the table viewer to initializecaptions - all the column captions (even if not selected)selectedColumns - the columns indexes from captions (or DataRow) which will be created (other columns from captions or
DataRow are ignored)isSortable - the flag that specifies if the table viewer has sortersdefaultSorterColumnNo - the index of column which is to be sorted after creating the table viewererrors - the errors information used for coloring cells, if null default coloring is setisEditable - the flag that specifies if the broken cell can by edited by usercomposite - the main composite of the page, which has access to WiazardPage object and is responsible
for updating all controls
public static void initErrorTable(org.eclipse.jface.viewers.TableViewer tableViewer,
String[] captions,
boolean isSortable,
int defaultSorterColumnNo)
tableViewer - the error table viewer to initializecaptions - the error table column captionsisSortable - the flag that specifies if the error table viewer has sortersdefaultSorterColumnNo - the index of column which is to be sorted after creating the error table viewer
public static void setSelectedRows(org.eclipse.jface.viewers.TableViewer tableViewer,
List<DataRow> selectedDataRows)
tableViewer - the table viewer whose rows are to be setselectedDataRows - the data rows to setpublic static void adjustColumnWidth(org.eclipse.jface.viewers.TableViewer tableViewer)
tableViewer - the table viewer whose column width is to be adjustedpublic void expandColumn(org.eclipse.swt.widgets.TableColumn column)
column - the column to expandpublic void shrinkColumn(org.eclipse.swt.widgets.TableColumn column)
column - the column to shrink
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||