Package org.apache.wicket
Class DequeueContext
- java.lang.Object
-
- org.apache.wicket.DequeueContext
-
public final class DequeueContext extends Object
Context for component dequeueing. Keeps track of markup position and container stack.- Author:
- igor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDequeueContext.BookmarkA bookmark for the DequeueContext stack
-
Constructor Summary
Constructors Constructor Description DequeueContext(IMarkupFragment markup, MarkupContainer root, boolean skipFirst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentfindComponentToDequeue(ComponentTag tag)Searches the container stack for a component that can be dequeudebooleanisAtOpenOrOpenCloseTag()Checks if the tag returned bypeekTag()is either open or open-close.MarkupContainerpeekContainer()Retrieves the container on the top of the containers stackComponentTagpeekTag()Peeks markup tag that would be retrieved by call totakeTag()MarkupContainerpopContainer()Pops a container from the container stackvoidpushContainer(MarkupContainer container)Pushes a container onto the container stackvoidrestore(DequeueContext.Bookmark bookmark)Restores the state of the context from the bookmarkDequeueContext.Bookmarksave()Saves the state of the context into a bookmark which can later be used to restore it.voidskipToCloseTag()Skips to the closing tag of the tag retrieved from last call totakeTag()ComponentTagtakeTag()Retrieves the next markup tag
-
-
-
Constructor Detail
-
DequeueContext
public DequeueContext(IMarkupFragment markup, MarkupContainer root, boolean skipFirst)
-
-
Method Detail
-
save
public DequeueContext.Bookmark save()
Saves the state of the context into a bookmark which can later be used to restore it.
-
restore
public void restore(DequeueContext.Bookmark bookmark)
Restores the state of the context from the bookmark- Parameters:
bookmark-
-
peekTag
public ComponentTag peekTag()
Peeks markup tag that would be retrieved by call totakeTag()- Returns:
-
takeTag
public ComponentTag takeTag()
Retrieves the next markup tag- Returns:
-
skipToCloseTag
public void skipToCloseTag()
Skips to the closing tag of the tag retrieved from last call totakeTag()
-
isAtOpenOrOpenCloseTag
public boolean isAtOpenOrOpenCloseTag()
Checks if the tag returned bypeekTag()is either open or open-close.- Returns:
-
peekContainer
public MarkupContainer peekContainer()
Retrieves the container on the top of the containers stack- Returns:
-
pushContainer
public void pushContainer(MarkupContainer container)
Pushes a container onto the container stack- Parameters:
container-
-
popContainer
public MarkupContainer popContainer()
Pops a container from the container stack- Returns:
-
findComponentToDequeue
public Component findComponentToDequeue(ComponentTag tag)
Searches the container stack for a component that can be dequeude- Parameters:
tag-- Returns:
-
-