/* * Copyright (C) 2013 Serdar * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package de.fub.maps.project.detector.model.statistics; import javax.swing.JLabel; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; import org.jfree.data.statistics.HistogramDataset; /** * * @author Serdar */ public class HistogramChartContainer extends javax.swing.JPanel { private static final long serialVersionUID = 1L; /** * Creates new form HistogramChartContainer */ public HistogramChartContainer() { initComponents(); } public HistogramDataset getDataSet() { return histogramPanel1.getDataSet(); } public JFreeChart getHistogramChart() { return histogramPanel1.getHistogramChart(); } public XYPlot getPlot() { return histogramPanel1.getPlot(); } public ChartPanel getChartPanel() { return histogramPanel1.getChartPanel(); } public ValueAxis getDomainAxis() { return histogramPanel1.getDomainAxis(); } public ValueAxis getRangeAxis() { return histogramPanel1.getRangeAxis(); } public JLabel getTitleLabel() { return titleLabel; } public void setTitle(String title) { getTitleLabel().setText(title); } public String getTitle() { return getTitleLabel().getText(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); histogramPanel1 = new de.fub.maps.project.detector.model.statistics.HistogramPanel(); jPanel2 = new javax.swing.JPanel(); titleLabel = new javax.swing.JLabel(); setBackground(new java.awt.Color(255, 216, 178)); setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); setLayout(new java.awt.BorderLayout()); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setLayout(new java.awt.BorderLayout()); jPanel1.add(histogramPanel1, java.awt.BorderLayout.CENTER); add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(235, 195, 157))); jPanel2.setOpaque(false); jPanel2.setPreferredSize(new java.awt.Dimension(400, 24)); jPanel2.setLayout(new java.awt.BorderLayout()); titleLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(HistogramChartContainer.class, "HistogramChartContainer.titleLabel.text")); // NOI18N jPanel2.add(titleLabel, java.awt.BorderLayout.CENTER); add(jPanel2, java.awt.BorderLayout.NORTH); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private de.fub.maps.project.detector.model.statistics.HistogramPanel histogramPanel1; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JLabel titleLabel; // End of variables declaration//GEN-END:variables }