public class MapGroupHierarchyListItem extends AbstractHierarchyListItem2 implements MapGroup.OnGroupListChangedListener, MapGroup.OnItemListChangedListener, Visibility2, GroupDelete, Search, Export
HierarchyListItem.ComparatorSort, HierarchyListItem.Sort, HierarchyListItem.SortAlphabet, HierarchyListItem.SortAlphabetDesc, HierarchyListItem.SortDistanceFrom
Modifier and Type | Field and Description |
---|---|
static MapGroup.MapItemsCallback |
ADD_TO_OBJ_LIST_FUNC |
protected int |
deepCount |
protected MapGroup |
group |
protected java.util.Map<MapGroup,HierarchyListItem> |
groupMap |
protected MapGroup.MapItemsCallback |
itemFilter |
protected MapView |
mapView |
protected java.util.Comparator<HierarchyListItem> |
order |
protected MapGroupHierarchyListItem |
parent |
asyncRefresh, children, disposed, filter, listener, postFilter, reusable, uiHandler
INVISIBLE, SEMI_VISIBLE, VISIBLE
Constructor and Description |
---|
MapGroupHierarchyListItem(MapGroupHierarchyListItem parent,
MapView mapView,
MapGroup group,
HierarchyListFilter filter,
android.widget.BaseAdapter listener) |
MapGroupHierarchyListItem(MapGroupHierarchyListItem parent,
MapView mapView,
MapGroup group,
MapGroup.MapItemsCallback itemFilter,
HierarchyListFilter filter,
android.widget.BaseAdapter listener) |
Modifier and Type | Method and Description |
---|---|
static boolean |
addToObjList(MapGroup group) |
static boolean |
addToObjList(MapGroup group,
MapGroup.MapItemsCallback filter) |
protected HierarchyListItem |
createChild(MapGroup group) |
protected HierarchyListItem |
createChild(MapItem item) |
void |
dispose()
Unregister any listeners,
|
java.util.Set<HierarchyListItem> |
find(java.lang.String terms) |
java.util.List<Delete> |
getDeleteActions()
Get the list of delete actions in this class
Meant to serve as a default implementation of
GroupDelete.getDeleteActions() |
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.
|
int |
getPreferredListIndex()
Returns the preferred index in the list for the item to be displayed at.
|
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 |
hideIfEmpty()
Count towards parent children if this item's children is empty
|
protected void |
invalidate(boolean deep) |
boolean |
isSupported(java.lang.Class<?> target)
Check if this instance supports the specified target class type
|
boolean |
isVisible()
Gets the current visibility state.
|
void |
onGroupAdded(MapGroup group,
MapGroup parent) |
void |
onGroupRemoved(MapGroup group,
MapGroup parent) |
void |
onItemAdded(MapItem item,
MapGroup group) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
protected void |
refreshImpl()
Refresh implementation to be run on a background thread
If your class doesn't need to refresh then override the filter
method above to avoid unnecessary threading
|
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
|
async, buildQueryParams, delete, disposeChildren, disposeItems, findChild, getAction, getAssociationKey, getChildActions, getChildAt, getChildCount, getChildren, getCustomLayout, getDefaultSortModes, getDescription, getDropDownSize, getExtraView, getFilter, getFooterView, getHeaderView, getIconColor, getIconDrawable, getListItemView, getLocalData, getLocalData, getSorts, getUID, getVisibility, isChildSupported, isDisposed, isGetChildrenSupported, isMultiSelectSupported, notifyListener, notifyListener, postAccept, postRefresh, refresh, refresh, refresh, refresh, requestRefresh, requestRefresh, search, setLocalData, setPostFilter, sortItems, syncRefresh, updateChildren
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVisibility
delete
public static final MapGroup.MapItemsCallback ADD_TO_OBJ_LIST_FUNC
protected final MapGroupHierarchyListItem parent
protected final MapView mapView
protected final MapGroup group
protected final MapGroup.MapItemsCallback itemFilter
protected int deepCount
protected final java.util.Map<MapGroup,HierarchyListItem> groupMap
protected java.util.Comparator<HierarchyListItem> order
public MapGroupHierarchyListItem(MapGroupHierarchyListItem parent, MapView mapView, MapGroup group, HierarchyListFilter filter, android.widget.BaseAdapter listener)
public MapGroupHierarchyListItem(MapGroupHierarchyListItem parent, MapView mapView, MapGroup group, MapGroup.MapItemsCallback itemFilter, HierarchyListFilter filter, android.widget.BaseAdapter listener)
public void dispose()
HierarchyListItem2
dispose
in interface HierarchyListItem2
dispose
in class AbstractHierarchyListItem2
protected HierarchyListItem createChild(MapGroup group)
protected HierarchyListItem createChild(MapItem item)
protected void invalidate(boolean deep)
public int getPreferredListIndex()
HierarchyListItem
getPreferredListIndex
in interface HierarchyListItem
getPreferredListIndex
in class AbstractHierarchyListItem2
-1
to indicate no preference
(FIFO).public java.lang.String getTitle()
HierarchyListItem
getTitle
in interface HierarchyListItem
public int getDescendantCount()
HierarchyListItem
getDescendantCount
in interface HierarchyListItem
public java.lang.String getIconUri()
HierarchyListItem
getIconUri
in interface HierarchyListItem
getIconUri
in class AbstractHierarchyListItem2
null
if the node
has no icon, or "gone" to remove the icon space entirely.public java.lang.Object getUserObject()
HierarchyListItem
getUserObject
in interface HierarchyListItem
null
.public android.view.View getExtraView()
HierarchyListItem
getExtraView
in interface HierarchyListItem
getExtraView
in class AbstractHierarchyListItem2
null
if there is no view.protected void refreshImpl()
AbstractHierarchyListItem2
refreshImpl
in class AbstractHierarchyListItem2
public boolean hideIfEmpty()
HierarchyListItem2
hideIfEmpty
in interface HierarchyListItem2
public boolean isVisible()
Visibility
isVisible
in interface Visibility
isVisible
in class AbstractHierarchyListItem2
public boolean setVisible(boolean visible)
Visibility
setVisible
in interface Visibility
setVisible
in class AbstractHierarchyListItem2
visible
- boolean true is visible, false invisible.public java.util.List<Delete> getDeleteActions()
AbstractHierarchyListItem2
GroupDelete.getDeleteActions()
getDeleteActions
in interface GroupDelete
getDeleteActions
in class AbstractHierarchyListItem2
public java.util.Set<HierarchyListItem> find(java.lang.String terms)
find
in interface Search
find
in class AbstractHierarchyListItem2
public void onItemAdded(MapItem item, MapGroup group)
onItemAdded
in interface MapGroup.OnItemListChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapGroup.OnItemListChangedListener
public void onGroupAdded(MapGroup group, MapGroup parent)
onGroupAdded
in interface MapGroup.OnGroupListChangedListener
public void onGroupRemoved(MapGroup group, MapGroup parent)
onGroupRemoved
in interface MapGroup.OnGroupListChangedListener
public static boolean addToObjList(MapGroup group)
public static boolean addToObjList(MapGroup group, MapGroup.MapItemsCallback filter)
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.