コード例 #1
0
  protected AnnotationAttributes getAnnotationPanelAttributes(String annoText) {
    AnnotationAttributes attrs = new AnnotationAttributes();

    attrs.setAdjustWidthToText(AVKey.SIZE_FIXED);
    attrs.setSize(this.computePanelSize(annoText));
    attrs.setFrameShape(AVKey.SHAPE_RECTANGLE);
    attrs.setTextColor(Color.WHITE);
    attrs.setBackgroundColor(new Color(0f, 0f, 0f, 0.6f));
    attrs.setCornerRadius(10);
    attrs.setInsets(new Insets(10, 10, 0, 0));
    attrs.setBorderColor(new Color(0xababab));
    attrs.setFont(Font.decode("Arial-PLAIN-12"));
    attrs.setTextAlign(AVKey.LEFT);

    return attrs;
  }