public class MvtFileListItem extends AbstractHierarchyListItem implements android.view.View.OnClickListener, android.view.View.OnLongClickListener, Visibility, Search, Delete, Export
HierarchyListItem.ComparatorSort, HierarchyListItem.Sort, HierarchyListItem.SortAlphabet, HierarchyListItem.SortAlphabetDesc, HierarchyListItem.SortDistanceFrom
Constructor and Description |
---|
MvtFileListItem(android.content.Context context,
java.io.File file,
java.util.List<HierarchyListItem> featureSets) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete()
Perform deletion on this item
|
java.util.Set<HierarchyListItem> |
find(java.lang.String terms) |
<T extends Action> |
getAction(java.lang.Class<T> clazz)
Returns an instance of the specified action that can be used to interact with the node's
underlying content.
|
HierarchyListItem |
getChildAt(int index)
Returns the child node at the specified index.
|
int |
getChildCount()
Returns the number of children that this node has.
|
int |
getDescendantCount()
Returns the total number of descendant nodes that this node has.
|
android.view.View |
getExtraView()
Returns the extra view, if any, associated with the node.
|
java.lang.String |
getIconUri()
Returns the URI for the icon for the node.
|
java.lang.String |
getTitle()
Returns the title to be displayed for the item.
|
java.lang.Object |
getUserObject()
Returns the user object associated with the node.
|
boolean |
isSupported(java.lang.Class<?> target)
Check if this instance supports the specified target class type
|
boolean |
isVisible()
Gets the current visibility state.
|
void |
onClick(android.view.View v) |
boolean |
onLongClick(android.view.View view) |
HierarchyListItem.Sort |
refresh(HierarchyListItem.Sort sort)
Refreshes this node's descendants on the specified sort.
|
boolean |
setVisible(boolean visible)
Encapsulation of the visibility toggle implementation as an action.
|
java.lang.Object |
toObjectOf(java.lang.Class<?> target,
ExportFilters filters)
Export to the specified target class type
|
getIconColor, getLocalData, getLocalData, getPreferredListIndex, getUID, isChildSupported, setLocalData
public MvtFileListItem(android.content.Context context, java.io.File file, java.util.List<HierarchyListItem> featureSets)
public java.lang.String getTitle()
HierarchyListItem
getTitle
in interface HierarchyListItem
public java.lang.String getIconUri()
HierarchyListItem
getIconUri
in interface HierarchyListItem
getIconUri
in class AbstractHierarchyListItem
null
if the node
has no icon, or "gone" to remove the icon space entirely.public int getChildCount()
HierarchyListItem
getChildCount
in interface HierarchyListItem
public int getDescendantCount()
HierarchyListItem
getDescendantCount
in interface HierarchyListItem
public HierarchyListItem getChildAt(int index)
HierarchyListItem
getChildAt
in interface HierarchyListItem
index
- The indexpublic <T extends Action> T getAction(java.lang.Class<T> clazz)
HierarchyListItem
getAction
in interface HierarchyListItem
clazz
- The action classnull
if the specified
action is not supported for the node.public java.lang.Object getUserObject()
HierarchyListItem
getUserObject
in interface HierarchyListItem
null
.public android.view.View getExtraView()
HierarchyListItem
getExtraView
in interface HierarchyListItem
null
if there is no view.public HierarchyListItem.Sort refresh(HierarchyListItem.Sort sort)
HierarchyListItem
refresh
in interface HierarchyListItem
sort
- The new sortpublic java.util.Set<HierarchyListItem> find(java.lang.String terms)
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
public boolean onLongClick(android.view.View view)
onLongClick
in interface android.view.View.OnLongClickListener
public boolean setVisible(boolean visible)
Visibility
setVisible
in interface Visibility
visible
- boolean true is visible, false invisible.public boolean isVisible()
Visibility
isVisible
in interface Visibility
public boolean delete()
Delete
public boolean isSupported(java.lang.Class<?> target)
Exportable
isSupported
in interface Exportable
target
- the target classpublic java.lang.Object toObjectOf(java.lang.Class<?> target, ExportFilters filters) throws FormatNotSupportedException
Exportable
toObjectOf
in interface Exportable
target
- the target classfilters
- Allows ExportMarshal
instances to filter e.g. based
on geographic region or other criteriaFormatNotSupportedException
- if there is an issue creating the object.