Skip to content
Snippets Groups Projects
Commit ffc45e50 authored by Carlos Lopez-Camey's avatar Carlos Lopez-Camey
Browse files

Add type parameter to XChartPanel

parent 31bea2a4
Branches
No related tags found
No related merge requests found
......@@ -52,9 +52,9 @@ import org.knowm.xchart.internal.chartpart.Chart;
*
* @author timmolter
*/
public class XChartPanel extends JPanel {
public class XChartPanel<T extends Chart> extends JPanel {
private final Chart chart;
private final T chart;
private final Dimension preferredSize;
private String saveAsString = "Save As...";
......@@ -63,7 +63,7 @@ public class XChartPanel extends JPanel {
*
* @param chart
*/
public XChartPanel(final Chart chart) {
public XChartPanel(final T chart) {
this.chart = chart;
preferredSize = new Dimension(chart.getWidth(), chart.getHeight());
......@@ -97,7 +97,7 @@ public class XChartPanel extends JPanel {
g2d.dispose();
}
public Chart getChart() {
public T getChart() {
return this.chart;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment