DrawOptions
jhplot

Class DrawOptions

    • Constructor Detail

      • DrawOptions

        public DrawOptions()
        Sets drawing options for all objects.
    • Method Detail

      • setTitle

        public void setTitle(String title)
        Sets the title.
        Overrides:
        setTitle in class Plottable
        Parameters:
        title - Title
      • copyLinePars

        public jplot.LinePars copyLinePars(jplot.LinePars old)
        Copy drawing options.
        Parameters:
        old - LinePars to be copied
      • getTitle

        public String getTitle()
        Get the title of an object.
        Overrides:
        getTitle in class Plottable
        Returns:
        Title of an object
      • setNameX

        public void setNameX(String name)
        Set the name for X-axis.
        Parameters:
        name - Name for X axis
      • getNameX

        public String getNameX()
        Get the name of X-axis
        Returns:
        Name of the lable in X
      • setNameY

        public void setNameY(String name)
        Sets the name for Y-axis.
        Parameters:
        name - text for the title of X-axis
      • getNameY

        public String getNameY()
        Get the title of Y-axis.
        Returns:
        text of the Y-title.
      • setNameZ

        public void setNameZ(String name)
        Sets the title for Z-axis
        Parameters:
        name - Title of Z-axis
      • getNameZ

        public String getNameZ()
        Get the title of Z-axis
        Returns:
        Title of the Z-axis
      • getDrawOption

        public jplot.LinePars getDrawOption()
        Get the drawing attributes
        Returns:
        LinePars object
      • setDrawOption

        public void setDrawOption(jplot.LinePars lp)
        Sets drawing attributes.
        Parameters:
        lp - LinePars attributes
      • setLegend

        public void setLegend(boolean b)
        Sets whether or not this line style should draw the name in the legend of the graph.
        Parameters:
        b - true if the name should be shown
      • getLegend

        public boolean getLegend()
        Returns true if this line style should draw the name in the legend of the graph, false otherwise
        Returns:
        true if the name should be shown
      • setStyle

        public void setStyle(String type)
        Sets the style.
        Parameters:
        type - string representing the style.
        "l" : line style
        "p": symbol type
        "h": histogram style
        "lp" or "pl": lines connects symbols
      • setFill

        public void setFill(boolean cfill)
        Fill or not histogram or function.
        Parameters:
        cfill - true if a drawing object should be filled
      • isFilled

        public boolean isFilled()
        Fill or not histogram or function.
        Parameters:
        cfill - true if a drawing object should be filled
      • setBars

        public void setBars(boolean cfill)
        Draw a histogram using bars (default is using lines). This means that vertical lines will be shown.
        Parameters:
        cfill - true if a histogram is shown using bar.
      • isBars

        public boolean isBars()
        Return true if histogram is shown using bars.
      • setFillColor

        public void setFillColor(Color color)
        Fill color of a drawing object.
        Parameters:
        color - Color to be used to fill a drawing object
      • getFillColor

        public Color getFillColor()
        Get color of a drawing object.
        Returns:
        get fill color.
      • setFillColorTransparency

        public void setFillColorTransparency(double ff)
        Set color transparency used to fill an object.
        Parameters:
        ff - transparency, from 0 (transparent) to 1 (not transparent)
      • setErrY

        public void setErrY(boolean sho)
        Show or not the 1st level errors for Y values.
        Parameters:
        sho - if true, should be shown
      • setErrSysY

        public void setErrSysY(boolean sho)
        Show or not the 2nd level errors for Y values
        Parameters:
        sho - if true, should be shown
      • setErrSys

        public void setErrSys(boolean sho)
        Show or not the 2nd level errors for X and Y values
        Parameters:
        sho - if true, should be shown
      • setErrX

        public void setErrX(boolean sho)
        Set or not the 1st level errors in X
        Parameters:
        sho - if true, should be shown
      • setErr

        public void setErr(boolean sho)
        Set or not the 1st level errors on X and Y
        Parameters:
        sho - if true, should be shown
      • isErrX

        public boolean isErrX()
        is error shown on X?
        Returns:
        true if shown
      • isErrY

        public boolean isErrY()
        is error shown on Y?
        Returns:
        true if shown
      • setErrSysX

        public void setErrSysX(boolean sho)
        Set or not the 2nd level errors in X
        Parameters:
        sho - if true, should be shown
      • setErrColorY

        public void setErrColorY(Color color)
        Set color for 1st level errors in Y
        Parameters:
        color - Color
      • setErrColorX

        public void setErrColorX(Color color)
        Set color for 1st level errors in X
        Parameters:
        color - Color
      • setErrColor

        public void setErrColor(Color color)
        Set color for 1st level errors for X and Y
        Parameters:
        color - Color
      • setErrColor

        public void setErrColor(Color color,               double transperency)
        Set color for 1st level errors for X and Y
        Parameters:
        color - Color
        transperency - Transparency level (0-1)
      • setSymbol

        public void setSymbol(int shape)
        Set symbol types. Look at the definitions.
        Parameters:
        shape -
        0 : not filled circle
        1: not filled square
        2: not filled diamond
        3: not filled triangle
        4: filled circle
        5: filled square
        6: filed diamond
        7: filled triangle
        8: plus (+)
        9: cross as (x)
        10: star (*)
        11: small dot (.)
        12: bold plus (+)
      • setSymbol

        public void setSymbol(String shape)
        Set symbol types using a string. It is more human readable, but not all options are supported.
        Parameters:
        shape - that takes this value:

        "Circle" or "o": not filled circle
        "Dot" or ".": dot
        "Square": not filled square
        "Diamond": not filled diamond
        "Triangle": not filled triangle
        "+": plus (+)
        "x": cross as (x)
        "*": star (*)

      • getSymbolShape

        public String getSymbolShape()
        Return symbol shape as a string.
        Returns:
        symbol shape.
      • setLineStyle

        public void setLineStyle(int style)
        Set line styles (important for functions).
        Parameters:
        style - 0 - solid; 1- dashed; 2-dot-dashed line; 3: dotted
      • getLineStyle

        public int getLineStyle()
        Get line style. 0 - solid; 1- dashed; 2-dot-dashed line; 3: dotted
        Returns:
        style of line.
      • getSymbol

        public int getSymbol()
        Get current symbol.
        Returns:
        get symbol type
      • setColor

        public void setColor(Color color)
        Set color for lines
        Parameters:
        color - Color of lines.
      • getColor

        public Color getColor()
        Get drawing color.
        Returns:
        drawing color
      • setPenWidth

        public void setPenWidth(int w)
        Set width of the lines
        Parameters:
        w - Width of the lines
      • getPenWidth

        public float getPenWidth()
        Return the width of the lines.
        Returns:
        pen width
      • setPenDash

        public void setPenDash()
        Set dashed style with default length
      • setPenDash

        public void setPenDash(int lenght)
        Set dashed style with default length
        Parameters:
        lenght - dash length
      • setType

        public void setType(int type)
        Set type of the object Should be: LinePars.H1D, LineParsF1D, LineParsF1D
        Parameters:
        type -
      • getType

        public int getType()
        Get the type of the object.
        Returns:
        object type.
      • setPenWidthErrSys

        public void setPenWidthErrSys(int w)
        Set width of the lines used to show 2nd level errors
        Parameters:
        w - width of lines
      • setPenWidthErr

        public void setPenWidthErr(int w)
        Set width of the lines used to show 1st level errors
        Parameters:
        w - width of lines
      • setErrAll

        public void setErrAll(boolean w)
        Show or not all errors (1st and 2nd level). Errors are shown using lines. You can also fill area between errors using fill methods
        Parameters:
        w - true, if errors are shown
      • setErrFill

        public void setErrFill(boolean w)
        Fill area between lower and upper 1st-level errors
        Parameters:
        w - true, if area is filled
      • setErrFillColor

        public void setErrFillColor(Color c)
        Fill color area between lower and upper 1st-level errors.
        Parameters:
        c - what color to use
      • setErrFillColor

        public void setErrFillColor(Color c,                   double transp)
        Fill color area between lower and upper 1st-level errors and set transparency level
        Parameters:
        c - what color to use
        transp - transparency level (between 0 and 1)
      • setErrSysFillColor

        public void setErrSysFillColor(Color c)
        Fill color area between lower and upper 1st-level errors
        Parameters:
        c - color to be used
      • setErrSysFillColor

        public void setErrSysFillColor(Color c,                      double transp)
        Fill color area between lower and upper 2nd-level errors and set transparency level
        Parameters:
        c - what color to use
        transp - transparency level (between 0 and 1)
      • setErrSysFill

        public void setErrSysFill(boolean w)
        Fill area between lower and upper 2st-level errors
        Parameters:
        w - true, if area is filled
      • setErrTicSize

        public void setErrTicSize(double w)
        Set the size of small tics shown at the end of error bars.
        Parameters:
        size - size of the small tic at ends of error bars
      • setSymbolSize

        public void setSymbolSize(int w)
        Set the size of the symbols
        Parameters:
        w - Size of the symbols
      • getSymbolSize

        public double getSymbolSize()
        Get the size of the symbols
      • setGraphStyle

        public void setGraphStyle(int w)
        Set the style of the graph
        Parameters:
        w - if 0: lines or points if 1: histograms
      • setDrawSymbol

        public void setDrawSymbol(boolean w)
        Draw or not symbols
        Parameters:
        w - if true, should be shown
      • setDrawLineKey

        public void setDrawLineKey(boolean w)
        Draw histogram key with line or not
        Parameters:
        w - set to false if no histogram key in form of line is shown
      • setDrawLine

        public void setDrawLine(boolean w)
        Draw lines connecting points or not.
        Parameters:
        w - true, if are drawn
      • setBinWidth

        public void setBinWidth(double w)
        Set the bin width. Not used at this moment
        Parameters:
        w - Bin width
      • getBinWidth

        public double getBinWidth()
        get the bin width. Not used at this moment
        Returns:
        Bin width
      • getLineParm

        public jplot.LinePars getLineParm()
        Get all drawing parameters.
        Returns:
        drawing parameters
      • getDrawOptions

        public String getDrawOptions()
        Get all drawing options in form of a string
        Returns:
        string representing drawing options
      • printDrawOptions

        public void printDrawOptions()
        print all drawing options
      • printDrawOptions

        public void printDrawOptions(PrintStream out)
        Get all drawing options as PrintStream
        Parameters:
        out - input PrintStream

SCaVis 2.2 © jWork.ORG