예제 #1
0
 private boolean onAltHome(KeyboardEvent event) {
   if (noContentCheck()) return true;
   if (hotPointY <= 0 || hotPointY > items.length || items[hotPointY - 1] == null) {
     luwrain.hint(Hints.EMPTY_LINE);
     return true;
   }
   final Object item = items[hotPointY - 1];
   final String line = appearance.getScreenAppearance(item, 0);
   int leftBound = appearance.getObservableLeftBound(item);
   if (leftBound < 0) leftBound = 0;
   if (leftBound > line.length()) leftBound = line.length();
   int rightBound = appearance.getObservableRightBound(item);
   if (rightBound < 0) rightBound = 0;
   if (rightBound >= line.length()) rightBound = line.length();
   if (leftBound >= rightBound) {
     luwrain.hint(Hints.EMPTY_LINE);
     return true;
   }
   if (hotPointX <= leftBound) {
     luwrain.hint(Hints.BEGIN_OF_LINE);
     return true;
   }
   hotPointX = leftBound;
   luwrain.sayLetter(line.charAt(hotPointX));
   luwrain.onAreaNewHotPoint(this);
   return true;
 }