home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Rectangle;
- import javax.swing.ListSelectionModel;
-
- class BasicListUI$PageUpAction extends BasicListUI.IncrementLeadSelectionAction {
- // $FF: synthetic field
- private final BasicListUI this$0;
-
- protected BasicListUI$PageUpAction(BasicListUI var1, String var2, int var3) {
- super(var1, var2, var3);
- this.this$0 = var1;
- }
-
- protected void ensureIndexIsVisible(int var1) {
- Rectangle var2 = this.this$0.list.getVisibleRect();
- Rectangle var3 = this.this$0.list.getCellBounds(var1, var1);
- var3.height = var2.height;
- this.this$0.list.scrollRectToVisible(var3);
- }
-
- protected int getNextIndex() {
- int var1 = this.this$0.list.getFirstVisibleIndex();
- ListSelectionModel var2 = this.this$0.list.getSelectionModel();
- if (var2.getLeadSelectionIndex() == var1) {
- Rectangle var3 = this.this$0.list.getVisibleRect();
- var3.y = Math.max(0, var3.y - var3.height);
- var1 = this.this$0.list.locationToIndex(var3.getLocation());
- }
-
- return var1;
- }
- }
-