|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.util.SimpleWeakList
danger.util.ActiveList.WeakDelegateList
danger.util.ActiveFolder.WeakDelegateList
public static class ActiveFolder.WeakDelegateList
List of delegates which are held onto weakly. Instances of this
class are used to hold multiple delegates that have been added to a
single list instance. All of the on*() methods call
that same method with the same arguments on each of the delegates in
the list. Note that the SimpleWeakList.add(java.lang.Object) and SimpleWeakList.remove(java.lang.Object) methods
are simply the inherited Object-accepting ones, but
the guts of this class assume that the only things ever added are
appropriate delegates.
| Field Summary | |
|---|---|
protected boolean |
mOpen
used while iterating |
protected static int |
ON_SET_DATA
|
protected static int |
ON_SET_OPEN
|
protected static int |
ON_SET_TITLE
|
| Fields inherited from class danger.util.ActiveList.WeakDelegateList |
|---|
mIndex, mItem, mItems, mList, mOperation, ON_ITEM_ADDED, ON_ITEM_REMOVED, ON_ITEM_UPDATED, ON_ITEMS_REORDERED, ON_RANGE_ADDED, ON_RANGE_REMOVED |
| Constructor Summary | |
|---|---|
ActiveFolder.WeakDelegateList()
Construct an instance with an initial capacity of 4. |
|
ActiveFolder.WeakDelegateList(int initialCapacity)
Construct an instance. |
|
| Method Summary | |
|---|---|
protected void |
accept(Object obj)
Do the operation for a delegate. |
ActiveFolder |
getFolder()
Get the folder that this delegate represents, if any. |
void |
onSetData(ActiveFolder folder,
Object data)
This method is called whenever the arbitrary data object of a folder is changed. |
void |
onSetOpen(ActiveFolder folder,
boolean open)
This method is called whenever the opened state of a folder is changed. |
void |
onSetTitle(ActiveFolder folder,
String title)
This method is called whenever the title of a folder is changed. |
| Methods inherited from class danger.util.ActiveList.WeakDelegateList |
|---|
getDelegate, onItemAdded, onItemRemoved, onItemsReordered, onItemUpdated, onRangeAdded, onRangeRemoved |
| Methods inherited from class danger.util.SimpleWeakList |
|---|
accept, add, contains, forEachAccept, forEachAccept, get, matchesTarget, remove, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface danger.util.ActiveList.Delegate |
|---|
onItemAdded, onItemRemoved, onItemsReordered, onItemUpdated, onRangeAdded, onRangeRemoved |
| Field Detail |
|---|
protected static final int ON_SET_OPEN
protected static final int ON_SET_TITLE
protected static final int ON_SET_DATA
protected boolean mOpen
| Constructor Detail |
|---|
public ActiveFolder.WeakDelegateList(int initialCapacity)
initialCapacity - initial capacity of the list; it will
expand as neededpublic ActiveFolder.WeakDelegateList()
4.
| Method Detail |
|---|
public ActiveFolder getFolder()
ActiveFolder.Delegatereturn
null.
getFolder in interface ActiveFolder.Delegate
public void onSetOpen(ActiveFolder folder,
boolean open)
ActiveFolder.DelegateStdActiveFolder.setOpen(boolean) is a
concrete method that can change the opened state of a folder.
onSetOpen in interface ActiveFolder.Delegatefolder - non-null; the folder which was updatedopen - the new opened state
public void onSetTitle(ActiveFolder folder,
String title)
ActiveFolder.DelegateStdActiveFolder.setTitle(java.lang.String) is
a concrete method that can change the title of a folder.
onSetTitle in interface ActiveFolder.Delegatefolder - non-null; the folder which was updatedtitle - non-null; the new title
public void onSetData(ActiveFolder folder,
Object data)
ActiveFolder.DelegateStdActiveFolder.setData(java.lang.Object)
is a concrete method that can change the data object of a
folder.
onSetData in interface ActiveFolder.Delegatefolder - non-null; the folder which was updateddata - null-ok; the new dataprotected void accept(Object obj)
ActiveList.WeakDelegateList
accept in class ActiveList.WeakDelegateListobj - non-null; the delegate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||