コード例 #1
0
ファイル: ListPopupBase.java プロジェクト: rPman/luwrain
 private boolean onPageUp(KeyboardEvent event, boolean briefIntroduction) {
   if (noContentCheck()) return true;
   if (hotPointY <= 0) {
     luwrain.hint(Hints.NO_ITEMS_ABOVE);
     return true;
   }
   final int visibleHeight = luwrain.getAreaVisibleHeight(this);
   if (visibleHeight < 1) return false;
   if (hotPointY > visibleHeight) hotPointY -= visibleHeight;
   else hotPointY = 0;
   onNewHotPointY(briefIntroduction);
   return true;
 }
コード例 #2
0
ファイル: ListPopupBase.java プロジェクト: rPman/luwrain
 private boolean onPageDown(KeyboardEvent event, boolean briefIntroduction) {
   if (noContentCheck()) return true;
   if (hotPointY >= items.length) {
     luwrain.hint(Hints.NO_ITEMS_BELOW);
     return true;
   }
   final int visibleHeight = luwrain.getAreaVisibleHeight(this);
   if (visibleHeight < 1) return false;
   hotPointY += visibleHeight;
   if (hotPointY > items.length) hotPointY = items.length;
   onNewHotPointY(briefIntroduction);
   return true;
 }