Class DefaultBreadCrumbsModel
- java.lang.Object
-
- org.apache.wicket.extensions.breadcrumb.DefaultBreadCrumbsModel
-
- All Implemented Interfaces:
Serializable
,IBreadCrumbModel
,IClusterable
public class DefaultBreadCrumbsModel extends Object implements IBreadCrumbModel
Default breadcrumb model implementation that should be good for 99% of the use cases out there.- Author:
- eelcohillenius
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultBreadCrumbsModel()
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(IBreadCrumbParticipant breadCrumbParticipant)
Activates the bread crumb participant.void
addListener(IBreadCrumbModelListener listener)
Adds a bread crumb model listener.List<IBreadCrumbParticipant>
allBreadCrumbParticipants()
Lists the bread crumb participants in this model.IBreadCrumbParticipant
getActive()
Gets the currently active participant, if any.void
removeListener(IBreadCrumbModelListener listener)
Removes a bread crumb model listener.void
setActive(IBreadCrumbParticipant breadCrumbParticipant)
Sets thebread crumb
as the active one.
-
-
-
Constructor Detail
-
DefaultBreadCrumbsModel
public DefaultBreadCrumbsModel()
Construct.
-
-
Method Detail
-
addListener
public final void addListener(IBreadCrumbModelListener listener)
Description copied from interface:IBreadCrumbModel
Adds a bread crumb model listener.- Specified by:
addListener
in interfaceIBreadCrumbModel
- Parameters:
listener
- The listener to add- See Also:
IBreadCrumbModel.addListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
-
allBreadCrumbParticipants
public final List<IBreadCrumbParticipant> 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:
IBreadCrumbModel.allBreadCrumbParticipants()
-
getActive
public IBreadCrumbParticipant 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:
IBreadCrumbModel.getActive()
-
removeListener
public final void removeListener(IBreadCrumbModelListener listener)
Description copied from interface:IBreadCrumbModel
Removes a bread crumb model listener.- Specified by:
removeListener
in interfaceIBreadCrumbModel
- Parameters:
listener
- The listener to remove- See Also:
IBreadCrumbModel.removeListener(org.apache.wicket.extensions.breadcrumb.IBreadCrumbModelListener)
-
setActive
public final void setActive(IBreadCrumbParticipant breadCrumbParticipant)
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:
IBreadCrumbModel.setActive(org.apache.wicket.extensions.breadcrumb.IBreadCrumbParticipant)
-
activate
protected final void activate(IBreadCrumbParticipant breadCrumbParticipant)
Activates the bread crumb participant.- Parameters:
breadCrumbParticipant
- The participant to activate
-
-