Class Styled

java.lang.Object
cnuphys.splot.style.Styled
All Implemented Interfaces:
IStyled

public class Styled extends Object implements IStyled
  • Constructor Details

    • Styled

      public Styled()
      Create with all defaults.
    • Styled

      public Styled(int index)
      Generate a sort of random style
      Parameters:
      index - determines the style. Can be any integer
    • Styled

      public Styled(Color fillColor, Color borderColor, Color fitLineColor, Color auxLineColor, LineStyle fitLineStyle, LineStyle auxLineStyle, float fitLineWidth, float auxLineWidth, SymbolType symbolType, int symbolSize)
      Create a Styled object
      Parameters:
      fillColor - the fill color
      borderColor - the symbol border color
      fitLineColor - the fit line color
      auxLineColor - the auxiliary line color
      fitLineStyle - the fit line style
      auxLineStyle - the auxiliary line style
      fitLineWidth - the line width for fits
      fitLineWidth - the line width for auxiliary lines
      symbolType - the symbol type
      symbolSize - the symbol size
    • Styled

      public Styled(Color fillColor)
      Create with all defaults but the given fill color.
      Parameters:
      fillColor - the fill color to user.
    • Styled

      public Styled(Color fillColor, boolean darkerLineColor)
      Create with all defaults but the given fill color. The link color is set a little darker or lighter.
      Parameters:
      fillColor - the fill color to user.
      darkerLineColor - if true/false make line color darker/lighter than fill color.
  • Method Details

    • getFillColor

      public Color getFillColor()
      Get the fill color for the symbols
      Specified by:
      getFillColor in interface IStyled
      Returns:
      the fill color for the symbols
    • getBorderColor

      public Color getBorderColor()
      Description copied from interface: IStyled
      Get the color used for symbol borders.
      Specified by:
      getBorderColor in interface IStyled
      Returns:
      the symbol border color.
    • getFitLineColor

      public Color getFitLineColor()
      Description copied from interface: IStyled
      Get the color used for fits.
      Specified by:
      getFitLineColor in interface IStyled
      Returns:
      the fit line color.
    • getFitLineStyle

      public LineStyle getFitLineStyle()
      Description copied from interface: IStyled
      Get the style used for drawing fits.
      Specified by:
      getFitLineStyle in interface IStyled
      Returns:
      the line style for fits.
    • getFitLineWidth

      public float getFitLineWidth()
      Description copied from interface: IStyled
      Get the line width for drawing fits.
      Specified by:
      getFitLineWidth in interface IStyled
      Returns:
      the fit line width in pixels.
    • getSymbolType

      public SymbolType getSymbolType()
      Description copied from interface: IStyled
      Get the symbol used for drawing points.
      Specified by:
      getSymbolType in interface IStyled
      Returns:
      the symbol used for drawing points.
    • setFillColor

      public void setFillColor(Color fillColor)
      Description copied from interface: IStyled
      Set the color used for fill the interior area.
      Specified by:
      setFillColor in interface IStyled
      Parameters:
      fillColor - the fill color.
    • setBorderColor

      public void setBorderColor(Color lineColor)
      Description copied from interface: IStyled
      Set the color used for symbol borders.
      Specified by:
      setBorderColor in interface IStyled
      Parameters:
      lineColor - the border color.
    • setFitLineColor

      public void setFitLineColor(Color fitColor)
      Description copied from interface: IStyled
      Set the color used for the fit drawing.
      Specified by:
      setFitLineColor in interface IStyled
      Parameters:
      fitColor - the fit color.
    • setFitLineStyle

      public void setFitLineStyle(LineStyle lineStyle)
      Set the line style
      Specified by:
      setFitLineStyle in interface IStyled
      Parameters:
      lineStyle - the new line style
    • setFitLineWidth

      public void setFitLineWidth(float lineWidth)
      Set the line width
      Specified by:
      setFitLineWidth in interface IStyled
      Parameters:
      lineWidth - the new line width
    • setSymbolType

      public void setSymbolType(SymbolType symbolType)
      Set the symbol type
      Specified by:
      setSymbolType in interface IStyled
      Parameters:
      lineWidth - the new symbol type
    • getSymbolSize

      public int getSymbolSize()
      Get the symbol size (full width) in pixels.
      Specified by:
      getSymbolSize in interface IStyled
      Returns:
      the symbol size (full width) in pixels.
    • setSymbolSize

      public void setSymbolSize(int symbolSize)
      Set symbol size (full width) in pixels.
      Specified by:
      setSymbolSize in interface IStyled
      Parameters:
      symbolSize - symbol size (full width) in pixels.
    • getAuxLineColor

      public Color getAuxLineColor()
      Description copied from interface: IStyled
      Get the color used for auxiliary lines.
      Specified by:
      getAuxLineColor in interface IStyled
      Returns:
      the auxiliary line color.
    • setAuxLineColor

      public void setAuxLineColor(Color auxColor)
      Description copied from interface: IStyled
      Set the color used for auxiliary lines.
      Specified by:
      setAuxLineColor in interface IStyled
      Parameters:
      auxColor - the auxiliary line color.
    • getAuxLineStyle

      public LineStyle getAuxLineStyle()
      Description copied from interface: IStyled
      Get the style used for drawing fits.
      Specified by:
      getAuxLineStyle in interface IStyled
      Returns:
      the line style for fits.
    • setAuxLineStyle

      public void setAuxLineStyle(LineStyle lineStyle)
      Description copied from interface: IStyled
      Set the style used for drawing auxiliary lines.
      Specified by:
      setAuxLineStyle in interface IStyled
      Parameters:
      lineStyle - the auxiliary line style.
    • getAuxLineWidth

      public float getAuxLineWidth()
      Description copied from interface: IStyled
      Get the line width for drawing auxiliary lines.
      Specified by:
      getAuxLineWidth in interface IStyled
      Returns:
      the auxiliary line width in pixels.
    • setAuxLineWidth

      public void setAuxLineWidth(float lineWidth)
      Description copied from interface: IStyled
      Set the line width for drawing auxiliary lines.
      Specified by:
      setAuxLineWidth in interface IStyled
      Parameters:
      lineWidth - the auxiliary line width in pixels.