public class TestTarget extends Object implements SectionTree.Target
Modifier and Type | Class and Description |
---|---|
static class |
TestTarget.Operation |
SectionTree.Target.DynamicConfig
Modifier and Type | Field and Description |
---|---|
static int |
DELETE |
static int |
DELETE_RANGE |
static int |
INSERT |
static int |
INSERT_RANGE |
static int |
MOVE |
static int |
UPDATE |
static int |
UPDATE_RANGE |
Constructor and Description |
---|
TestTarget() |
Modifier and Type | Method and Description |
---|---|
void |
changeConfig(SectionTree.Target.DynamicConfig dynamicConfig)
Notify this target that a new set of configurations is applied.
|
void |
clear() |
void |
delete(int index)
Notify that the
Component at index was deleted. |
void |
deleteRange(int index,
int count) |
int |
getFocusedTo() |
int |
getFocusedToOffset() |
int |
getNumChanges() |
List<TestTarget.Operation> |
getOperations() |
void |
insert(int index,
RenderInfo renderInfo)
Notify that a
Component was added at index. |
void |
insertRange(int index,
int count,
List<RenderInfo> renderInfos) |
void |
move(int fromPosition,
int toPosition)
Notify that a
Component was moved fromPosition toPosition. |
void |
notifyChangeSetComplete(boolean isDataChanged,
ChangeSetCompleteCallback changeSetCompleteCallback)
Called when a changeset has finished being applied.
|
void |
requestFocus(int index)
Request focus on the item with the given index.
|
void |
requestFocusWithOffset(int index,
int offset)
Request focus on the item with the given index, plus some additional offset.
|
void |
requestSmoothFocus(int index,
int offset,
SmoothScrollAlignmentType type)
Request smooth focus on the item with the given index.
|
boolean |
supportsBackgroundChangeSets() |
void |
update(int index,
RenderInfo renderInfo)
Notify that a
Component was updated at index. |
void |
updateRange(int index,
int count,
List<RenderInfo> renderInfos) |
boolean |
wasNotifyChangeSetCompleteCalledWithChangedData() |
boolean |
wereChangesHandled() |
public static final int INSERT
public static final int UPDATE
public static final int DELETE
public static final int MOVE
public static final int INSERT_RANGE
public static final int UPDATE_RANGE
public static final int DELETE_RANGE
public List<TestTarget.Operation> getOperations()
public int getNumChanges()
public boolean wereChangesHandled()
public boolean wasNotifyChangeSetCompleteCalledWithChangedData()
public void insert(int index, RenderInfo renderInfo)
SectionTree.Target
Component
was added at index.insert
in interface SectionTree.Target
public void insertRange(int index, int count, List<RenderInfo> renderInfos)
insertRange
in interface SectionTree.Target
public void update(int index, RenderInfo renderInfo)
SectionTree.Target
Component
was updated at index.update
in interface SectionTree.Target
public void updateRange(int index, int count, List<RenderInfo> renderInfos)
updateRange
in interface SectionTree.Target
public void delete(int index)
SectionTree.Target
Component
at index was deleted.delete
in interface SectionTree.Target
public void deleteRange(int index, int count)
deleteRange
in interface SectionTree.Target
public void move(int fromPosition, int toPosition)
SectionTree.Target
Component
was moved fromPosition toPosition.move
in interface SectionTree.Target
public void notifyChangeSetComplete(boolean isDataChanged, ChangeSetCompleteCallback changeSetCompleteCallback)
SectionTree.Target
notifyChangeSetComplete
in interface SectionTree.Target
public void requestFocus(int index)
SectionTree.Target
requestFocus
in interface SectionTree.Target
public void requestSmoothFocus(int index, int offset, SmoothScrollAlignmentType type)
SectionTree.Target
requestSmoothFocus
in interface SectionTree.Target
public void requestFocusWithOffset(int index, int offset)
SectionTree.Target
requestFocusWithOffset
in interface SectionTree.Target
public boolean supportsBackgroundChangeSets()
supportsBackgroundChangeSets
in interface SectionTree.Target
public void changeConfig(SectionTree.Target.DynamicConfig dynamicConfig)
SectionTree.Target
changeConfig
in interface SectionTree.Target
public void clear()
public int getFocusedTo()
public int getFocusedToOffset()