|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.importer.wizard.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. |
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,
Integer[] selectedColumns,
boolean isSortable,
boolean isEditable,
ITabularData<?> data,
ErrorsLog errorsLog,
ValidationPageComposite composite)
Initialize table viewer: creates columns chosen from selected columns and sets sorter for each column (if isSortable == true). |
static void |
initTable(org.eclipse.jface.viewers.TableViewer tableViewer,
ITabularData<?> data)
Delegated method. |
static void |
setEmptyTokensReplacements(org.eclipse.jface.viewers.TableViewer tableViewer,
Map<Integer,List<DataRow>> emptyTokenReplacements)
Sets empty token replacements for a given table viewer. |
static void |
setHeaderRowIdx(org.eclipse.jface.viewers.TableViewer tableViewer,
int headerRowIdx)
Sets selected header row index within a specified table viewer. |
static void |
setSelectedRows(org.eclipse.jface.viewers.TableViewer tableViewer,
List<? extends IDataRow<?>> selectedDataRows)
Sets selected data rows within a specified table viewer. |
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, ITabularData<?> data)
initTable(TableViewer, Integer[], boolean, boolean, ITabularData, ErrorsLog,
ValidationPageComposite)
public static void initTable(org.eclipse.jface.viewers.TableViewer tableViewer, Integer[] selectedColumns, boolean isSortable, boolean isEditable, ITabularData<?> data, ErrorsLog errorsLog, ValidationPageComposite composite)
tableViewer
- the table viewer to initializeselectedColumns
- the column indices 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 sortersisEditable
- the flag that specifies if the broken cell can be edited by userdata
- the raw tabular data to be displayed as input of the viewererrorsLog
- the errors logcomposite
- the main composite of the page that is responsible for this table viewer's creation and which has
access to WizardPage
object and is responsible for updating all controlspublic 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 viewerpublic static void adjustColumnWidth(org.eclipse.jface.viewers.TableViewer tableViewer)
tableViewer
- the table viewer whose column width is to be adjustedpublic static void setSelectedRows(org.eclipse.jface.viewers.TableViewer tableViewer, List<? extends IDataRow<?>> selectedDataRows)
tableViewer
- the table viewer whose rows are to be setselectedDataRows
- the data rows to setpublic static void setHeaderRowIdx(org.eclipse.jface.viewers.TableViewer tableViewer, int headerRowIdx)
tableViewer
- the table viewer whose row index is to be setheaderRowIdx
- the header row indexpublic static void setEmptyTokensReplacements(org.eclipse.jface.viewers.TableViewer tableViewer, Map<Integer,List<DataRow>> emptyTokenReplacements)
tableViewer
- the table viewer whose empty token replacements are to be setemptyTokenReplacements
- the empty token replacements
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |