com.panayotis.gnuplot.style
Class PlotStyle

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by com.panayotis.gnuplot.PropertiesHolder
              extended by com.panayotis.gnuplot.style.PlotStyle
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

public class PlotStyle
extends PropertiesHolder

This object represents the styles which can be used in gnuplot to personalize each prot

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
Constructor Summary
PlotStyle()
          Creates a new instance of PlotStyle with default parameters
PlotStyle(Style style)
          Creates a new instance of PlotStyle with a specified style
 
Method Summary
 void appendProperties(java.lang.StringBuffer buf)
          Gather the properties of this style.
 void setFill(FillStyle fillstyle)
          Set the fill style of this graph.
 void setLineType(int type)
          Set the line type of this graph.
 void setLineType(PlotColor col)
          Set the line type of this graph to be a specific color.
 void setLineWidth(int width)
          Set the line width of this graph
 void setPointSize(int width)
          Set the point size of this graph
 void setPointType(int type)
          Set the point type of this graph.
 void setStyle(Style style)
          Set the current style to the given one
 
Methods inherited from class com.panayotis.gnuplot.PropertiesHolder
set, set, unset
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

PlotStyle

public PlotStyle()
Creates a new instance of PlotStyle with default parameters


PlotStyle

public PlotStyle(Style style)
Creates a new instance of PlotStyle with a specified style

Parameters:
style - The style to use
Method Detail

setStyle

public void setStyle(Style style)
Set the current style to the given one

Parameters:
style - the style to use

appendProperties

public void appendProperties(java.lang.StringBuffer buf)
Gather the properties of this style. This method is used internally by GNUPlot

Overrides:
appendProperties in class PropertiesHolder
Parameters:
buf - The Srting buffer to store this object's properties.

setLineWidth

public void setLineWidth(int width)
Set the line width of this graph

Parameters:
width - The line width. If this number is less than zero, then the default parameter will be used

setPointSize

public void setPointSize(int width)
Set the point size of this graph

Parameters:
width - The point size. If this number is less than zero, then the default parameter will be used

setLineType

public void setLineType(int type)
Set the line type of this graph. This option is terminal dependent.

Parameters:
type - The line type. If this number is less than zero, then the default parameter will be used

setLineType

public void setLineType(PlotColor col)
Set the line type of this graph to be a specific color. This option is terminal dependent.

Parameters:
col - The color to use. If this parameter is null, then the default parameter will be used.

setPointType

public void setPointType(int type)
Set the point type of this graph. This option is terminal dependent.

Parameters:
type - The point type. If this number is less than zero, then the default parameter will be used

setFill

public void setFill(FillStyle fillstyle)
Set the fill style of this graph. If the desired style does not support fill then this parameter will be ignored.

Parameters:
fillstyle - The fill style to use. If this parameter is null, then the default parameter will be used.