|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.activity.main.cb.GroupingManager
final class GroupingManager
Handles the first menu, the grouping menu.
| Constructor Summary | |
|---|---|
GroupingManager()
|
|
| Method Summary | |
|---|---|
boolean |
canReturnTracks()
Checks if this manager can provide a list of tracks. |
List<String> |
getDisplayableContent()
Returns string representation of items contained in this manager. |
int |
getIndexOfPreviouslyActivatedItem(IContentManager contentManager)
When activating an item, the manager should keep track of this item so that it can return its index when going back. |
String |
getSelectedItemName()
Returns selected item as a displayable string. |
List<TrackMetadataBean> |
getTracks(Interval selection)
Computes a list of tracks. |
IContentManager |
goBack()
Returns a content manager which will handle contents after a back operation. |
boolean |
initialize(boolean isYear,
ICollection collection)
Initialize this manager and fetch the data. |
IContentManager |
itemActivated(int i)
User activated given item. |
void |
uninitialize()
This manager will not be used for a while. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
GroupingManager()
| Method Detail |
|---|
public IContentManager goBack()
IContentManagerReturns a content manager which will handle contents after a back operation.
This method is run in handler's thread.
goBack in interface IContentManagernull if the back
operation is not allowed. Returned manager instance is
uninitialized.
public boolean initialize(boolean isYear,
ICollection collection)
IContentManager
Initialize this manager and fetch the data. This method will not be
invoked in handler's thread. This is the first method invoked on a new
manager (or managers retrieved by IContentManager.goBack() and
IContentManager.itemActivated(int) methods).
The manager may be initialized multiple times with different values of
the isYear. The manager should simply do nothing if its
previous contents does not change.
initialize in interface IContentManagerisYear - true if year is displayed, false
otherwise.collection - the collection to poll data from.
public void uninitialize()
IContentManager
uninitialize in interface IContentManagerpublic IContentManager itemActivated(int i)
IContentManagerUser activated given item. Return a new manager which will handle new contents.
This method is run in handler's thread.
itemActivated in interface IContentManageri - the item index.
null if we cannot move
forward. Returned manager instance is uninitialized.public List<String> getDisplayableContent()
IContentManagerReturns string representation of items contained in this manager.
This method is run in handler's thread.
getDisplayableContent in interface IContentManagernull, may be empty.public boolean canReturnTracks()
IContentManager
canReturnTracks in interface IContentManagertrue if the manager is able to provide a list of
tracks.public List<TrackMetadataBean> getTracks(Interval selection)
IContentManagerIContentManager.canReturnTracks() returns
true. This method is not run in handler's thread.
getTracks in interface IContentManagerselection - the selection
public int getIndexOfPreviouslyActivatedItem(IContentManager contentManager)
IContentManager
getIndexOfPreviouslyActivatedItem in interface IContentManagercontentManager - the other manager on the same level.
public String getSelectedItemName()
IContentManager
getSelectedItemName in interface IContentManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||