Class DefaultBreadCrumbsModel
java.lang.Object
org.apache.wicket.extensions.breadcrumb.DefaultBreadCrumbsModel
- All Implemented Interfaces:
Serializable
,IBreadCrumbModel
,IClusterable
Default breadcrumb model implementation that should be good for 99% of the use cases out there.
- Author:
- eelcohillenius
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
activate
(IBreadCrumbParticipant breadCrumbParticipant) Activates the bread crumb participant.final void
addListener
(IBreadCrumbModelListener listener) Adds a bread crumb model listener.final List<IBreadCrumbParticipant>
Lists the bread crumb participants in this model.Gets the currently active participant, if any.final void
removeListener
(IBreadCrumbModelListener listener) Removes a bread crumb model listener.final void
setActive
(IBreadCrumbParticipant breadCrumbParticipant) Sets thebread crumb
as the active one.
-
Constructor Details
-
DefaultBreadCrumbsModel
public DefaultBreadCrumbsModel()Construct.
-
-
Method Details
-
addListener
Description copied from interface:IBreadCrumbModel
Adds a bread crumb model listener.- Specified by:
addListener
in interfaceIBreadCrumbModel
- Parameters:
listener
- The listener to add- See Also:
-
allBreadCrumbParticipants
Description copied from interface:IBreadCrumbModel
Lists the bread crumb participants in this model.- Specified by:
allBreadCrumbParticipants
in interfaceIBreadCrumbModel
- Returns:
- The bread crumbs participants, as list with
bread crumb participants
. - See Also:
-
getActive
Description copied from interface:IBreadCrumbModel
Gets the currently active participant, if any.- Specified by:
getActive
in interfaceIBreadCrumbModel
- Returns:
- The currently active participant, may be null
- See Also:
-
removeListener
Description copied from interface:IBreadCrumbModel
Removes a bread crumb model listener.- Specified by:
removeListener
in interfaceIBreadCrumbModel
- Parameters:
listener
- The listener to remove- See Also:
-
setActive
Description copied from interface:IBreadCrumbModel
Sets thebread crumb
as the active one. Implementations should callbread crumb added
when the bread crumb was not yet part of the model, andbread crumb removed
for every crumb that was removed as the result of this call.- Specified by:
setActive
in interfaceIBreadCrumbModel
- Parameters:
breadCrumbParticipant
- The bread crump that should be set as the currently active- See Also:
-
activate
Activates the bread crumb participant.- Parameters:
breadCrumbParticipant
- The participant to activate
-