|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.flamingo.bcb.BreadcrumbBarModel<T>
T
- Type of data associated with each breadcrumb bar item.public class BreadcrumbBarModel<T>
Model for the breadcrumb bar component (JBreadcrumbBar
).
Constructor Summary | |
---|---|
BreadcrumbBarModel()
Creates a new empty model. |
Method Summary | |
---|---|
void |
addLast(BreadcrumbItem<T> item)
Adds the specified item at the end of the path. |
void |
addPathListener(BreadcrumbPathListener l)
Adds the specified path listener to this model. |
BreadcrumbItem<T> |
getItem(int index)
Returns the model item at the specified index. |
int |
getItemCount()
Returns the number of items in this model. |
java.util.List<BreadcrumbItem<T>> |
getItems()
Returns an unmodifiable list of the items in this model. |
int |
indexOf(BreadcrumbItem<T> item)
Returns the index of the specified item. |
void |
removeLast()
Removes the last item in this model. |
void |
removePathListener(BreadcrumbPathListener l)
Removes the specified path listener from this model. |
void |
replace(java.util.List<BreadcrumbItem<T>> items)
Replaces the current item list with the specified list. |
void |
reset()
Resets this model, removing all the items. |
void |
setCumulative(boolean isCumulative)
Starts or ends the cumulative mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BreadcrumbBarModel()
Method Detail |
---|
public int indexOf(BreadcrumbItem<T> item)
item
- Item.
public void removeLast()
public void reset()
public java.util.List<BreadcrumbItem<T>> getItems()
public int getItemCount()
public BreadcrumbItem<T> getItem(int index)
index
- Item index.
null
if the index is negative or larger than the
number of items.public void replace(java.util.List<BreadcrumbItem<T>> items)
items
- New contents of the model.public void addLast(BreadcrumbItem<T> item)
item
- Item to add.public void setCumulative(boolean isCumulative)
addLast(BreadcrumbItem)
, removeLast()
,
replace(List)
and reset()
will not fire events on the
listeners registered with
addPathListener(BreadcrumbPathListener)
.
isCumulative
- If true
, the model enters cumulative mode. If
false
, the model exist cumulative mode and fires
a path event on all registered listeners with the smallest
index of all changes that have happened since the last time
this method was called with true
.public void addPathListener(BreadcrumbPathListener l)
l
- Path listener to add.public void removePathListener(BreadcrumbPathListener l)
l
- Path listener to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |