T
- Type of associated data.public final class BreadcrumbItem<T>
extends java.lang.Object
JBreadcrumbBar
model.Modifier and Type | Field | Description |
---|---|---|
protected T |
data |
Data value for this item.
|
protected java.lang.String |
key |
Display key for this item.
|
Constructor | Description |
---|---|
BreadcrumbItem(java.lang.String s) |
Creates a new item.
|
BreadcrumbItem(java.lang.String key,
T data) |
Creates a new item.
|
Modifier and Type | Method | Description |
---|---|---|
T |
getData() |
|
javax.swing.Icon |
getIcon() |
Returns the icon of
this item. |
int |
getIndex() |
Returns the index of
this item. |
java.lang.String |
getKey() |
|
void |
setIcon(javax.swing.Icon icon) |
Sets the new icon on
this item. |
void |
setIndex(int index) |
Sets the index of
this item. |
void |
setKey(java.lang.String key) |
|
java.lang.String |
toString() |
protected java.lang.String key
protected T data
public BreadcrumbItem(java.lang.String key, T data)
key
- Item key.data
- Item data.public BreadcrumbItem(java.lang.String s)
s
- String that will be used for display purposes.public java.lang.String getKey()
public T getData()
public void setKey(java.lang.String key)
public int getIndex()
this
item.this
item.public void setIndex(int index)
this
item.index
- The new index of this
item.public java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.Icon getIcon()
this
item.this
item.public void setIcon(javax.swing.Icon icon)
this
item.icon
- The new icon for this
item.