|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.markup.head.PriorityFirstComparator
public class PriorityFirstComparator
Implements the default sorting algorithm for HeaderItem
s. PriorityHeaderItem
s are
moved to the front, inverting the component order to convert the child-first into a parent-first
order. If renderPageFirst
is true, the head from the markup of a page is moved to the
front of the header, directly after the priority header items.
Nested Class Summary | |
---|---|
protected static class |
PriorityFirstComparator.HeaderItemType
|
Constructor Summary | |
---|---|
PriorityFirstComparator(boolean renderPageFirst)
Construct. |
Method Summary | |
---|---|
int |
compare(ResourceAggregator.RecordedHeaderItem o1,
ResourceAggregator.RecordedHeaderItem o2)
|
protected int |
compareWithinGroup(ResourceAggregator.RecordedHeaderItem o1,
ResourceAggregator.RecordedHeaderItem o2)
Compares two header items that belong in the same group. |
protected PriorityFirstComparator.HeaderItemType |
getItemType(ResourceAggregator.RecordedHeaderItem item)
Determines the type of the item: priority, page or component. |
protected int |
inversedComponentOrder(ResourceAggregator.RecordedHeaderItem o1,
ResourceAggregator.RecordedHeaderItem o2)
Compares two priority header items, converting the child-first order into parent-first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public PriorityFirstComparator(boolean renderPageFirst)
renderPageFirst
- when true, the header of the page is moved to the front.Method Detail |
---|
public int compare(ResourceAggregator.RecordedHeaderItem o1, ResourceAggregator.RecordedHeaderItem o2)
compare
in interface Comparator<ResourceAggregator.RecordedHeaderItem>
protected int compareWithinGroup(ResourceAggregator.RecordedHeaderItem o1, ResourceAggregator.RecordedHeaderItem o2)
o1
- o2
-
protected int inversedComponentOrder(ResourceAggregator.RecordedHeaderItem o1, ResourceAggregator.RecordedHeaderItem o2)
o1
- o2
-
protected PriorityFirstComparator.HeaderItemType getItemType(ResourceAggregator.RecordedHeaderItem item)
item
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |