public abstract class BaseRenderInfo extends java.lang.Object implements RenderInfo
SpanSize will be defaulted to 1. It is the information that is required to calculate how much of the SpanCount the component should occupy in a Grid layout.
IsSticky will be defaulted to false. It determines if the component should be a sticky header or not
IsFullSpan will be defaulted to false. It is the information that determines if the component should occupy all of the SpanCount in a StaggeredGrid layout.
Modifier and Type | Class and Description |
---|---|
static class |
BaseRenderInfo.Builder<T> |
Modifier | Constructor and Description |
---|---|
protected |
BaseRenderInfo(BaseRenderInfo.Builder builder) |
Modifier and Type | Method and Description |
---|---|
void |
addCustomAttribute(java.lang.String key,
java.lang.Object value) |
void |
addDebugInfo(java.lang.String key,
java.lang.Object value) |
Component |
getComponent() |
ComponentsLogger |
getComponentsLogger() |
java.lang.Object |
getCustomAttribute(java.lang.String key) |
java.lang.Object |
getDebugInfo(java.lang.String key) |
java.lang.String |
getLogTag() |
EventHandler<RenderCompleteEvent> |
getRenderCompleteEventHandler() |
int |
getSpanSize() |
ViewBinder |
getViewBinder() |
ViewCreator |
getViewCreator() |
int |
getViewType() |
boolean |
hasCustomViewType() |
boolean |
isFullSpan() |
boolean |
isSticky() |
boolean |
rendersComponent() |
boolean |
rendersView() |
void |
setViewType(int viewType)
Set viewType of current
RenderInfo if it was created through ViewRenderInfo.create() and a custom viewType was not set, or otherwise it will throw UnsupportedOperationException . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected BaseRenderInfo(BaseRenderInfo.Builder builder)
public boolean isSticky()
isSticky
in interface RenderInfo
public int getSpanSize()
getSpanSize
in interface RenderInfo
public boolean isFullSpan()
isFullSpan
in interface RenderInfo
public java.lang.Object getCustomAttribute(java.lang.String key)
getCustomAttribute
in interface RenderInfo
public void addCustomAttribute(java.lang.String key, java.lang.Object value)
addCustomAttribute
in interface RenderInfo
public boolean rendersComponent()
rendersComponent
in interface RenderInfo
RenderInfo
was created through ComponentRenderInfo.create()
,
or false otherwise. This should be queried before accessing getComponent()
from
RenderInfo
type.public Component getComponent()
getComponent
in interface RenderInfo
Component
if RenderInfo
was created through ComponentRenderInfo.create()
, otherwise it will throw UnsupportedOperationException
. If this method is accessed from RenderInfo
type,
rendersComponent()
should be queried first before accessing.public EventHandler<RenderCompleteEvent> getRenderCompleteEventHandler()
getRenderCompleteEventHandler
in interface RenderInfo
EventHandler
if RenderInfo
was created
through ComponentRenderInfo.create()
, otherwise it will throw UnsupportedOperationException
.public ComponentsLogger getComponentsLogger()
getComponentsLogger
in interface RenderInfo
ComponentsLogger
if RenderInfo
was created through ComponentRenderInfo.create()
, null otherwisepublic java.lang.String getLogTag()
getLogTag
in interface RenderInfo
RenderInfo
was created through ComponentRenderInfo.create()
, null otherwisepublic boolean rendersView()
rendersView
in interface RenderInfo
RenderInfo
was created through ViewRenderInfo.create()
, or
false otherwise. This should be queried before accessing view related methods, such as
getViewBinder()
, getViewCreator()
, getViewType()
and setViewType(int)
from RenderInfo
type.public ViewBinder getViewBinder()
getViewBinder
in interface RenderInfo
ViewBinder
if RenderInfo
was created through ViewRenderInfo.create()
, or otherwise it will throw UnsupportedOperationException
.
If this method is accessed from RenderInfo
type, rendersView()
should be
queried first before accessing.public ViewCreator getViewCreator()
getViewCreator
in interface RenderInfo
ViewCreator
if RenderInfo
was created through ViewRenderInfo.create()
, or otherwise it will throw UnsupportedOperationException
.
If this method is accessed from RenderInfo
type, rendersView()
should be
queried first before accessing.public boolean hasCustomViewType()
hasCustomViewType
in interface RenderInfo
RenderInfo
and it was created
through ViewRenderInfo.create()
, or false otherwise.public int getViewType()
getViewType
in interface RenderInfo
RenderInfo
if it was created through ViewRenderInfo.create()
or otherwise it will throw UnsupportedOperationException
.
If this method is accessed from RenderInfo
type, rendersView()
should be
queried first before accessing.public void addDebugInfo(java.lang.String key, java.lang.Object value)
addDebugInfo
in interface RenderInfo
public java.lang.Object getDebugInfo(java.lang.String key)
getDebugInfo
in interface RenderInfo
public void setViewType(int viewType)
RenderInfo
if it was created through ViewRenderInfo.create()
and a custom viewType was not set, or otherwise it will throw UnsupportedOperationException
.setViewType
in interface RenderInfo