de.invation.code.toval.graphic.diagrams.ChartFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TOVAL Show documentation
Show all versions of TOVAL Show documentation
TOVAL comprises a set of java classes for common programming issues. It includes utils for arrays, lists, sets and collections for convenient handling and modification, but also support for mathematic definitions concerning logic (clauses + resolution) together with some algorithms for permutations, powersets and resolution. Additionally it contains a number of types for multisets, matrices with object keys and much more.
The newest version!
package de.invation.code.toval.graphic.diagrams;
import java.util.List;
import java.util.Map;
import de.invation.code.toval.graphic.diagrams.models.DotChartModel;
import de.invation.code.toval.graphic.diagrams.models.OneDimChartModel;
import de.invation.code.toval.graphic.diagrams.models.ScatterChartModel;
import de.invation.code.toval.graphic.diagrams.panels.BarChartPanel;
import de.invation.code.toval.graphic.diagrams.panels.DotChartPanel;
import de.invation.code.toval.graphic.diagrams.panels.OneDimChartPanel;
import de.invation.code.toval.graphic.diagrams.panels.ScatterChartPanel;
public class ChartFactory {
public static ,T extends Number & Comparable super T>> ScatterChartPanel createScatterChartPanel(List xValues, List yValues) {
return new ScatterChartPanel(new ScatterChartModel(xValues, yValues, true));
}
public static ,T extends Number & Comparable super T>> ScatterChartPanel createScatterChartPanel(List xValues, List yValues, boolean zeroBased) {
return new ScatterChartPanel(new ScatterChartModel(xValues, yValues, true), zeroBased);
}
public static ,T extends Number & Comparable super T>> ScatterChartPanel createScatterChartPanel(List xValues, List yValues, boolean zeroBased, boolean onlyIntegerTicksX, boolean onlyIntegerTicksY) {
return new ScatterChartPanel(new ScatterChartModel(xValues, yValues, true), zeroBased, onlyIntegerTicksX, onlyIntegerTicksY);
}
public static > DotChartPanel createDotChartPanel(Map statistic) {
return new DotChartPanel(new DotChartModel(statistic));
}
public static > DotChartPanel createDotChartPanel(Map statistic, boolean zeroBased) {
return new DotChartPanel(new DotChartModel(statistic), zeroBased);
}
public static > DotChartPanel createDotChartPanel(Map statistic, boolean zeroBased, boolean onlyIntegerTicksX, boolean onlyIntegerTicksY) {
return new DotChartPanel(new DotChartModel(statistic), zeroBased, onlyIntegerTicksX, onlyIntegerTicksY);
}
public static > DotChartPanel createDotChartPanel(List values, List counts) {
return new DotChartPanel(new DotChartModel(values, counts));
}
public static > DotChartPanel createDotChartPanel(List values, List counts, boolean zeroBased) {
return new DotChartPanel(new DotChartModel(values, counts), zeroBased);
}
public static > DotChartPanel createDotChartPanel(List values, List counts, boolean zeroBased, boolean onlyIntegerTicksX, boolean onlyIntegerTicksY) {
return new DotChartPanel(new DotChartModel(values, counts), zeroBased, onlyIntegerTicksX, onlyIntegerTicksY);
}
public static ,T extends Number & Comparable super T>> BarChartPanel createBarChartPanel(List xValues, List yValues) {
return createBarChartPanel(xValues, yValues, true);
}
public static ,T extends Number & Comparable super T>> BarChartPanel createBarChartPanel(List xValues, List yValues, boolean zeroBased) {
return new BarChartPanel(new ScatterChartModel(xValues, yValues, true), zeroBased);
}
public static ,T extends Number & Comparable super T>> BarChartPanel createBarChartPanel(List xValues, List yValues, boolean zeroBased, boolean onlyIntegerTicksX, boolean onlyIntegerTicksY) {
return new BarChartPanel(new ScatterChartModel(xValues, yValues, true), zeroBased, onlyIntegerTicksX, onlyIntegerTicksY);
}
public static > OneDimChartPanel createOneDimChartPanel(List values) {
return createOneDimChartPanel(values, true);
}
public static > OneDimChartPanel createOneDimChartPanel(List values, boolean zeroBased) {
return new OneDimChartPanel(new OneDimChartModel(values), zeroBased);
}
public static > OneDimChartPanel createOneDimChartPanel(List values, boolean zeroBased, boolean onlyIntegerTicksX, boolean onlyIntegerTicksY) {
return new OneDimChartPanel(new OneDimChartModel(values), zeroBased, onlyIntegerTicksX, onlyIntegerTicksY);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy