src/main/java/dev/lambdaurora/spruceui/widget/container/SpruceEntryListWidget.java
protected void ensureVisible(E entry) {
        int index = this.children().indexOf(entry);
        int rowTop = this.getRowTop(index);
        int j = rowTop - this.getY() - entry.getHeight() - 8;
        if (j < 0) {
            this.scroll(j);
        }

        int nextHeight = 0;
        if (index < this.getEntriesCount() - 1)
            nextHeight = this.children().get(index + 1).getHeight();
        int k = this.getY() + this.getHeight() - rowTop - entry.getHeight() + nextHeight;
        if (k < 0) {
            this.scroll(-k);
        }
    }
/**
     * Ensures that the specified entry is visible.
     *
     * @param entry the entry which needs to be visible
     */
Ensures that the specified entry is visible.
@param entry the entry which needs to be visible
Ensures that the specified entry is visible . @param entry the entry which needs to be visible
protected void ensureVisible(E entry) {
        int index = this.children().indexOf(entry);
        int rowTop = this.getRowTop(index);
        int j = rowTop - this.getY() - entry.getHeight() - 8;
        if (j < 0) {
            this.scroll(j);
        }
        int nextHeight = 0;
        if (index < this.getEntriesCount() - 1)
            nextHeight = this.children().get(index + 1).getHeight();
        int k = this.getY() + this.getHeight() - rowTop - entry.getHeight() + nextHeight;
        if (k < 0) {
            this.scroll(-k);
        }
    }
protected void ensureVisible ( E entry ) { int index = this . children ( ) . indexOf ( entry ) ; int rowTop = this . getRowTop ( index ) ; int j = rowTop - this . getY ( ) - entry . getHeight ( ) - 8 ; if ( j < 0 ) { this . scroll ( j ) ; } int nextHeight = 0 ; if ( index < this . getEntriesCount ( ) - 1 ) nextHeight = this . children ( ) . get ( index + 1 ) . getHeight ( ) ; int k = this . getY ( ) + this . getHeight ( ) - rowTop - entry . getHeight ( ) + nextHeight ; if ( k < 0 ) { this . scroll ( - k ) ; } }
Ensures that the specified entry is visible.
Ensures that the specified entry is visible .