uk.ac.starlink.ttools.plot2.layer
Class MultiPosIcon

java.lang.Object
  extended by 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 Summary
MultiPosIcon(int npos)
          Constructor.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPosIcon

public MultiPosIcon(int npos)
Constructor.

Parameters:
npos - number of points
Method Detail

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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.