uk.ac.starlink.ttools.plot
Class MarkStyles

java.lang.Object
  extended by uk.ac.starlink.ttools.plot.MarkStyles

public class MarkStyles
extends Object

Provides several factory methods for constructing StyleSets which dispense MarkStyles.

Since:
4 Nov 2005
Author:
Mark Taylor

Constructor Summary
MarkStyles()
           
 
Method Summary
static StyleSet dashedLines(String name)
          Returns a style set which draws black lines with variable dash patterns.
static StyleSet faded(String name, StyleSet base, int opaqueLimit)
          Returns a StyleSet based on another one but with a given opaque limit for each of the dispensed styles.
static StyleSet filledShapes(String name, int size, Color color)
          Returns a style set which gives filled shapes of various kinds.
static Icon getIcon(StyleSet styleSet)
          Returns an icon which represents a given marker style set.
static StyleSet lines(String name)
          Returns a style set which draws lines using a default sequence of colours.
static StyleSet lines(String name, Color[] colors)
          Returns a style set which draws lines using a given sequence of colours.
static StyleSet openShapes(String name, int size, Color color)
          Returns a style set which gives line-drawn shapes of various kinds.
static StyleSet points(String name)
          Returns a style set which gives pixels in a variety of colours.
static StyleSet points(String name, Color[] colors)
          Returns a style set which gives pixels using a given sequence of colours.
static StyleSet spots(String name, int size)
          Returns a style set which gives filled circles of a given size in a variety of colours.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkStyles

public MarkStyles()
Method Detail

points

public static StyleSet points(String name)
Returns a style set which gives pixels in a variety of colours.

Parameters:
name - set name
Returns:
style set providing coloured pixels

points

public static StyleSet points(String name,
                              Color[] colors)
Returns a style set which gives pixels using a given sequence of colours.

Parameters:
name - set name
colors - colour sequence
Returns:
style set providing coloured pixels

spots

public static StyleSet spots(String name,
                             int size)
Returns a style set which gives filled circles of a given size in a variety of colours.

Parameters:
name - set name
size - approximate radius of markers
Returns:
style set providing coloured spots

openShapes

public static StyleSet openShapes(String name,
                                  int size,
                                  Color color)
Returns a style set which gives line-drawn shapes of various kinds.

Parameters:
name - set name
size - approximate radius of markers
color - color of markers, or null for various
Returns:
style set providing open shapes

filledShapes

public static StyleSet filledShapes(String name,
                                    int size,
                                    Color color)
Returns a style set which gives filled shapes of various kinds.

Parameters:
name - set name
size - approximate radius of markers
color - color of markers, or null for various
Returns:
style set providing filled shapes

faded

public static StyleSet faded(String name,
                             StyleSet base,
                             int opaqueLimit)
Returns a StyleSet based on another one but with a given opaque limit for each of the dispensed styles.

Parameters:
name - name of the returned style set
base - style set on which the returns will be based
opaqueLimit - initial opaque limit of styles dispensed by the return
Returns:
new style set

getIcon

public static Icon getIcon(StyleSet styleSet)
Returns an icon which represents a given marker style set. It consists of a row of example legends corresponding to the set.

Parameters:
styleSet - style set
Returns:
icon for styles

lines

public static StyleSet lines(String name)
Returns a style set which draws lines using a default sequence of colours.

Parameters:
name - set name
Returns:
style set providing coloured lines

lines

public static StyleSet lines(String name,
                             Color[] colors)
Returns a style set which draws lines using a given sequence of colours.

Parameters:
name - set name
colors - colour sequence
Returns:
style set providing coloured lines

dashedLines

public static StyleSet dashedLines(String name)
Returns a style set which draws black lines with variable dash patterns.

Parameters:
name - set name


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