|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.explodingpixels.macwidgets.SourceListModel
public final class SourceListModel
The backing model to be used with a SourceList.
| Constructor Summary | |
|---|---|
SourceListModel()
|
|
| Method Summary | |
|---|---|
void |
addCategory(SourceListCategory category)
Adds the given category to the model and fires an event such that SourceListModelListeners will be notified. |
void |
addCategory(SourceListCategory category,
int index)
Adds the given category to the model at the given index and fires an event such that SourceListModelListeners will be notified. |
void |
addItemToCategory(SourceListItem item,
SourceListCategory category)
Adds the given item to the given SourceListCategory. |
void |
addItemToCategory(SourceListItem item,
SourceListCategory category,
int index)
Adds the given item to the given SourceListCategory at the given index within that
category. |
void |
addItemToItem(SourceListItem childItem,
SourceListItem parentItem)
Adds the given "child" item to the given "parent" item. |
void |
addItemToItem(SourceListItem childItem,
SourceListItem parentItem,
int index)
Adds the given "child" item to the given "parent" item at the given index. |
void |
addSourceListModelListener(SourceListModelListener listener)
Adds the given SourceListModelListener to the list of listeners. |
void |
checkItemIsInModel(SourceListItem item)
Checks if the given SourceListItem is in this model. |
java.util.List<SourceListCategory> |
getCategories()
Gets the SourceListCategorys associated with this model. |
void |
removeCategory(SourceListCategory category)
Removes the given category from the model and fires an event such that SourceListModelListeners will be notified. |
void |
removeCategoryAt(int index)
Removes the category at the given index from the model and fires an event such that SourceListModelListeners will be notified. |
void |
removeItemFromCategory(SourceListItem item,
SourceListCategory category)
Removes the given item from the given category. |
void |
removeItemFromCategoryAtIndex(SourceListCategory category,
int index)
Removes the item at the given index from the given category. |
void |
removeItemFromItem(SourceListItem parentItem,
int index)
Removes the given child item at from the given parent item. |
void |
removeItemFromItem(SourceListItem childItem,
SourceListItem parentItem)
Removes the given child item at from the given parent item. |
void |
removeSourceListModelListener(SourceListModelListener listener)
Removes the given SourceListModelListener from the list of listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceListModel()
| Method Detail |
|---|
public java.util.List<SourceListCategory> getCategories()
SourceListCategorys associated with this model.
SourceListCategorys associated with this model.public void addCategory(SourceListCategory category)
SourceListModelListeners will be notified.
category - the SourceListCategory to add.
public void addCategory(SourceListCategory category,
int index)
SourceListModelListeners will be notified.
category - the SourceListCategory to add.index - the index to add the category at.public void removeCategory(SourceListCategory category)
SourceListModelListeners will be notified.
category - the SourceListCategory to remove.
java.lang.IllegalArgumentException - if the given category is not part of this model.public void removeCategoryAt(int index)
SourceListModelListeners will be notified.
index - the index of the SourceListCategory to remove.
java.lang.IllegalArgumentException - if there is no category at the given index.
public void addItemToCategory(SourceListItem item,
SourceListCategory category)
SourceListCategory.
item - the item to add.category - the category to add the item to.
java.lang.IllegalStateException - if the given category is not in the model.
public void addItemToCategory(SourceListItem item,
SourceListCategory category,
int index)
SourceListCategory at the given index within that
category.
item - the item to add.category - the category to add the item to.index - the index in the category to add the item.
java.lang.IllegalStateException - if the given category is not in the model.
public void addItemToItem(SourceListItem childItem,
SourceListItem parentItem)
childItem - the item to add to the given parent item.parentItem - the item to add the child item to.
java.lang.IllegalStateException - if the given parent item is not in the model.
public void addItemToItem(SourceListItem childItem,
SourceListItem parentItem,
int index)
SourceListItem will be expanded if it was not a parent but becomes a parent
as a result of this call.
childItem - the item to add to the given parent item.parentItem - the item to add the child item to.index - the index of the parent item at which to add the child item.
java.lang.IllegalStateException - if the given child or parent item is not in the model.
public void removeItemFromCategory(SourceListItem item,
SourceListCategory category)
item - the item to remove from the given category.category - the category form which to remove the given item.
java.lang.IllegalStateException - if the given category is not in the model.
public void removeItemFromCategoryAtIndex(SourceListCategory category,
int index)
category - the category from which to remove the item.index - the index of the item to remove.
java.lang.IllegalStateException - if the given category is not in the model.
public void removeItemFromItem(SourceListItem childItem,
SourceListItem parentItem)
childItem - the item to remove.parentItem - the item from which to remove the given child item.
java.lang.IllegalStateException - if the given child or parent item is not in the model.
public void removeItemFromItem(SourceListItem parentItem,
int index)
parentItem - the item from which to remove the given child item.index - the index of the item to remove.
java.lang.IllegalStateException - if the given child or parent item is not in the model.public void checkItemIsInModel(SourceListItem item)
SourceListItem is in this model.
item - the item to check if is in this model.
java.lang.IllegalArgumentException - if the given item is not part of this model.public void addSourceListModelListener(SourceListModelListener listener)
SourceListModelListener to the list of listeners.
listener - the listener to add.public void removeSourceListModelListener(SourceListModelListener listener)
SourceListModelListener from the list of listeners.
listener - the listener to remove.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||