예제 #1
0
 public override Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
 {
   return new Size2D(this.calculateTotalWidth(this.getWidth()), this.calculateTotalHeight(this.getHeight()));
 }
예제 #2
0
 public override Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
 {
   RectangleConstraint rectangleConstraint = this.toContentConstraint(constraint);
   LengthConstraintType widthConstraintType = rectangleConstraint.getWidthConstraintType();
   LengthConstraintType heightConstraintType = rectangleConstraint.getHeightConstraintType();
   Size2D size2D = (Size2D) null;
   if (widthConstraintType == LengthConstraintType.__\u003C\u003ENONE)
   {
     if (heightConstraintType == LengthConstraintType.__\u003C\u003ENONE)
       size2D = this.arrangeNN(g2);
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE)
     {
       string str = "Not yet implemented.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new RuntimeException(str);
     }
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED)
     {
       string str = "Not yet implemented.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new RuntimeException(str);
     }
   }
   else if (widthConstraintType == LengthConstraintType.__\u003C\u003ERANGE)
   {
     if (heightConstraintType == LengthConstraintType.__\u003C\u003ENONE)
       size2D = this.arrangeRN(g2, rectangleConstraint.getWidthRange());
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE)
       size2D = this.arrangeRR(g2, rectangleConstraint.getWidthRange(), rectangleConstraint.getHeightRange());
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED)
     {
       string str = "Not yet implemented.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new RuntimeException(str);
     }
   }
   else if (widthConstraintType == LengthConstraintType.__\u003C\u003EFIXED)
   {
     if (heightConstraintType == LengthConstraintType.__\u003C\u003ENONE)
       size2D = this.arrangeFN(g2, rectangleConstraint.getWidth());
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE)
     {
       string str = "Not yet implemented.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new RuntimeException(str);
     }
     else if (heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED)
     {
       string str = "Not yet implemented.";
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new RuntimeException(str);
     }
   }
   if (size2D.width <= 0.0 || size2D.height <= 0.0)
     return new Size2D(0.0, 0.0);
   else
     return new Size2D(this.calculateTotalWidth(size2D.getWidth()), this.calculateTotalHeight(size2D.getHeight()));
 }
예제 #3
0
 public override Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
 {
   Size2D size2D = new Size2D((double) this.image.getWidth((ImageObserver) null), (double) this.image.getHeight((ImageObserver) null));
   return new Size2D(this.calculateTotalWidth(size2D.getWidth()), this.calculateTotalHeight(size2D.getHeight()));
 }