|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.ViewerComparator
org.apache.directory.studio.apacheds.views.ServersViewerComparator
public class ServersViewerComparator
This class implements the servers table viewer comparator.
| Field Summary | |
|---|---|
static int |
ASCENDING
|
static int |
DESCENDING
|
protected int[] |
directions
|
protected ServersViewLabelProvider |
labelProvider
|
static int |
MAX_DEPTH
|
protected int[] |
priorities
|
| Constructor Summary | |
|---|---|
ServersViewerComparator(ServersViewLabelProvider labelProvider)
Creates a new instance of ServersViewerComparator. |
|
| Method Summary | |
|---|---|
int |
compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object e1,
java.lang.Object e2)
|
int |
compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object e1,
java.lang.Object e2,
int a)
Returns a negative, zero, or positive number depending on whether the first element is less than, equal to, or greater than the second element. |
int |
getTopPriority()
Gets the top priority. |
int |
getTopPriorityDirection()
Gets the top priority direction |
void |
reverseTopPriority()
Reverses the top priority |
void |
setTopPriority(int priority)
Sets the top priority. |
void |
setTopPriorityDirection(int direction)
Sets the top priority direction |
| Methods inherited from class org.eclipse.jface.viewers.ViewerComparator |
|---|
category, getComparator, isSorterProperty, sort |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_DEPTH
public static final int ASCENDING
public static final int DESCENDING
protected ServersViewLabelProvider labelProvider
protected int[] priorities
protected int[] directions
| Constructor Detail |
|---|
public ServersViewerComparator(ServersViewLabelProvider labelProvider)
labelProvider - the label provider| Method Detail |
|---|
public void setTopPriority(int priority)
priority - the prioritypublic int getTopPriority()
public void setTopPriorityDirection(int direction)
direction - the directionpublic int getTopPriorityDirection()
public void reverseTopPriority()
public int compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object e1,
java.lang.Object e2,
int a)
The default implementation of this method is based on
comparing the elements' categories as computed by the category
framework method. Elements within the same category are further
subjected to a case insensitive compare of their label strings, either
as computed by the content viewer's label provider, or their
toString values in other cases. Subclasses may override.
viewer - the viewere1 - the first elemente2 - the second elementa - the direction
0 if the first element is
equal to the second element; and a positive number if the first
element is greater than the second element
public int compare(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object e1,
java.lang.Object e2)
compare in class org.eclipse.jface.viewers.ViewerComparator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||