public abstract class AbstractFolderViewHolder extends Object
AbstractFolder
. Each AbstractFolder
concrete
type should define its view configuration holder by returning the implementation from
AbstractFolder.newFolderViewHolder()
Use-cases:
AbstractFolder
permits the views to be configured by the user, use a
DefaultFolderViewHolder
AbstractFolder
has a fixed set of pre-configured views, the plugin can provide
a custom implementation that returns the fixed set of views.
Constructor and Description |
---|
AbstractFolderViewHolder() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getPrimaryView()
Returns the
View.getViewName() of the primary view or null if the first view should be primary. |
abstract ViewsTabBar |
getTabBar()
Returns the
ViewsTabBar . |
abstract List<View> |
getViews()
Returns the list of views.
|
void |
invalidateCaches()
Called by
AbstractFolder.save() to signal that the view holder should clear any internal state caches. |
boolean |
isPrimaryModifiable()
Returns
true if the primary View is modifiable. |
boolean |
isTabBarModifiable()
Returns
true if the ViewsTabBar is modifiable. |
boolean |
isViewsModifiable()
Returns
true if the list of views is modifiable. |
abstract void |
setPrimaryView(String name)
Changes the primary
View . |
abstract void |
setTabBar(ViewsTabBar tabBar)
Changes the
ViewsTabBar . |
abstract void |
setViews(List<? extends View> views)
Changes the list of
View s. |
@NonNull public abstract List<View> getViews()
isViewsModifiable()
then this list is modifiable.public abstract void setViews(@NonNull List<? extends View> views)
views
- the new list of View
s.isViewsModifiable()
public boolean isViewsModifiable()
true
if the list of views is modifiable.true
if the list of views is modifiable.@CheckForNull public abstract String getPrimaryView()
View.getViewName()
of the primary view or null
if the first view should be primary.View.getViewName()
of the primary view or null
if the first view should be primary.public abstract void setPrimaryView(@CheckForNull String name)
name
- the View.getViewName()
of the primary View
of null
to use the first view.isPrimaryModifiable()
public boolean isPrimaryModifiable()
true
if the primary View
is modifiable.true
if the primary View
is modifiable.@NonNull public abstract ViewsTabBar getTabBar()
ViewsTabBar
.ViewsTabBar
.public abstract void setTabBar(@NonNull ViewsTabBar tabBar)
tabBar
- the new ViewsTabBar
.isTabBarModifiable()
public boolean isTabBarModifiable()
true
if the ViewsTabBar
is modifiable.true
if the ViewsTabBar
is modifiable.public void invalidateCaches()
AbstractFolder.save()
to signal that the view holder should clear any internal state caches.Copyright © 2016–2020. All rights reserved.