Skip to content

Commit

Permalink
improve scrolling with up / down keys. close #2025.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 8, 2023
1 parent 03cfce4 commit da0afcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ You should also get your employer (if you work as a programmer) or school,
import com.jdimension.jlawyer.services.JLawyerServiceLocator;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -1715,11 +1716,14 @@ void selectNextDocument() {
if (selectNext) {
this.selectAllDocuments(false);
((DocumentEntryPanel) c).setSelected(true);
Rectangle bounds = c.getBounds();
this.pnlDocumentEntries.scrollRectToVisible(bounds);
return;
}
if (((DocumentEntryPanel) c).isSelected()) {
selectNext = true;
}

}
}
}
Expand All @@ -1741,6 +1745,8 @@ void selectPreviousDocument() {
if (prev instanceof DocumentEntryPanel) {
this.selectAllDocuments(false);
((DocumentEntryPanel) prev).setSelected(true);
Rectangle bounds = prev.getBounds();
this.pnlDocumentEntries.scrollRectToVisible(bounds);
}

}
Expand Down
Binary file modified j-lawyer-proprietary/libs/j-lawyer-bea-wrapper.jar
Binary file not shown.

0 comments on commit da0afcc

Please sign in to comment.