Class BubbleRenderer

  • All Implemented Interfaces:
    NodeRenderer

    public class BubbleRenderer
    extends java.lang.Object
    implements NodeRenderer
    A factory which creates and returns a bubble given a node input to render.
    Version:
    $Id$
    Author:
    Michael Shilman, John Reekie
    Pt.AcceptedRating:
    Red
    • Constructor Summary

      Constructors 
      Constructor Description
      BubbleRenderer()
      Create a renderer which renders bubbles white
      BubbleRenderer​(java.awt.Paint fillPaint, java.awt.Paint strokePaint, double size)
      Create a renderer which renders bubbles in the given fill paint, outlie paint, and size.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Paint getFillPaint()
      Get the fill paint pattern of this figure.
      java.awt.Paint getStrokePaint()
      Get the stroke paint pattern of this figure.
      Figure render​(java.lang.Object n)
      Return the rendered visual representation of this node.
      void setFillPaint​(java.awt.Paint p)
      Set the fill paint pattern of this figure.
      void setStrokePaint​(java.awt.Paint p)
      Set the stroke paint pattern of this figure.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BubbleRenderer

        public BubbleRenderer()
        Create a renderer which renders bubbles white
      • BubbleRenderer

        public BubbleRenderer​(java.awt.Paint fillPaint,
                              java.awt.Paint strokePaint,
                              double size)
        Create a renderer which renders bubbles in the given fill paint, outlie paint, and size.
    • Method Detail

      • getFillPaint

        public java.awt.Paint getFillPaint()
        Get the fill paint pattern of this figure.
      • getStrokePaint

        public java.awt.Paint getStrokePaint()
        Get the stroke paint pattern of this figure.
      • render

        public Figure render​(java.lang.Object n)
        Return the rendered visual representation of this node.
        Specified by:
        render in interface NodeRenderer
        Parameters:
        n - The node to render.
        Returns:
        The persistent object that is drawn on the screen.
      • setFillPaint

        public void setFillPaint​(java.awt.Paint p)
        Set the fill paint pattern of this figure. The figure will be filled with this paint pattern. If no pattern is given, do not fill it.
      • setStrokePaint

        public void setStrokePaint​(java.awt.Paint p)
        Set the stroke paint pattern of this figure.