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

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.LineStyle
All Implemented Interfaces:
Style
Direct Known Subclasses:
FunctionPlotter.FunctionStyle

public class LineStyle
extends Object
implements Style

Plotting style for continuous lines.

Since:
13 Jun 2013
Author:
Mark Taylor

Constructor Summary
LineStyle(Color color, Stroke stroke, boolean antialias)
          Constructor.
 
Method Summary
 LineTracer createLineTracer(Graphics g, Rectangle bounds, int nwork, boolean isPixel)
          Convenience method to return a line tracer that will use this style.
 boolean equals(Object o)
           
 boolean getAntialias()
          Indicates whether the line will be antialiased in suitable (bitmapped) contexts.
 Color getColor()
          Returns the line colour.
 Icon getLegendIcon()
          Returns an icon suitable for displaying in a legend for this style.
 Stroke getStroke()
          Returns the object used to stroke the line.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineStyle

public LineStyle(Color color,
                 Stroke stroke,
                 boolean antialias)
Constructor.

Parameters:
color - line colour
stroke - line stroke
antialias - whether line is to be antialiased (only likely to make a difference on bitmapped paper)
Method Detail

getColor

public Color getColor()
Returns the line colour.

Returns:
colour

getStroke

public Stroke getStroke()
Returns the object used to stroke the line.

Returns:
stroke

getAntialias

public boolean getAntialias()
Indicates whether the line will be antialiased in suitable (bitmapped) contexts.

Returns:
true for antialiasing

getLegendIcon

public Icon getLegendIcon()
Description copied from interface: Style
Returns an icon suitable for displaying in a legend for this style.

Specified by:
getLegendIcon in interface Style

createLineTracer

public LineTracer createLineTracer(Graphics g,
                                   Rectangle bounds,
                                   int nwork,
                                   boolean isPixel)
Convenience method to return a line tracer that will use this style.

Parameters:
g - graphics context
bounds - clip bounds
nwork - workspace array size
isPixel - if true graphics context is considered pixellised
Returns:
new line tracer

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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