Example #1
0
 boolean isInvalid(StringBlock block, float gap) {
   if (isHead() || isTail()) return false;
   if (x0 == Integer.MIN_VALUE || y0 == Integer.MIN_VALUE) {
     return true;
   }
   Rectangle bound = block.getTextBox();
   if (bound == null) {
     return false;
   }
   return x0 > 0 && bound.x + bound.width - gap < getX1();
 }
Example #2
0
 private Rectangle getBound(StringBlock block) {
   if (block.getTextBox() != null) {
     return block.getTextBox();
   }
   return UNBOUNDED;
 }