|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.explodingpixels.macwidgets.SourceListItem
public class SourceListItem
An item in a SourceList
which is contained within a SourceListCategory
.
Field Summary | |
---|---|
static String |
COUNTER_VALUE
|
static String |
ICON
|
static String |
TEXT
|
Constructor Summary | |
---|---|
SourceListItem(String text)
Creates a SourceListItem with the given text. |
|
SourceListItem(String text,
Icon icon)
Creates a SourceListItem with the given text and icon. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener on this SourceListItem . |
boolean |
containsItem(SourceListItem item)
Returns true if the given SourceListItem is contained by this item, to
include being a sub-element of another child SourceListItem . |
List<SourceListItem> |
getChildItems()
Gets a list of this SourceListItem 's child SourceListItem s. |
int |
getCounterValue()
Gets the counter value to use for this item. |
Icon |
getIcon()
Gets the icon to use for this item. |
String |
getText()
Gets the text to use for this item. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from this SourceListItem . |
void |
setCounterValue(int counterValue)
Sets the counter value to use for this item. |
void |
setIcon(Icon icon)
Sets the icon to use for this item. |
void |
setText(String text)
Sets the text to use for this item. |
String |
toString()
Returns a String representation of this SourceListItem . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String TEXT
public static final String ICON
public static final String COUNTER_VALUE
Constructor Detail |
---|
public SourceListItem(String text)
SourceListItem
with the given text.
text
- the item text. Cannot be null.
IllegalArgumentException
- if the text is null.public SourceListItem(String text, Icon icon)
SourceListItem
with the given text and icon.
text
- the item text. Cannot be null.icon
- the item icon. Can be null.
IllegalArgumentException
- if the text is null.Method Detail |
---|
public String getText()
getText
in interface TextProvider
public void setText(String text)
text
- the text to use for this item. Cannot be null.
IllegalArgumentException
- if the text is null.public Icon getIcon()
getIcon
in interface IconProvider
public void setIcon(Icon icon)
icon
- the icon to use for this item. Can be null.public int getCounterValue()
getCounterValue
in interface SourceListBadgeContentProvider
public void setCounterValue(int counterValue)
counterValue
- the counter value to use for this item. Must be >= 0.
IllegalArgumentException
- if the counter value is not >= 0.public boolean containsItem(SourceListItem item)
true
if the given SourceListItem
is contained by this item, to
include being a sub-element of another child SourceListItem
.
item
- the SourceListItem
to determine whether or not is contained by this
item.
true
if the given SourceListItem
is contained within this item
or within on of this items child SourceListItem
s.public String toString()
String
representation of this SourceListItem
.
toString
in class Object
String
representation of this SourceListItem
.public List<SourceListItem> getChildItems()
SourceListItem
's child SourceListItem
s.
SourceListItem
's child SourceListItem
s.public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
on this SourceListItem
.
listener
- the listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener
from this SourceListItem
.
listener
- the listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |