Пример #1
0
    @SuppressWarnings({"UnusedDeclaration"})
    protected ToolTipRenderer getToolTipRenderer(DrawContext dc) {
      ToolTipRenderer tr =
          (this.font != null) ? new ToolTipRenderer(this.font) : new ToolTipRenderer();

      if (this.color != null) {
        tr.setTextColor(this.color);
        tr.setOutlineColor(this.color);
        tr.setInteriorColor(ToolTipRenderer.getContrastingColor(this.color));
      } else {
        tr.setUseSystemLookAndFeel(true);
      }

      return tr;
    }
Пример #2
0
 public void render(DrawContext dc) {
   ToolTipRenderer toolTipRenderer = this.getToolTipRenderer(dc);
   toolTipRenderer.render(dc, this.text, (int) this.point.x, (int) this.point.y);
 }