public interface IBreadCrumbModel extends IClusterable
Bread crumbs in the original sense just represent where people are in a site hierarchy. For example, when browsing a product site, bread crumbs could look like this:
Home > Products & Solutions > Hardware > Desktop Systemsor
World > Europe > The Netherlands > UtrechtThese items would be rendered as links to the corresponding site location. Classes that implement this interface are responsible for managing such a bread crumb structure. A
typical implementationregards bread crumbs as a stack. When
a bread crumb is activatedthat was not in the stack yet, it would add it to the stack, or when a bread crumb is activated that is already on the stack, it would roll back to the corresponding depth.
This model does not make any presumptions on how it should interact with components. Just that
there is a list of
bread crumb participants, and the notion of a
currently active bread crumb participant.
bread crumb participant is not an actual bread crumb, but rather
a proxy to components that represent a certain location relative to other bread crumbs in this
model, and a means to get the bread crumb title, which is typically rendered as a link label of
the actual bread crumb. The actual bread crumbs are supposed to be rendered by a component that
works together with this model. I choose this model as this would suit what I think is one of the
bread crumb aware panels.
|Modifier and Type||Method and Description|
Adds a bread crumb model listener.
Lists the bread crumb participants in this model.
Gets the currently active participant, if any.
Removes a bread crumb model listener.
void addListener(IBreadCrumbModelListener listener)
listener- The listener to add
bread crumb participants.
void removeListener(IBreadCrumbModelListener listener)
listener- The listener to remove
void setActive(IBreadCrumbParticipant breadCrumbParticipant)
bread crumbas the active one. Implementations should call
bread crumb addedwhen the bread crumb was not yet part of the model, and
bread crumb removedfor every crumb that was removed as the result of this call.
breadCrumbParticipant- The bread crump that should be set as the currently active
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.