public class CategoriesPane extends Pane implements java.lang.Iterable<CategoryItem>
Modifier and Type | Method and Description |
---|---|
void |
expandAll(java.lang.String masterCategory) |
java.util.Set<java.lang.String> |
getAllMasterCategoryTabs()
Get a list of names of all available master categories.
|
Menu |
getContextMenu(java.lang.String masterCategory,
boolean selectionMenu)
Get the context menu for the given master category tab.
|
java.util.Set<ItemIdentifier> |
getExpandedCategories(java.lang.String masterCategory)
Get the set of expanded category items in the given master category tab.
|
MultiCategoryItemCollection |
getMultiCategoryItemCollection(java.lang.String masterCategory)
Get the collection containing the category items of a given master category tab.
|
int |
getSelectedCategoryCount(java.lang.String masterCategory)
Return the number of category items selected in the given master category tab.
|
java.lang.String |
getSelectedMasterCategoryTab()
Return the name of the currently visible master category tab.
|
java.util.List<ItemIdentifier> |
getSelection(java.lang.String masterCategory,
int startIdx,
int numIDs)
Get the identifiers of the selected category items of the given master category tab.
|
java.util.Iterator<CategoryItem> |
iterator()
Return an iterator that iterates over all selected category items in the current master category tab.
|
java.util.Iterator<CategoryItem> |
iterator(java.lang.String masterCategoryTab)
Return an iterator that iterates over all selected category items in the given master category tab.
|
void |
setExpandedCategories(java.lang.String masterCategory,
java.util.Collection<ItemIdentifier> expandedCategories)
Overwrite the set of expanded category items.
|
void |
setSelectedMasterCategoryTab(java.lang.String masterCategory)
Show one of the available master category tabs.
|
void |
setSelection(java.lang.String masterCategory,
java.util.Collection<ItemIdentifier> selection)
Overwrite the selection with the given collection of category item identifiers.
|
void |
showCategories(java.lang.String masterCategory,
java.util.Collection<ItemIdentifier> categoriesToShow)
Expand all category items necessary to show the given category items the given master category tab.
|
equals, getCollectionWindow, getID, getViewSet, grabFocus, isFocusOwner, isVisible, setViewSet, setVisible, supportsViewSets
public java.util.Set<java.lang.String> getAllMasterCategoryTabs()
public java.lang.String getSelectedMasterCategoryTab()
public void setSelectedMasterCategoryTab(java.lang.String masterCategory)
masterCategory
- The name of the master category tab to show.public MultiCategoryItemCollection getMultiCategoryItemCollection(java.lang.String masterCategory)
masterCategory
- The name of the master category tab to access.public int getSelectedCategoryCount(java.lang.String masterCategory)
masterCategory
- The name of the master category tab to access.public java.util.List<ItemIdentifier> getSelection(java.lang.String masterCategory, int startIdx, int numIDs)
masterCategory
- The name of the master category tab to access.startIdx
- The starting zero-based index to start with.numIDs
- The number of category item identifiers to get. You can specify more items than the collection contains. This method will limit the number automatically to the available number of selected items.getSelectedCategoryCount(String)
,
setSelection(String, java.util.Collection)
public void setSelection(java.lang.String masterCategory, java.util.Collection<ItemIdentifier> selection)
masterCategory
- The name of the master category tab to access.selection
- The new selection of category items.getSelection(String, int, int)
public java.util.Set<ItemIdentifier> getExpandedCategories(java.lang.String masterCategory)
masterCategory
- The name of the master category tab to access.setExpandedCategories(String, java.util.Collection)
public void setExpandedCategories(java.lang.String masterCategory, java.util.Collection<ItemIdentifier> expandedCategories)
getExpandedCategories(String)
first.masterCategory
- The name of the master category tab to access.expandedCategories
- The new set of expanded category items.getExpandedCategories(String)
public void expandAll(java.lang.String masterCategory)
public void showCategories(java.lang.String masterCategory, java.util.Collection<ItemIdentifier> categoriesToShow)
masterCategory
- The name of the master category tab to work on.categoriesToShow
- The category items to showpublic Menu getContextMenu(java.lang.String masterCategory, boolean selectionMenu)
masterCategory
- The name of the master category tab to work on.selectionMenu
- Specify true
if you want to get the context menu for the selected category case, false
otherwise.public java.util.Iterator<CategoryItem> iterator(java.lang.String masterCategoryTab)
Iterator- it = iterator ("$Sources"); while (it.hasNext ()) { CategoryItem categoryItem = it.next (); // work on the selected categoryItem }
masterCategoryTab
- The name of the master category tab to work on.public java.util.Iterator<CategoryItem> iterator()
for (CategoryItem categoryItem : categoriesPane) { // work on the selected categoryItem }The iterator returned allows you to remove an item consistently:
Iteratorit = categoriesPane.iterator (); while (it.hasNext ()) { CategoryItem categoryItem = it.next (); // work on the selected categoryItem }
iterator
in interface java.lang.Iterable<CategoryItem>
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.