/*
 * PlotWindow.java
 *
 * Created on 1. März 2005, 15:33
 */

package org.rosuda.JClaR;

import javax.swing.ImageIcon;
import java.awt.image.BufferedImage;

/**
 *
 * @author  tobias
 */
public final class PlotWindow extends javax.swing.JFrame {
    
    private int svmNumber;
    private ImageIcon thumbnail;
    private BufferedImage image;
    private String fixedVariablesDescription;
    
    /** Creates new form PlotWindow */
    private PlotWindow(final BufferedImage bi, final int svmNumber) {
        initComponents();
        
        image = bi;
        
        jLabel1.setIcon(new ImageIcon(image));
        setSize(480,480);
        setTitle("Plot of SVM #" + svmNumber);
        
        thumbnail = new ImageIcon(image.getScaledInstance(100,100, java.awt.Image.SCALE_SMOOTH));
        this.svmNumber = svmNumber;
    }
    
    private int getSvmNumber(){
        return svmNumber;
    }
    
    private ImageIcon getThumbnail(){
        return thumbnail;
    }
    
    private BufferedImage getImage(){
        return image;
    }
    
    private void setFixedVariablesDescription(final String fixedVariablesDescription){
        this.fixedVariablesDescription = fixedVariablesDescription;
    }
    
    private String getFixedVariablesDescription(){
        return fixedVariablesDescription;
    }
    
    /** 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.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);

        pack();
    }//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

    private static final int LABEL_NO=0;
    private static final int LABEL_REGRESSION=1;
    
}
