|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.ViewerComparator
org.eclipse.jface.viewers.ViewerSorter
pl.edu.agh.cast.ui.util.AbstractColumnSorter
public abstract class AbstractColumnSorter
Abstract column sorter. Class based on ColumnViewerSorter from Eclipse JFaceSnippets (http://wiki.eclipse.org/JFaceSnippets#Snippet040TableViewerSorting)
| Field Summary | |
|---|---|
static int |
ASC
Constant indicating the ascending sort order. |
protected org.eclipse.swt.widgets.TableColumn |
column
Column, by which the viewer is to be sorted. |
protected int |
columnNo
Number of the column, by which the viewer is to be sorted.. |
static int |
DESC
Constant indicating the descending sort order. |
protected int |
direction
Direction of sort. |
static int |
NONE
Constant indicating that the data should NOT be sorted. |
protected org.eclipse.jface.viewers.ColumnViewer |
viewer
Viewer to be sorted. |
| Fields inherited from class org.eclipse.jface.viewers.ViewerSorter |
|---|
collator |
| Constructor Summary | |
|---|---|
AbstractColumnSorter()
The default constructor. |
|
AbstractColumnSorter(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.swt.widgets.TableColumn col,
int colNo)
Constructor. |
|
AbstractColumnSorter(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.jface.viewers.TableViewerColumn colView,
int colNo)
Constructor. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
int |
compare(org.eclipse.jface.viewers.Viewer view,
Object e1,
Object e2)
|
protected abstract int |
doCompare(Object e1,
Object e2)
|
void |
doSort(AbstractColumnSorter sorter,
int dir)
Performs the sort action. |
void |
setColumnNo(int columnNo)
|
void |
setSorterData(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.swt.widgets.TableColumn col,
int colNo)
Sets the sorter's data. |
| Methods inherited from class org.eclipse.jface.viewers.ViewerSorter |
|---|
getCollator |
| Methods inherited from class org.eclipse.jface.viewers.ViewerComparator |
|---|
category, getComparator, isSorterProperty, sort |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ASC
public static final int NONE
public static final int DESC
protected int direction
protected org.eclipse.swt.widgets.TableColumn column
protected org.eclipse.jface.viewers.ColumnViewer viewer
protected int columnNo
| Constructor Detail |
|---|
public AbstractColumnSorter()
public AbstractColumnSorter(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.jface.viewers.TableViewerColumn colView,
int colNo)
view - viewer to be sortedcolView - sort viewer columncolNo - index of sort column
public AbstractColumnSorter(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.swt.widgets.TableColumn col,
int colNo)
view - viewer to be sortedcol - sort columncolNo - index of sort column| Method Detail |
|---|
public void setSorterData(org.eclipse.jface.viewers.ColumnViewer view,
org.eclipse.swt.widgets.TableColumn col,
int colNo)
view - viewer to be sortedcol - sort columncolNo - index of sort columnpublic void setColumnNo(int columnNo)
public void doSort(AbstractColumnSorter sorter,
int dir)
sorter - sorter that performs the sortdir - sort direction
public int compare(org.eclipse.jface.viewers.Viewer view,
Object e1,
Object e2)
compare in class org.eclipse.jface.viewers.ViewerComparatorViewerComparator.compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
java.lang.Object)public Object clone()
clone in class ObjectObject.clone()
protected abstract int doCompare(Object e1,
Object e2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||