org.eclnt.jsfserver.util.quadrantplot

## Class QuadrantPlot

- java.lang.Object
- - org.eclnt.jsfserver.util.quadrantplot.QuadrantPlot

-     public class QuadrantPlot
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QuadrantPlot()` Default constructor - automatically defined a width and height of 10 cm * 10 cm

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPlotData(double x, double y, java.lang.String text, double size, java.lang.String color)` Output text in the plot area.
    `void` | `addPlotData(double x, double y, java.lang.String text, double size, java.lang.String color, java.lang.String id)`
    `void` | `addQuadrantInfo(int x, int y, java.lang.String color, java.lang.String id)` Add the info for one quadrant.
    `void` | `clearDrawAreaData()` Internally resets the data to a cleared status.
    `long` | `computeOutputWidth(int height)` Calculate the width for the height, so that the quadrant output is quadratic.
    `protected void` | `createSVGChart(java.lang.StringBuffer chartData)`
    `long` | `getCi()` Internal usage only.
    `java.lang.String` | `getSvg()` Return the SVG string of the draw area.
    `void` | `printFrameAround(boolean printFrame)` Print a frame araound the plot or not.
    `void` | `rotateXAxisScaleText(double degrees, double height)` Rotate the x axis scale textes.
    `void` | `setBackgroundColor(java.lang.String color)` Set the background color of the hole plot area.
    `void` | `setLeftYAxisDistance(double width)` Additional space at the left side of the plot.
    `void` | `setQuadrantplotprop(java.lang.String value)` Internally used.
    `void` | `setScaleLineColor(java.lang.String color)` Set the color of the scale lines.
    `void` | `setSelectedID(java.lang.String selectedID)`
    `void` | `setSelectionColor(java.lang.String selectionColor)` When using `setSelectedID(String)` then the area of the corresponding id will be marked by drawing a border with a certain color.
    `void` | `setSelectionStrokeWidth(int selectionStrokeWidth)` When using `setSelectedID(String)` then the area of the corresponding id will be marked by drawing a border with a certain color.
    `void` | `setSelId(java.lang.String value)` Internally used.
    `void` | `setSVGOutputWidth(int height)` Set the height for the SVG output.
    `void` | `setXAxis(java.lang.String[] outputXAxis)` Set the quadrant text for the x axis.
    `void` | `setXAxis(java.lang.String[] outputXAxis, double[] size, java.lang.String[] color)` Set the text for the x axis with the color and the font size.
    `void` | `setXAxisDescription(java.lang.String description, java.lang.String color, double fontSize, double height)` Sets the description for the horizontal axis.
    `void` | `setYAxis(java.lang.String[] outputYAxis)` Set the quadrant text for the y axis.
    `void` | `setYAxis(java.lang.String[] outputYAxis, double[] size, java.lang.String[] color)` Set the text for the y axis with the color and the font size.
    `void` | `setYAxisDescription(java.lang.String description, java.lang.String color, double fontSize, double width)` Sets the description for the vertical axis.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QuadrantPlot

          public QuadrantPlot()

      Default constructor - automatically defined a width and height of 10 cm * 10 cm

  - ### Method Detail

    - #### clearDrawAreaData

          public void clearDrawAreaData()

      Internally resets the data to a cleared status.

    - #### setXAxisDescription

          public void setXAxisDescription(java.lang.String description,
                                          java.lang.String color,
                                          double fontSize,
                                          double height)

      Sets the description for the horizontal axis. This text is drawn under the chart.
      Parameters:
        `description` - Text for the output under the chart, e. g. "Year 2000".
        `color` - Color for the text. Either #RRGGBB (e.g. #FF0000 for red) or valid HTML color name ("red").
        `fontSize` - The relative font size of the description, from 8 to 24. The default value is 12.
        `height` - The gap under the x axis for the description. For fontSize 12, the height should be 200.

    - #### setXAxis

          public void setXAxis(java.lang.String[] outputXAxis)

      Set the quadrant text for the x axis.
      The color is 'black' and the font size is '12'.
      Parameters:
        `outputXAxis` - All text for the x axis.

    - #### setXAxis

          public void setXAxis(java.lang.String[] outputXAxis,
                               double[] size,
                               java.lang.String[] color)

      Set the text for the x axis with the color and the font size.
      All array's must have the same lenght.
      Parameters:
        `outputXAxis` - All text for the x axis.
        `size` - The size for each text.
        `color` - The color for each text.

    - #### setYAxisDescription

          public void setYAxisDescription(java.lang.String description,
                                          java.lang.String color,
                                          double fontSize,
                                          double width)

      Sets the description for the vertical axis. This text is drawn aside the chart.
      Parameters:
        `description` - Text for the output beside the chart, e. g. "budget".
        `color` - Color for the text. Either #RRGGBB (e.g. #FF0000 for red) or valid HTML color name ("red").
        `fontSize` - The relative font size of the description, from 8 to 24. The default value is 12.
        `width` - The gap on the left side of the x axis for the description. For fontSize 12, the width should be 200.

    - #### setYAxis

          public void setYAxis(java.lang.String[] outputYAxis)

      Set the quadrant text for the y axis.
      The color is 'black' and the font size is '12'.
      Parameters:
        `outputYAxis` - All text for the y axis.

    - #### setYAxis

          public void setYAxis(java.lang.String[] outputYAxis,
                               double[] size,
                               java.lang.String[] color)

      Set the text for the y axis with the color and the font size.
      All array's must have the same lenght.
      Parameters:
        `outputYAxis` - All text for the y axis.
        `size` - The size for each text.
        `color` - The color for each text.

    - #### addQuadrantInfo

          public void addQuadrantInfo(int x,
                                      int y,
                                      java.lang.String color,
                                      java.lang.String id)

      Add the info for one quadrant. The quadrants are placed from left bottom to right top.
      Parameters:
        `x` - X axis index form 0 to the size of the x axis quadrant count minus 1.
        `y` - Y axis index form 0 to the size of the y axis quadrant count minus 1.
        `color` - Background color of the quadrant.
        `id` - The id for the reactOnclick method.

    - #### addPlotData

          public void addPlotData(double x,
                                  double y,
                                  java.lang.String text,
                                  double size,
                                  java.lang.String color)

      Output text in the plot area.
      The number before the dezimal point is the quadrant index, the number after is the location in the quadrant. The location is the left bottom point of the text.
      Parameters:
        `x` - Quadrant and location at the x axis.
        `y` - Quadrant and location in the y axis.
        `text` - Output text.
        `size` - Text size.
        `color` - Text color.

    - #### addPlotData

          public void addPlotData(double x,
                                  double y,
                                  java.lang.String text,
                                  double size,
                                  java.lang.String color,
                                  java.lang.String id)

    - #### rotateXAxisScaleText

          public void rotateXAxisScaleText(double degrees,
                                           double height)

      Rotate the x axis scale textes. Also, you could reserve place for the text. The default rotation is 0 degrees.
      Parameters:
        `degrees` - Rotation of the text between -90 and +90 degrees.
        `height` - Additinal place for the rotated x axis texts between the plot and the x axis description.

    - #### setLeftYAxisDistance

          public void setLeftYAxisDistance(double width)

      Additional space at the left side of the plot.

    - #### printFrameAround

          public void printFrameAround(boolean printFrame)

      Print a frame araound the plot or not.
      Default is print the frame.

    - #### setScaleLineColor

          public void setScaleLineColor(java.lang.String color)

      Set the color of the scale lines. Default color is black.

    - #### setBackgroundColor

          public void setBackgroundColor(java.lang.String color)

      Set the background color of the hole plot area. Default color is white.

    - #### setSelectedID

          public void setSelectedID(java.lang.String selectedID)

    - #### setSelectionColor

          public void setSelectionColor(java.lang.String selectionColor)

      When using `setSelectedID(String)` then the area of the corresponding id will be marked by drawing a border with a certain color. This selection color can be defined here.

    - #### setSelectionStrokeWidth

          public void setSelectionStrokeWidth(int selectionStrokeWidth)

      When using `setSelectedID(String)` then the area of the corresponding id will be marked by drawing a border with a certain color. This width of this border can be defined here.

    - #### getCi

          public final long getCi()

      Internal usage only. Change index.

    - #### setQuadrantplotprop

          public void setQuadrantplotprop(java.lang.String value)

      Internally used.

    - #### setSelId

          public void setSelId(java.lang.String value)

      Internally used.
      For change or clear the selection use the method setSelectedID.

    - #### getSvg

          public java.lang.String getSvg()

      Return the SVG string of the draw area.

    - #### computeOutputWidth

          public long computeOutputWidth(int height)

      Calculate the width for the height, so that the quadrant output is quadratic.
      Parameters:
        `height` - The height of the output.
      Returns:
        The widht for quadratic quadrant output.

    - #### setSVGOutputWidth

          public void setSVGOutputWidth(int height)

      Set the height for the SVG output. Calculate the width, that the quadrants has a quadratric output.
      Parameters:
        `height` - The height for the SVG output.

    - #### createSVGChart

          protected void createSVGChart(java.lang.StringBuffer chartData)

Copyright © CaptainCasa Gmbh. All Rights Reserved.