Class MultiPosIcon

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.MultiPosIcon
All Implemented Interfaces:
Icon

public abstract class MultiPosIcon extends Object implements Icon
Uncoloured icon suitable for legends representing multi-position plot types. This abstract class generates X,Y positions representing the positions on the icon, and concrete subclasses can do something visually specific with them.
Since:
28 Nov 2013
Author:
Mark Taylor
  • Constructor Details

    • MultiPosIcon

      public MultiPosIcon(int npos)
      Constructor.
      Parameters:
      npos - number of points
  • Method Details

    • getIconWidth

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • getIconHeight

      public int getIconHeight()
      Specified by:
      getIconHeight in interface Icon
    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Specified by:
      paintIcon in interface Icon
    • paintPositions

      protected abstract void paintPositions(Graphics g, Point[] positions)
      Generates graphics for a given set of positions in a way that represents the behaviour this icon wants to illustrate. The number of positions presented is that specified at construction time.
      Parameters:
      g - graphics context
      positions - graphic positions of points