Package org.apache.wicket.markup.head
Class PriorityHeaderItem
- java.lang.Object
-
- org.apache.wicket.markup.head.HeaderItem
-
- org.apache.wicket.markup.head.PriorityHeaderItem
-
- All Implemented Interfaces:
Serializable
,IWrappedHeaderItem
,IClusterable
public class PriorityHeaderItem extends HeaderItem implements IWrappedHeaderItem
HeaderItem
that has priority over other header items.PriorityHeaderItem
s rendered parent-first at the beginning of the header. Dependencies of aPriorityHeaderItem
also have priority.- Author:
- papegaaij
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PriorityHeaderItem(HeaderItem wrapped)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<HeaderItem>
getDependencies()
Iterable<? extends HeaderItem>
getProvidedResources()
Iterable<?>
getRenderTokens()
HeaderItem
getWrapped()
int
hashCode()
void
render(Response response)
Renders theHeaderItem
to the response.String
toString()
PriorityHeaderItem
wrap(HeaderItem item)
Wraps an existing HeaderItem
-
-
-
Constructor Detail
-
PriorityHeaderItem
public PriorityHeaderItem(HeaderItem wrapped)
Construct.- Parameters:
wrapped
- the actualHeaderItem
that should have priority
-
-
Method Detail
-
getWrapped
public HeaderItem getWrapped()
- Specified by:
getWrapped
in interfaceIWrappedHeaderItem
- Returns:
- the actual
HeaderItem
-
wrap
public PriorityHeaderItem wrap(HeaderItem item)
Description copied from interface:IWrappedHeaderItem
Wraps an existing HeaderItem- Specified by:
wrap
in interfaceIWrappedHeaderItem
- Parameters:
item
- The item to wrap- Returns:
- the wrapped header item
-
getRenderTokens
public Iterable<?> getRenderTokens()
- Specified by:
getRenderTokens
in classHeaderItem
- Returns:
- The tokens this
HeaderItem
can be identified by. If any of the tokens has already been rendered, thisHeaderItem
will not be rendered.
-
render
public void render(Response response)
Description copied from class:HeaderItem
Renders theHeaderItem
to the response.- Specified by:
render
in classHeaderItem
-
getDependencies
public List<HeaderItem> getDependencies()
- Overrides:
getDependencies
in classHeaderItem
- Returns:
- The dependencies this
HeaderItem
has. Dependencies will always be rendered before the item itself.
-
getProvidedResources
public Iterable<? extends HeaderItem> getProvidedResources()
- Overrides:
getProvidedResources
in classHeaderItem
- Returns:
- The resources this
HeaderItem
provides. As these resources are provided by this item, they will no longer be rendered.
-
-