use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.
the class DefaultSectionAdapter method setData.
public void setData(int headerCount, int itemCount) {
sections.clear();
for (int i = 0; i < headerCount; i++) {
Section s = new Section();
s.setSectionTitle("Section " + i);
for (int j = 0; j < itemCount; j++) {
s.addItem(new Object());
}
sections.add(s);
}
}
use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.
the class HGridLayout method getContentWidth.
@Override
public int getContentWidth() {
if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
return 0;
}
int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
Section s = itemsAdapter.getSection(sectionIndex);
if (s.getDataCount() == 0)
return 0;
Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
FreeFlowItem fd = proxies.get(lastFrameData);
return (fd.frame.left + fd.frame.width());
}
use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.
the class HLayout method getContentWidth.
@Override
public int getContentWidth() {
if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
return 0;
}
int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
Section s = itemsAdapter.getSection(sectionIndex);
if (s.getDataCount() == 0)
return 0;
Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
FreeFlowItem fd = proxies.get(lastFrameData);
return (fd.frame.left + fd.frame.width());
}
use of com.comcast.freeflow.core.Section in project FreeFlow by Comcast.
the class VGridLayout method getContentHeight.
@Override
public int getContentHeight() {
if (itemsAdapter == null || itemsAdapter.getNumberOfSections() <= 0) {
return 0;
}
int sectionIndex = itemsAdapter.getNumberOfSections() - 1;
Section s = itemsAdapter.getSection(sectionIndex);
if (s.getDataCount() == 0)
return 0;
Object lastFrameData = s.getDataAtIndex(s.getDataCount() - 1);
FreeFlowItem fd = proxies.get(lastFrameData);
if (fd == null) {
return 0;
}
return (fd.frame.top + fd.frame.height());
}
Aggregations