public int getStartIndexOffset() { int startIndex = 0; if (minValueCount > 0 && getValues() != null && getValues().size() > 0) { startIndex = getEntryCount() - getValues().size(); } return startIndex; }
public void setEnable(boolean enable) { this.enable = enable; this.setVisible(enable); }
public float getVisibleRange(Viewport viewport) { return (viewport.right - viewport.left) * getEntryCount(); }
public List<T> getVisiblePoints(Viewport viewport) { int from = (int) (viewport.left * getValues().size()); int to = (int) (viewport.right * getValues().size()); if (Float.compare(viewport.width(), 1f) == 0 && defaultVisibleEntryCount > 0 && defaultVisibleEntryCount < getValues().size()) { from = to - defaultVisibleEntryCount; viewport.left = from / (float) getValues().size(); } else { if (maxVisibleEntryCount > 0 && to - from > maxVisibleEntryCount) { from = to - maxVisibleEntryCount; viewport.left = from / (float) getValues().size(); } if (minVisibleEntryCount > 0 && minVisibleEntryCount < getValues().size() && to - from < minVisibleEntryCount) { if (to >= minVisibleEntryCount) { from = to - minVisibleEntryCount; viewport.left = from / (float) getValues().size(); } else { to = from + minVisibleEntryCount; viewport.right = to / (float) getValues().size(); } } } return getValues().subList(from, to); }