public abstract class HierarchyListUserSelect extends HierarchyListFilter
HierarchyListReceiver
, implementations must implement a constructor
with signature: ctor(Context, String)Modifier and Type | Class and Description |
---|---|
static class |
HierarchyListUserSelect.ButtonMode
ALWAYS_VISIBLE Button always visible VISIBLE_WHEN_SELECTED Button visible when at least one
item is selected
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
_multiSelect |
protected java.lang.String |
_tag
Tag e.g.
|
protected long |
actions |
static java.util.Comparator<HierarchyListUserSelect> |
COMP_TITLE |
protected java.util.List<java.lang.String> |
mapItemUIDs
List of specific Map Items to display, others will be filtered out by base impl
|
sort
Constructor and Description |
---|
HierarchyListUserSelect(java.lang.String tag,
long actions) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(HierarchyListItem item)
Return true if item should be displayed, otherwise item will be hidden
|
boolean |
acceptEntry(HierarchyListItem item)
Test to allow user to enter this item's sub-list
|
boolean |
acceptRootList()
Whether to show this select handler as a multi-select option when the
user is on the root list of Overlay Manager.
|
void |
cancel(android.content.Context context)
The user has cancelled multi-select
|
protected boolean |
filterGroup(MapGroup group)
Default impl filters out if group has no items in mapItemUIDs
If mapItemsUIDs is empty, does not filter
|
protected boolean |
filterItem(MapItem item)
Default impl filters out if item is not in mapItemUIDs
If mapItemsUIDs is empty, does not filter
|
protected boolean |
filterListItemImpl(HierarchyListItem item)
Default impl filters out misc list items (not MapItem, MapGroup, MapOverlay)
|
protected boolean |
filterOverlay(MapOverlay overlay)
Default impl filters out if it is a FilterMapOverlay, and it has no unfiltered children
|
long |
getActions()
Returns the action(s) that may be performed by the selection handler.
|
abstract HierarchyListUserSelect.ButtonMode |
getButtonMode()
Get Button Mode for the user select handler
|
abstract java.lang.String |
getButtonText()
Provide text for button once item(s) are selected
|
int |
getChildCount(HierarchyListItem item)
Default impl applies filters to MapGroup and FilterMapOverlay
|
int |
getDescendantCount(HierarchyListItem item)
Default impl applies filters to MapGroup and FilterMapOverlay
|
protected ExportFilters |
getFilter()
Get the filter to be used in getChildCount and getDescendantCount
Default impl does not filter
|
android.graphics.drawable.Drawable |
getIcon()
Get the icon representing this selector - used externally
|
java.lang.String |
getTag() |
abstract java.lang.String |
getTitle()
Provide title for HierarchyListReceiver Drop Down
|
IToolbarExtension |
getToolbar()
Toolbar view that is displayed while using this select handler
|
boolean |
isExternalUsageSupported()
Whether or not this selector can be used externally by other tools
If this selector is only used for a specific workflow then leave this as false
Otherwise if you want the selector to show up under Overlay Manager > Multi Select, return true
|
boolean |
isMultiSelect()
Whether or not this accepts multiple selections
|
boolean |
onItemDeselected(HierarchyListAdapter om,
HierarchyListItem item)
An item has been deselected
|
boolean |
onItemSelected(HierarchyListAdapter om,
HierarchyListItem item)
An item has been selected
|
abstract boolean |
processUserSelections(android.content.Context context,
java.util.Set<HierarchyListItem> selected)
Process the user selections.
|
void |
setMapItemUIDs(java.util.List<java.lang.String> mapItemUIDs) |
void |
setMultiSelect(boolean multiSelect) |
void |
setTag(java.lang.String tag) |
isDefaultFilter, toString
public static final java.util.Comparator<HierarchyListUserSelect> COMP_TITLE
protected java.lang.String _tag
protected final long actions
protected boolean _multiSelect
protected java.util.List<java.lang.String> mapItemUIDs
public HierarchyListUserSelect(java.lang.String tag, long actions)
public java.lang.String getTag()
public void setTag(java.lang.String tag)
public long getActions()
MapOverlay.getListModel(android.widget.BaseAdapter, long, com.atakmap.android.hierarchy.HierarchyListItem.Sort)
.ACTION_xxx
flags specified in
Actions
.public abstract java.lang.String getTitle()
public abstract java.lang.String getButtonText()
public abstract HierarchyListUserSelect.ButtonMode getButtonMode()
public boolean onItemSelected(HierarchyListAdapter om, HierarchyListItem item)
om
- Overlay manageritem
- Selected itempublic boolean onItemDeselected(HierarchyListAdapter om, HierarchyListItem item)
om
- Overlay manageritem
- Selected itempublic abstract boolean processUserSelections(android.content.Context context, java.util.Set<HierarchyListItem> selected)
context
- Application contextselected
- Set of selected list itemspublic void cancel(android.content.Context context)
context
- Application contextpublic boolean isMultiSelect()
public void setMultiSelect(boolean multiSelect)
public IToolbarExtension getToolbar()
public boolean isExternalUsageSupported()
public boolean acceptRootList()
isExternalUsageSupported()
is
set to true
.public android.graphics.drawable.Drawable getIcon()
public void setMapItemUIDs(java.util.List<java.lang.String> mapItemUIDs)
protected ExportFilters getFilter()
public boolean accept(HierarchyListItem item)
accept
in class HierarchyListFilter
item
- public boolean acceptEntry(HierarchyListItem item)
HierarchyListFilter
acceptEntry
in class HierarchyListFilter
item
- List itemprotected boolean filterListItemImpl(HierarchyListItem item)
item
- protected boolean filterItem(MapItem item)
item
- protected boolean filterGroup(MapGroup group)
group
- protected boolean filterOverlay(MapOverlay overlay)
overlay
- public int getChildCount(HierarchyListItem item)
item
- public int getDescendantCount(HierarchyListItem item)
item
-