public class SourceListCategory extends Object implements TextProvider
SourceList. SourceListCategorys are top level containers for
SourceListItems. SourceListCategorys are text only, and rendered in full caps
(regardless of supplied text capitalization).| Constructor and Description |
|---|
SourceListCategory(String text)
Creates a
SourceListCategory with the given text. |
SourceListCategory(String text,
boolean collapsable)
Creates a
SourceListCategory with the given text. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsItem(SourceListItem item)
Returns
true if the given SourceListItem is contained by this category, to
include being a sub-element of another SourceListItem contained by this category. |
int |
getItemCount()
Gets the number of child
SourceListItems that are part of this category. |
List<SourceListItem> |
getItems()
Gets a list of this
SourceListCategory's SourceListItems. |
String |
getText()
Gets the category text.
|
boolean |
isCollapsable()
true if this SourceListCategory is collapsable. |
void |
setText(String text)
Sets the text to use for this
SourceListCategory. |
String |
toString()
Returns a
String representation of this SourceListCategory. |
public SourceListCategory(String text)
SourceListCategory with the given text. The capitalization of the text will
be ignored, as categories are rendered in full caps.text - the category text. Cannot be null.public SourceListCategory(String text, boolean collapsable)
SourceListCategory with the given text. The capitalization of the text will
be ignored, as categories are rendered in full caps. If this SourceListCategory is marked as not
collapsable, then no disclosure icon will be shown, making the SourceListCategory always expanded.text - the SourceListCategory text. Cannot be null.collapsable - true if this SourceListCategory should be collapsable.public String getText()
getText in interface TextProviderpublic void setText(String text)
SourceListCategory. The capitalization of the text will
be ignored, as categories are rendered in full caps.text - the category text.public boolean isCollapsable()
true if this SourceListCategory is collapsable.true if this SourceListCategory is collapsable.public int getItemCount()
SourceListItems that are part of this category.SourceListItems that are part of this category.public boolean containsItem(SourceListItem item)
true if the given SourceListItem is contained by this category, to
include being a sub-element of another SourceListItem contained by this category.item - the SourceListItem to determine whether or not is contained by this
category.true if the given SourceListItem is contained within this category
or within on of this categories SourceListItems.public List<SourceListItem> getItems()
SourceListCategory's SourceListItems.SourceListCategory's SourceListItems.