Class LineStyle
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.layer.LineStyle
-
- All Implemented Interfaces:
Style
- Direct Known Subclasses:
AuxLineStyle
,FunctionPlotter.FunctionStyle
,LinePlotter.LinesStyle
,Stats1Plotter.StatsStyle
public class LineStyle extends java.lang.Object implements Style
Plotting style for continuous lines.- Since:
- 13 Jun 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description LineStyle(java.awt.Color color, java.awt.Stroke stroke, boolean antialias)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LineTracer
createLineTracer(java.awt.Graphics g, java.awt.Rectangle bounds, int nwork, boolean isPixel)
Convenience method to return a line tracer that will use this style.boolean
equals(java.lang.Object o)
boolean
getAntialias()
Indicates whether the line will be antialiased in suitable (bitmapped) contexts.java.awt.Color
getColor()
Returns the line colour.javax.swing.Icon
getLegendIcon()
Returns an icon suitable for displaying in a legend for this style.java.awt.Stroke
getStroke()
Returns the object used to stroke the line.int
hashCode()
-
-
-
Method Detail
-
getColor
public java.awt.Color getColor()
Returns the line colour.- Returns:
- colour
-
getStroke
public java.awt.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 javax.swing.Icon getLegendIcon()
Description copied from interface:Style
Returns an icon suitable for displaying in a legend for this style.- Specified by:
getLegendIcon
in interfaceStyle
-
createLineTracer
public LineTracer createLineTracer(java.awt.Graphics g, java.awt.Rectangle bounds, int nwork, boolean isPixel)
Convenience method to return a line tracer that will use this style.- Parameters:
g
- graphics contextbounds
- clip boundsnwork
- workspace array sizeisPixel
- if true graphics context is considered pixellised- Returns:
- new line tracer
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-