Commit 07a12ffb authored by Alexander Diewald's avatar Alexander Diewald

SpiderChart: Readd author information

Issue-Ref: 3452
Issue-Url: https://af3-developer.fortiss.org/issues/3452Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent f40c6303
ColorStyleBase.java ca05f515764870da3d814f0ac38b32186f582132 YELLOW ColorStyleBase.java acc012483c59b69c5868d0b9e81bfb4aed3364fb YELLOW
FillStyle.java 198ea42987a2f02a07ed7d855b34a09e1deba28e YELLOW FillStyle.java fa1094afff36fefdee7c651c7bb9da959a5e29a2 YELLOW
FontStyle.java ab25b918bfee12eccbaad941b00adbc0bba29228 YELLOW FontStyle.java 8c11fadf66744203318c24b7aaa230030a4b8d3a YELLOW
LineStyle.java e2d64254bdb62d9e53cee33577291ec67c3ce047 YELLOW LineStyle.java acf3686cae785673a1be2e34ee2eb3ef3ac2e0b6 YELLOW
StrokeStyle.java 703b573d91c469f064e146b683e744eda6f3d8ed YELLOW StrokeStyle.java aacf3f7de43849eac12bc0ecf5b673f2f522a647 YELLOW
...@@ -12,7 +12,11 @@ package org.fortiss.tooling.common.ui.javafx.style; ...@@ -12,7 +12,11 @@ package org.fortiss.tooling.common.ui.javafx.style;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
/** Base class for styles with a single {@link Color}. */ /**
* Base class for styles with a single {@link Color}.
*
* @author hoelzl
*/
abstract class ColorStyleBase { abstract class ColorStyleBase {
/** The RGBA color. */ /** The RGBA color. */
private final Color rgbaColor; private final Color rgbaColor;
......
...@@ -13,7 +13,11 @@ package org.fortiss.tooling.common.ui.javafx.style; ...@@ -13,7 +13,11 @@ package org.fortiss.tooling.common.ui.javafx.style;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
/** Represents a style to be used in for filling areas. */ /**
* Represents a style to be used in for filling areas.
*
* @author hoelzl
*/
public final class FillStyle extends ColorStyleBase { public final class FillStyle extends ColorStyleBase {
/** Alpha transparency value (default is opaque 1.0). */ /** Alpha transparency value (default is opaque 1.0). */
private final double alpha; private final double alpha;
......
...@@ -23,6 +23,8 @@ import javafx.scene.text.Text; ...@@ -23,6 +23,8 @@ import javafx.scene.text.Text;
/** /**
* Represents style attributes of fonts and provides a corresponding * Represents style attributes of fonts and provides a corresponding
* {@link #drawText(GraphicsContext, String, double, double) drawText} method. * {@link #drawText(GraphicsContext, String, double, double) drawText} method.
*
* @author hoelzl
*/ */
public final class FontStyle extends ColorStyleBase { public final class FontStyle extends ColorStyleBase {
/** Black Verdana 18 point. */ /** Black Verdana 18 point. */
......
...@@ -16,6 +16,8 @@ import javafx.scene.paint.Color; ...@@ -16,6 +16,8 @@ import javafx.scene.paint.Color;
/** /**
* Represents a style to be used for lines and provides a corresponding * Represents a style to be used for lines and provides a corresponding
* {@link #drawLine(GraphicsContext, double, double, double, double) drawLine} method. * {@link #drawLine(GraphicsContext, double, double, double, double) drawLine} method.
*
* @author hoelzl
*/ */
public final class LineStyle extends ColorStyleBase { public final class LineStyle extends ColorStyleBase {
/** Solid, black line with width of one point. */ /** Solid, black line with width of one point. */
......
...@@ -12,7 +12,11 @@ package org.fortiss.tooling.common.ui.javafx.style; ...@@ -12,7 +12,11 @@ package org.fortiss.tooling.common.ui.javafx.style;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
/** Represents the style of the stroke of a line. */ /**
* Represents the style of the stroke of a line.
*
* @author hoelzl
*/
public final class StrokeStyle { public final class StrokeStyle {
/** Stroke style of the solid line. */ /** Stroke style of the solid line. */
public static final StrokeStyle SOLID = new StrokeStyle(0, null); public static final StrokeStyle SOLID = new StrokeStyle(0, null);
......
SpiderChartCanvas.java fd348bdd520fbab08b4c910ec0b76fc6512ea408 YELLOW SpiderChartCanvas.java 18d8892dc198ffb2786f620f79aabe258ef9d3bc YELLOW
SpiderChartControl.java e74c5015dbe19de93169ff9484ad8f37feda3242 YELLOW SpiderChartControl.java 8df7250c884bd4a4c1b178b49ecb2b2b4f411516 YELLOW
SpiderChartControlBase.java 12e98b77abfe0eeb6de22964b33bdfce056f157d YELLOW SpiderChartControlBase.java 9a48d34645bf8094d07cf25de8b6647c541970e7 YELLOW
SpiderChartLegendControl.java 5e8b47a4433ae5ce2da6b7cd613f5059f5bc9589 YELLOW SpiderChartLegendControl.java bded1236231ad7b7b98491d7f87713aa9c5b0858 YELLOW
SpiderChartTitleControl.java 64f026ea79a39c0e82d840e1920f1873a367e6ce YELLOW SpiderChartTitleControl.java 7d9b032439c0f19d03f7a83c245fa01bb0649ba1 YELLOW
SpiderChartViewer.java 72f2db133eec606fd9e993fca3f6a0f03b6f528c YELLOW SpiderChartViewer.java d3d30f5498712922abcd84095e555559d6d72825 YELLOW
...@@ -16,7 +16,11 @@ import org.fortiss.tooling.spiderchart.style.ChartStyle; ...@@ -16,7 +16,11 @@ import org.fortiss.tooling.spiderchart.style.ChartStyle;
import javafx.scene.canvas.Canvas; import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
/** Represents a {@link Canvas} on which chart will be drawn. */ /**
* Represents a {@link Canvas} on which chart will be drawn.
*
* @author hoelzl
*/
final class SpiderChartCanvas { final class SpiderChartCanvas {
/** The canvas. */ /** The canvas. */
private final Canvas canvas; private final Canvas canvas;
......
...@@ -30,7 +30,11 @@ import javafx.geometry.Dimension2D; ...@@ -30,7 +30,11 @@ import javafx.geometry.Dimension2D;
import javafx.geometry.Point2D; import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
/** Class for drawing the spider chart. */ /**
* Class for drawing the spider chart.
*
* @author hoelzl
*/
public final class SpiderChartControl extends SpiderChartControlBase { public final class SpiderChartControl extends SpiderChartControlBase {
/** The center point of the chart. */ /** The center point of the chart. */
private Point2D center = new Point2D(0, 0); private Point2D center = new Point2D(0, 0);
......
...@@ -15,7 +15,11 @@ import org.fortiss.tooling.spiderchart.style.ChartStyle; ...@@ -15,7 +15,11 @@ import org.fortiss.tooling.spiderchart.style.ChartStyle;
import javafx.geometry.Rectangle2D; import javafx.geometry.Rectangle2D;
/** Base class for elements of the spider chart. */ /**
* Base class for elements of the spider chart.
*
* @author hoelzl
*/
public abstract class SpiderChartControlBase { public abstract class SpiderChartControlBase {
/** The spider chart this component belongs to. */ /** The spider chart this component belongs to. */
protected final SpiderChart chart; protected final SpiderChart chart;
......
...@@ -20,7 +20,11 @@ import org.fortiss.tooling.spiderchart.style.LegendStyle; ...@@ -20,7 +20,11 @@ import org.fortiss.tooling.spiderchart.style.LegendStyle;
import javafx.geometry.Dimension2D; import javafx.geometry.Dimension2D;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
/** Class used for drawing the the spider chart legend. */ /**
* Class used for drawing the the spider chart legend.
*
* @author hoelzl
*/
public final class SpiderChartLegendControl extends SpiderChartControlBase { public final class SpiderChartLegendControl extends SpiderChartControlBase {
/** The length of the line for each data series. */ /** The length of the line for each data series. */
private static final double LINE_SIZE = 20; private static final double LINE_SIZE = 20;
...@@ -37,6 +41,7 @@ public final class SpiderChartLegendControl extends SpiderChartControlBase { ...@@ -37,6 +41,7 @@ public final class SpiderChartLegendControl extends SpiderChartControlBase {
if(!style.isShowLegend()) { if(!style.isShowLegend()) {
return; return;
} }
if(style.getLegendStyle().isVerticalLayout()) { if(style.getLegendStyle().isVerticalLayout()) {
drawVertical(gc); drawVertical(gc);
} else { } else {
......
...@@ -17,7 +17,11 @@ import org.fortiss.tooling.common.ui.javafx.style.FontStyle; ...@@ -17,7 +17,11 @@ import org.fortiss.tooling.common.ui.javafx.style.FontStyle;
import javafx.geometry.Dimension2D; import javafx.geometry.Dimension2D;
import javafx.scene.canvas.GraphicsContext; import javafx.scene.canvas.GraphicsContext;
/** Class used for drawing the spider chart title. */ /**
* Class used for drawing the spider chart title.
*
* @author hoelzl
*/
public final class SpiderChartTitleControl extends SpiderChartControlBase { public final class SpiderChartTitleControl extends SpiderChartControlBase {
/** Constructor */ /** Constructor */
public SpiderChartTitleControl(SpiderChart chart, ChartStyle style) { public SpiderChartTitleControl(SpiderChart chart, ChartStyle style) {
...@@ -29,10 +33,12 @@ public final class SpiderChartTitleControl extends SpiderChartControlBase { ...@@ -29,10 +33,12 @@ public final class SpiderChartTitleControl extends SpiderChartControlBase {
if(!style.isShowTitle()) { if(!style.isShowTitle()) {
return; return;
} }
String text = chart.getTitle(); String text = chart.getTitle();
if(text == null || text.trim().length() == 0) { if(text == null || text.trim().length() == 0) {
return; return;
} }
gc.save(); gc.save();
FontStyle fontStyle = style.getTitleStyle(); FontStyle fontStyle = style.getTitleStyle();
Dimension2D extent = fontStyle.getTextBounds(text); Dimension2D extent = fontStyle.getTextBounds(text);
......
...@@ -17,7 +17,11 @@ import javafx.geometry.Bounds; ...@@ -17,7 +17,11 @@ import javafx.geometry.Bounds;
import javafx.scene.canvas.Canvas; import javafx.scene.canvas.Canvas;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
/** Represents a viewer on the canvas to display the spider chart. */ /**
* Represents a viewer on the canvas to display the spider chart.
*
* @author hoelzl
*/
public final class SpiderChartViewer { public final class SpiderChartViewer {
/** The viewer main pane. */ /** The viewer main pane. */
private final Pane viewerPane; private final Pane viewerPane;
......
AxisBase.java 5cf20002b0ca727126fefbe0d504dff9e4ac948b YELLOW AxisBase.java d2707141772d5478793d968209f6aa5b0b625692 YELLOW
DataSeries.java d76db04d9febe5a5ce1b4933404e77b457d1539b YELLOW DataSeries.java a12100b51242eccdadb2f4ce283c892bc154120b YELLOW
DoubleAxis.java 774ddf6170c49e053d32c10f70eef1cea904fcba YELLOW DoubleAxis.java e7d28b46c5971156232f9f602084f3474039888b YELLOW
EnumerationAxis.java ae48eff11ec95a4ccb35e74bf16ffd0aad15abf3 YELLOW EnumerationAxis.java 2607372a2d8cfea9cc01adf9ad24948307deeeb2 YELLOW
SpiderChart.java 81a31828b186716984f9c8d363efb97aaeb67c84 YELLOW SpiderChart.java 89e851666022ee49cd2ced6f23f74e58522c7ad2 YELLOW
...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.model; ...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.model;
import static java.util.Objects.requireNonNull; import static java.util.Objects.requireNonNull;
/** Base class for different axis implementations. */ /**
* Base class for different axis implementations.
*
* @author hoelzl
*/
public abstract class AxisBase { public abstract class AxisBase {
/** The name of the axis. */ /** The name of the axis. */
private final String name; private final String name;
......
...@@ -15,7 +15,11 @@ import static java.util.Objects.requireNonNull; ...@@ -15,7 +15,11 @@ import static java.util.Objects.requireNonNull;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** Class representing series of data for each axis of a spider chart. */ /**
* Class representing series of data for each axis of a spider chart.
*
* @author hoelzl
*/
public final class DataSeries { public final class DataSeries {
/** The name of the data series. */ /** The name of the data series. */
private String name; private String name;
......
...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.model; ...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.model;
import java.util.Comparator; import java.util.Comparator;
/** Class representing an axis of the spider chart displaying double values. */ /**
* Class representing an axis of the spider chart displaying double values.
*
* @author hoelzl
*/
public final class DoubleAxis extends AxisBase { public final class DoubleAxis extends AxisBase {
/** The minimum value of the axis (at the center of the spider chart). */ /** The minimum value of the axis (at the center of the spider chart). */
private Double minimumValue = 0.0; private Double minimumValue = 0.0;
......
...@@ -15,7 +15,11 @@ import static java.util.Collections.sort; ...@@ -15,7 +15,11 @@ import static java.util.Collections.sort;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
/** Class representing an axis of the spider chart that displays enumeration values. */ /**
* Class representing an axis of the spider chart that displays enumeration values.
*
* @author hoelzl
*/
public final class EnumerationAxis<T extends Object> extends AxisBase { public final class EnumerationAxis<T extends Object> extends AxisBase {
/** The enumeration values of this axis. */ /** The enumeration values of this axis. */
......
...@@ -15,7 +15,11 @@ import static java.util.Collections.unmodifiableList; ...@@ -15,7 +15,11 @@ import static java.util.Collections.unmodifiableList;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** Main class of the spider chart model. */ /**
* Main class of the spider chart model.
*
* @author hoelzl
*/
public final class SpiderChart { public final class SpiderChart {
/** The axes contained in this chart. */ /** The axes contained in this chart. */
private List<AxisBase> axes = new ArrayList<>(); private List<AxisBase> axes = new ArrayList<>();
......
AxisStyle.java c39d7c5b070a067cfd65c23dc54c5bd493258a68 YELLOW AxisStyle.java 9b358926e7ef55e42ae23cdfb62d49042ffc3b53 YELLOW
ChartStyle.java 9f2dd2ccd9ef14ab435a5c105a68a53b71b26a75 YELLOW ChartStyle.java 8a5ea617ce5584b227083aff2e0e8424d60ea8d6 YELLOW
DataSeriesStyle.java cddd8585986684892c3a9bc62bdfe191690a00f2 YELLOW DataSeriesStyle.java 1dca488252b3562a657d05248e8fa5a21f2dbb71 YELLOW
LegendStyle.java 35dfc86391a5082614fdf5f2b79d1b377f5288c0 YELLOW LegendStyle.java cd3b96087c41f0faab7289e1ae0a276a1c952527 YELLOW
...@@ -25,6 +25,8 @@ import org.fortiss.tooling.common.ui.javafx.style.LineStyle; ...@@ -25,6 +25,8 @@ import org.fortiss.tooling.common.ui.javafx.style.LineStyle;
* Class for all style attributes of {@link DoubleAxis spider chart axes}. * Class for all style attributes of {@link DoubleAxis spider chart axes}.
* <P> * <P>
* If {@link #segmentStyle} is non-null then indicators will be drawn. * If {@link #segmentStyle} is non-null then indicators will be drawn.
*
* @author hoelzl
*/ */
public final class AxisStyle { public final class AxisStyle {
......
...@@ -22,7 +22,12 @@ import org.fortiss.tooling.common.ui.javafx.style.FillStyle; ...@@ -22,7 +22,12 @@ import org.fortiss.tooling.common.ui.javafx.style.FillStyle;
import org.fortiss.tooling.common.ui.javafx.style.FontStyle; import org.fortiss.tooling.common.ui.javafx.style.FontStyle;
import org.fortiss.tooling.common.ui.javafx.style.LineStyle; import org.fortiss.tooling.common.ui.javafx.style.LineStyle;
/** Class for all style attributes of the {@link SpiderChart spider chart}. */ /**
* Class for all style attributes of the {@link SpiderChart spider chart}.
*
* @author hoelzl
* @author munaro
*/
public final class ChartStyle { public final class ChartStyle {
/** The map for style information of axes. */ /** The map for style information of axes. */
private Map<AxisBase, AxisStyle> axisStyle = new HashMap<AxisBase, AxisStyle>(); private Map<AxisBase, AxisStyle> axisStyle = new HashMap<AxisBase, AxisStyle>();
......
...@@ -24,7 +24,11 @@ import org.fortiss.tooling.common.ui.javafx.style.FillStyle; ...@@ -24,7 +24,11 @@ import org.fortiss.tooling.common.ui.javafx.style.FillStyle;
import org.fortiss.tooling.common.ui.javafx.style.FontStyle; import org.fortiss.tooling.common.ui.javafx.style.FontStyle;
import org.fortiss.tooling.common.ui.javafx.style.LineStyle; import org.fortiss.tooling.common.ui.javafx.style.LineStyle;
/** Class for all style attributes of {@link DataSeries data series}. */ /**
* Class for all style attributes of {@link DataSeries data series}.
*
* @author hoelzl
*/
public final class DataSeriesStyle { public final class DataSeriesStyle {
/** The line style of the data series. */ /** The line style of the data series. */
private final LineStyle lineStyle; private final LineStyle lineStyle;
......
...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.style; ...@@ -12,7 +12,11 @@ package org.fortiss.tooling.spiderchart.style;
import org.fortiss.tooling.common.ui.javafx.style.FontStyle; import org.fortiss.tooling.common.ui.javafx.style.FontStyle;
/** Class for all style attributes of the spider chart legend. */ /**
* Class for all style attributes of the spider chart legend.
*
* @author hoelzl
*/
public final class LegendStyle { public final class LegendStyle {
/** The vertical / horizontal layout flag. */ /** The vertical / horizontal layout flag. */
private boolean verticalLayout; private boolean verticalLayout;
......
AxisUtils.java 09be2c455f8c4f740b2bc13a347849dc349c304c YELLOW AxisUtils.java 0b85e0563ed3058c26180669d989831625617525 YELLOW
...@@ -15,7 +15,12 @@ import org.fortiss.tooling.spiderchart.style.AxisStyle; ...@@ -15,7 +15,12 @@ import org.fortiss.tooling.spiderchart.style.AxisStyle;
import javafx.geometry.Point2D; import javafx.geometry.Point2D;
/** Utility methods related to {@link DoubleAxis} and {@link AxisStyle}. */ /**
* Utility methods related to {@link DoubleAxis} and {@link AxisStyle}.
*
* @author hoelzl
* @author munaro
*/
public class AxisUtils { public class AxisUtils {
/** Returns the segment point on the axis if the the axis displayed with the given extents. */ /** Returns the segment point on the axis if the the axis displayed with the given extents. */
public static Point2D getSegmentPoint(int numberOfSegments, int segment, double extentX, public static Point2D getSegmentPoint(int numberOfSegments, int segment, double extentX,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment