Пример #1
0
    @Override
    public int compare(FontSymbolLookup arg0, FontSymbolLookup arg1) {
      int r = LessCompare.compareBigFirst(arg0.size(), arg1.size(), maxSize2);

      // better quality goes first
      if (r == 0) r = LessCompare.compareBigFirst(arg0.g, arg1.g);

      // bigger items goes first
      if (r == 0) r = LessCompare.compareBigFirst(arg0.size(), arg1.size());

      return r;
    }
Пример #2
0
    @Override
    public int compare(FontSymbolLookup arg0, FontSymbolLookup arg1) {
      int r = 0;

      if (r == 0) {
        if (!arg0.yCross(arg1)) r = LessCompare.compareSmallFirst(arg0.y, arg1.y);
      }

      if (r == 0) r = LessCompare.compareSmallFirst(arg0.x, arg1.x);

      if (r == 0) r = LessCompare.compareSmallFirst(arg0.y, arg1.y);

      return r;
    }