Skip to content

Commit

Permalink
Expose method VirtualFlow.showAtOffset(idx, offset)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasMikula committed Feb 23, 2015
1 parent 00df7ea commit 1493be0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/fxmisc/flowless/VirtualFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public void showAsLast(int itemIndex) {
content.showAsLast(itemIndex);
}

public void showAtOffset(int itemIndex, double offset) {
content.showAtOffset(itemIndex, offset);
}

public void show(C cell, Bounds region) {
content.showRegion(cell, region);
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/fxmisc/flowless/VirtualFlowContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ void showAsLast(int itemIdx) {
navigator.setTargetPosition(new EndOffEnd(itemIdx, 0.0));
}

void showAtOffset(int itemIdx, double offset) {
navigator.setTargetPosition(new StartOffStart(itemIdx, offset));
}

void showRegion(C cell, Bounds region) {
navigator.showLengthRegion(cell, orientation.minY(region), orientation.maxY(region));
showBreadthRegion(cell, orientation.minX(region), orientation.maxX(region));
Expand Down

0 comments on commit 1493be0

Please sign in to comment.