コード例 #1
0
ファイル: NoteBox.java プロジェクト: pabranch/plantuml
 @Override
 public final double getPreferredWidth(StringBounder stringBounder) {
   final double preferredWidth = comp.getPreferredWidth(stringBounder);
   if (position == NotePosition.OVER_SEVERAL) {
     assert p1 != p2;
     final double diff1 =
         p2.getParticipantBox().getMaxX(stringBounder) - p1.getParticipantBox().getMinX();
     if (diff1 > preferredWidth) {
       return diff1;
     }
   }
   return preferredWidth;
 }
コード例 #2
0
 public Dimension2D calculateDimension(StringBounder stringBounder) {
   final double height = comp.getPreferredHeight(stringBounder);
   final double width = comp.getPreferredWidth(stringBounder);
   return new Dimension2DDouble(width, height);
 }