|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsk.baka.ambient.views.gesturelist.ModelHolder
public final class ModelHolder
Manages the model for the GesturesListView
.
Handles special End Of Playlist item - this item allows us to insert tracks at the end of the playlist (and into an empty playlist) using keypad gestures. The special item is shown only when the list view:
true
even if the list
view does not have focus)touch mode
Field Summary | |
---|---|
(package private) MutableListAdapter |
adapter
The backing adapter. |
Constructor Summary | |
---|---|
ModelHolder(GesturesListView owner)
Creates new instance. |
Method Summary | |
---|---|
Interval |
getAllItems()
Returns interval containing all items. |
Interval |
getHighlight()
Returns current highlight. |
Interval |
getHighlight(boolean returnSelectionOnEmptyHighlight)
Returns current highlight. |
Interval |
getHighlight(int returnSelectionOnEmptyHighlight)
Returns current highlight. |
List<Object> |
getModel()
Returns a list of items. |
void |
highlight(Interval highlight)
Highlight given items. |
void |
notifyModified()
Redraws items and reflects changes made to the getModel() list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final MutableListAdapter adapter
Constructor Detail |
---|
ModelHolder(GesturesListView owner)
owner
- owner listview.Method Detail |
---|
public List<Object> getModel()
Returns a list of items. The backing array of item data. In the MVC
terminology, this is a model for all items. If you plan to modify this
list, do not forget to call notifyModified()
after all
modifications are made.
This model must never contain the
MutableListAdapter.EOP_MODEL_MARKER
object!
public void notifyModified()
getModel()
list.
public void highlight(Interval highlight)
notifyModified()
to force the redraw.
highlight
- items to highlightpublic Interval getHighlight()
null
.public Interval getHighlight(boolean returnSelectionOnEmptyHighlight)
returnSelectionOnEmptyHighlight
- if true
and no items are currently being
highlighted, return current selection.
null
.public Interval getHighlight(int returnSelectionOnEmptyHighlight)
returnSelectionOnEmptyHighlight
- if not negative and no items are currently being highlighted,
return selection consisting of a single item.
null
.public Interval getAllItems()
null
interval.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |