public final class LayerHierarchyListItem extends java.lang.Object implements HierarchyListItem, Visibility2, Visibility
HierarchyListItem.ComparatorSort, HierarchyListItem.Sort, HierarchyListItem.SortAlphabet, HierarchyListItem.SortAlphabetDesc, HierarchyListItem.SortDistanceFromINVISIBLE, SEMI_VISIBLE, VISIBLE| Constructor and Description |
|---|
LayerHierarchyListItem(Layer subject) |
LayerHierarchyListItem(Layer subject,
java.lang.String iconUri,
boolean unwrapProxy) |
| Modifier and Type | Method and Description |
|---|---|
<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.
|
int |
getIconColor()
Returns the color to be applied to the icon.
|
java.lang.String |
getIconUri()
Returns the URI for the icon for the node.
|
java.lang.Object |
getLocalData(java.lang.String s)
Returns the local data associated with the node for the specified key.
|
<T> T |
getLocalData(java.lang.String s,
java.lang.Class<T> clazz)
Returns the local data associated with the node for the specified key.
|
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.String |
getUID()
Returns the unique ID of the list item
|
java.lang.Object |
getUserObject()
Returns the user object associated with the node.
|
int |
getVisibility() |
boolean |
isChildSupported()
Check if list item can contain children
|
boolean |
isVisible()
Gets the current visibility state.
|
HierarchyListItem.Sort |
refresh(HierarchyListItem.Sort sortHint)
Refreshes this node's descendants on the specified sort.
|
java.lang.Object |
setLocalData(java.lang.String s,
java.lang.Object o)
Sets the specified local data on the object.
|
boolean |
setVisible(boolean visible)
Encapsulation of the visibility toggle implementation as an action.
|
public LayerHierarchyListItem(Layer subject)
public LayerHierarchyListItem(Layer subject,
java.lang.String iconUri,
boolean unwrapProxy)
public int getChildCount()
HierarchyListItemgetChildCount in interface HierarchyListItempublic int getDescendantCount()
HierarchyListItemgetDescendantCount in interface HierarchyListItempublic HierarchyListItem getChildAt(int index)
HierarchyListItemgetChildAt in interface HierarchyListItemindex - The indexpublic boolean isChildSupported()
HierarchyListItemisChildSupported in interface HierarchyListItempublic final java.lang.String getUID()
HierarchyListItemgetUID in interface HierarchyListItempublic final java.lang.String getTitle()
HierarchyListItemgetTitle in interface HierarchyListItempublic int getPreferredListIndex()
HierarchyListItemgetPreferredListIndex in interface HierarchyListItem-1 to indicate no preference
(FIFO).public java.lang.String getIconUri()
HierarchyListItemgetIconUri in interface HierarchyListItemnull if the node
has no icon, or "gone" to remove the icon space entirely.public int getIconColor()
HierarchyListItemgetIconColor in interface HierarchyListItem0xFFFFFFFF (-1)
to use the original color.public java.lang.Object setLocalData(java.lang.String s,
java.lang.Object o)
HierarchyListItemsetLocalData in interface HierarchyListItems - The key for the datao - The value for the datapublic java.lang.Object getLocalData(java.lang.String s)
HierarchyListItemgetLocalData in interface HierarchyListItems - The key for the local datapublic <T> T getLocalData(java.lang.String s,
java.lang.Class<T> clazz)
HierarchyListItemgetLocalData in interface HierarchyListItems - The key for the local dataclazz - The return type for the dataT.public <T extends Action> T getAction(java.lang.Class<T> clazz)
HierarchyListItemgetAction in interface HierarchyListItemclazz - The action classnull if the specified
action is not supported for the node.public java.lang.Object getUserObject()
HierarchyListItemgetUserObject in interface HierarchyListItemnull.public android.view.View getExtraView()
HierarchyListItemgetExtraView in interface HierarchyListItemnull if there is no view.public HierarchyListItem.Sort refresh(HierarchyListItem.Sort sortHint)
HierarchyListItemrefresh in interface HierarchyListItemsortHint - The new sortpublic int getVisibility()
getVisibility in interface Visibility2public final boolean setVisible(boolean visible)
VisibilitysetVisible in interface Visibilityvisible - boolean true is visible, false invisible.public final boolean isVisible()
VisibilityisVisible in interface Visibility