Example usage for javax.swing JDialog JDialog

List of usage examples for javax.swing JDialog JDialog

Introduction

In this page you can find the example usage for javax.swing JDialog JDialog.

Prototype

public JDialog() 

Source Link

Document

Creates a modeless dialog without a title and without a specified Frame owner.

Usage

From source file:com.net2plan.gui.utils.onlineSimulationPane.OnlineSimulationPane.java

/**
 * Shows the future event list.//from www.j a  v  a 2s.  c  o m
 *
 * @since 0.3.0
 */
public void viewFutureEventList() {
    final JDialog dialog = new JDialog();
    dialog.setTitle("Future event list");
    SwingUtils.configureCloseDialogOnEscape(dialog);
    dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    dialog.setSize(new Dimension(500, 300));
    dialog.setLocationRelativeTo(null);
    dialog.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
    dialog.setLayout(new MigLayout("fill, insets 0 0 0 0"));

    final String[] tableHeader = StringUtils.arrayOf("Id", "Time", "Priority", "Type", "To module",
            "Custom object");
    Object[][] data = new Object[1][tableHeader.length];

    DefaultTableModel model = new ClassAwareTableModel();
    model.setDataVector(new Object[1][tableHeader.length], tableHeader);

    JTable table = new AdvancedJTable(model);
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);
    table.setRowSorter(sorter);
    JScrollPane scrollPane = new JScrollPane(table);
    dialog.add(scrollPane, "grow");

    PriorityQueue<SimEvent> futureEventList = simKernel.getSimCore().getFutureEventList().getPendingEvents();
    if (!futureEventList.isEmpty()) {
        int numEvents = futureEventList.size();
        SimEvent[] futureEventList_array = futureEventList.toArray(new SimEvent[numEvents]);
        Arrays.sort(futureEventList_array, futureEventList.comparator());
        data = new Object[numEvents][tableHeader.length];

        for (int eventId = 0; eventId < numEvents; eventId++) {
            //            List<SimAction> actions = futureEventList_array[eventId].getEventActionList();
            Object customObject = futureEventList_array[eventId].getEventObject();
            data[eventId][0] = eventId;
            data[eventId][1] = StringUtils
                    .secondsToYearsDaysHoursMinutesSeconds(futureEventList_array[eventId].getEventTime());
            data[eventId][2] = futureEventList_array[eventId].getEventPriority();
            data[eventId][3] = futureEventList_array[eventId].getEventType();
            data[eventId][4] = futureEventList_array[eventId].getEventDestinationModule().toString();
            data[eventId][5] = customObject == null ? "none" : customObject;
        }
    }

    model.setDataVector(data, tableHeader);
    table.getTableHeader().addMouseListener(new ColumnFitAdapter());
    table.setDefaultRenderer(Double.class, new CellRenderers.NumberCellRenderer());

    dialog.setVisible(true);
}

From source file:es.mityc.firmaJava.libreria.pkcs7.ValidaTarjeta.java

/**
 * This method initializes jAgregarTarjetaDialog   
 *    // ww w .  ja v  a 2  s. c o  m
 * @return javax.swing.JDialog   
 */
private JDialog getJAgregarTarjetaDialog() {
    if (jAgregarTarjetaDialog == null) {
        jAgregarTarjetaDialog = new JDialog();
        jAgregarTarjetaDialog.setSize(new Dimension(527, 207));
        jAgregarTarjetaDialog.setModal(true);
        jAgregarTarjetaDialog.setResizable(false);
        jAgregarTarjetaDialog.setTitle(I18n.getResource(LIBRERIAXADES_VALIDARTARJETA_TEXTO_24));
        jAgregarTarjetaDialog.setLocationRelativeTo(this);
        jAgregarTarjetaDialog.setContentPane(getJContentPane());
    }
    return jAgregarTarjetaDialog;
}

From source file:ngat.opsgui.xcomp.SeeingPanel2.java

public void createSeeingDisplay() {
    // shtm.setRows();
    dlg = new JDialog();
    dlg.getContentPane().add(this);
    dlg.pack();//w ww .  jav a 2s  .co m
    dlg.setVisible(true);
}

From source file:Import.pnl_import_vcf.java

public void progressBar() {
    JProgressBar progressBar = new JProgressBar();
    TitledBorder border = BorderFactory.createTitledBorder("Importing...");
    progressBar.setBorder(border);//from   w  w  w . j  a va  2  s  .  c  o  m
    progressBar.setIndeterminate(true);
    JDialog dialog = new JDialog();
}

From source file:hpssim.grafica.HPSsim.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Lgc M
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    HPSsimWindow = new JFrame();
    hpssimWindow = new JPanel();
    hpssimTab = new JTabbedPane();
    panelConfiguration = new JPanel();
    label10 = new JLabel();
    label3 = new JLabel();
    ncpu = new JTextField();
    label4 = new JLabel();
    ngpu = new JTextField();
    vSpacer1 = new JPanel(null);
    label11 = new JLabel();
    label2 = new JLabel();
    sliderSimulationTime = new JSlider();
    textFieldSimTime = new JLabel();
    label1 = new JLabel();
    sliderJob = new JSlider();
    textFieldNjob = new JLabel();
    label9 = new JLabel();
    textFieldQVGA = new JTextField();
    label43 = new JLabel();
    tex_mediaexe = new JTextField();
    checkBoxEndJob = new JCheckBox();
    label6 = new JLabel();
    comboBoxScheduler = new JComboBox<>();
    label8 = new JLabel();
    textFieldTimeSlice = new JTextField();
    label7 = new JLabel();
    comboBoxQueue = new JComboBox<>();
    vSpacer2 = new JPanel(null);
    label21 = new JLabel();
    sliderclassRate = new JSlider();
    labelclassRate = new JLabel();
    label12 = new JLabel();
    sliderRTJob = new JSlider();
    labelRT = new JLabel();
    label14 = new JLabel();
    sliderOpenCl = new JSlider();
    labelOPENCL = new JLabel();
    checkBox_enableLog = new JCheckBox();
    panelPerformance = new JPanel();
    separator1 = new JSeparator();
    tabbedPane1 = new JTabbedPane();
    panelCPU = new JPanel();
    labelCPUUsage = new JLabel();
    panelCPUQueue = new JPanel();
    tabbedPane2 = new JTabbedPane();
    panelGPU = new JPanel();
    labelGPUUsage = new JLabel();
    panelGPUQueue = new JPanel();
    panel2 = new JPanel();
    label18 = new JLabel();
    virtualTime = new JTextField();
    label5 = new JLabel();
    processiNelSistema = new JTextField();
    label17 = new JLabel();
    processiElaborazione = new JTextField();
    label16 = new JLabel();
    processiInCoda = new JTextField();
    label15 = new JLabel();
    ldavg_1 = new JTextField();
    label19 = new JLabel();
    ldavg_5 = new JTextField();
    label20 = new JLabel();
    ldavg_15 = new JTextField();
    panel3 = new JPanel();
    progressBar = new JProgressBar();
    panelGraph = new JPanel();
    graphPanel = new JPanel();
    label23 = new JLabel();
    label38 = new JLabel();
    text_ClassRate = new JTextField();
    label24 = new JLabel();
    button_CostanteCodaSuMedia = new JButton();
    label39 = new JLabel();
    button_ClassRateCodaSuMedia = new JButton();
    label25 = new JLabel();
    button_CostanteTempoMedioArrivo = new JButton();
    hSpacer1 = new JPanel(null);
    label40 = new JLabel();
    button_ClassRateTempoMedioArrivo = new JButton();
    label26 = new JLabel();
    label41 = new JLabel();
    label27 = new JLabel();
    label42 = new JLabel();
    label28 = new JLabel();
    label33 = new JLabel();
    label29 = new JLabel();
    label30 = new JLabel();
    label31 = new JLabel();
    label32 = new JLabel();
    button_CrescenteCodaSuMedia = new JButton();
    label34 = new JLabel();
    button_BurstCodaSuMedia = new JButton();
    button_CrescenteCarico = new JButton();
    label35 = new JLabel();
    button_BurstTempoMedioArrivo = new JButton();
    label36 = new JLabel();
    label37 = new JLabel();
    label22 = new JLabel();
    title1 = compFactory.createTitle("HPSsim 2.0 ");
    button1 = new JButton();
    okButton = new JButton();
    button3 = new JButton();
    dialog1 = new JDialog();
    button2 = new JButton();
    label13 = new JLabel();
    erroreLabel = new JLabel();
    Grafici = new JFrame();
    panelGraficoFinestra = new JPanel();

    //======== HPSsimWindow ========
    {/* w w w .ja va2s. co m*/
        HPSsimWindow.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        HPSsimWindow.setResizable(false);
        Container HPSsimWindowContentPane = HPSsimWindow.getContentPane();

        //======== hpssimWindow ========
        {
            hpssimWindow.setForeground(Color.blue);

            // JFormDesigner evaluation mark
            hpssimWindow.setBorder(new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    hpssimWindow.getBorder()));
            hpssimWindow.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent e) {
                    if ("border".equals(e.getPropertyName()))
                        throw new RuntimeException();
                }
            });

            hpssimWindow.setLayout(null);

            //======== hpssimTab ========
            {

                //======== panelConfiguration ========
                {
                    panelConfiguration.setLayout(new TableLayout(
                            new double[][] { { 1, 70, 70, 70, 68, 70, 70, 74 }, { 0.01, 27, 21, 26, 27, 25, 25,
                                    25, 21, 21, TableLayout.PREFERRED, 12, TableLayout.PREFERRED, 22, 23 } }));
                    ((TableLayout) panelConfiguration.getLayout()).setHGap(5);
                    ((TableLayout) panelConfiguration.getLayout()).setVGap(5);

                    //---- label10 ----
                    label10.setText("Hardware");
                    label10.setFont(new Font("Segoe UI", Font.ITALIC, 16));
                    panelConfiguration.add(label10, new TableLayoutConstraints(1, 1, 7, 1,
                            TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- label3 ----
                    label3.setText("CPU");
                    label3.setFont(new Font("Segoe UI", Font.PLAIN, 12));
                    label3.setLabelFor(ncpu);
                    panelConfiguration.add(label3, new TableLayoutConstraints(1, 2, 1, 2,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- ncpu ----
                    ncpu.setText("4");
                    panelConfiguration.add(ncpu, new TableLayoutConstraints(2, 2, 3, 2,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label4 ----
                    label4.setText("GPU");
                    label4.setFont(new Font("Segoe UI", Font.PLAIN, 12));
                    label4.setLabelFor(ngpu);
                    panelConfiguration.add(label4, new TableLayoutConstraints(4, 2, 4, 2,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- ngpu ----
                    ngpu.setText("0");
                    panelConfiguration.add(ngpu, new TableLayoutConstraints(5, 2, 6, 2,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    panelConfiguration.add(vSpacer1, new TableLayoutConstraints(1, 3, 7, 3,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label11 ----
                    label11.setText("Simulation");
                    label11.setFont(new Font("Segoe UI", Font.ITALIC, 16));
                    panelConfiguration.add(label11, new TableLayoutConstraints(1, 4, 7, 4,
                            TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- label2 ----
                    label2.setText("Sim Time");
                    panelConfiguration.add(label2, new TableLayoutConstraints(1, 5, 1, 5,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- sliderSimulationTime ----
                    sliderSimulationTime.setValue(100000);
                    sliderSimulationTime.setMaximum(1200000);
                    sliderSimulationTime.addChangeListener(new ChangeListener() {
                        @Override
                        public void stateChanged(ChangeEvent e) {
                            sliderSimulationTimeStateChanged(e);
                        }
                    });
                    panelConfiguration.add(sliderSimulationTime, new TableLayoutConstraints(2, 5, 6, 5,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- textFieldSimTime ----
                    textFieldSimTime.setText("100000 ms");
                    panelConfiguration.add(textFieldSimTime, new TableLayoutConstraints(7, 5, 7, 5,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label1 ----
                    label1.setText("Numero di job");
                    panelConfiguration.add(label1, new TableLayoutConstraints(1, 6, 1, 6,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.CENTER));

                    //---- sliderJob ----
                    sliderJob.setMaximum(20000);
                    sliderJob.addChangeListener(new ChangeListener() {
                        @Override
                        public void stateChanged(ChangeEvent e) {
                            sliderJobStateChanged(e);
                        }
                    });
                    panelConfiguration.add(sliderJob, new TableLayoutConstraints(2, 6, 6, 6,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- textFieldNjob ----
                    textFieldNjob.setText("50");
                    panelConfiguration.add(textFieldNjob, new TableLayoutConstraints(7, 6, 7, 6,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label9 ----
                    label9.setText("Media arrivo");
                    panelConfiguration.add(label9, new TableLayoutConstraints(1, 7, 1, 7,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- textFieldQVGA ----
                    textFieldQVGA.setText("230");
                    panelConfiguration.add(textFieldQVGA, new TableLayoutConstraints(2, 7, 2, 7,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label43 ----
                    label43.setText("Media exe");
                    panelConfiguration.add(label43, new TableLayoutConstraints(3, 7, 3, 7,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- tex_mediaexe ----
                    tex_mediaexe.setText("1000");
                    panelConfiguration.add(tex_mediaexe, new TableLayoutConstraints(4, 7, 4, 7,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- checkBoxEndJob ----
                    checkBoxEndJob.setText("End Job");
                    panelConfiguration.add(checkBoxEndJob, new TableLayoutConstraints(6, 7, 6, 7,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label6 ----
                    label6.setText("Scheduler");
                    panelConfiguration.add(label6, new TableLayoutConstraints(1, 9, 1, 9,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- comboBoxScheduler ----
                    comboBoxScheduler.setModel(new DefaultComboBoxModel<>(
                            new String[] { "Priority Round Robin", "Completely Fair Scheduler" }));
                    comboBoxScheduler.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            comboBoxSchedulerActionPerformed(e);
                        }
                    });
                    panelConfiguration.add(comboBoxScheduler, new TableLayoutConstraints(2, 9, 5, 9,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label8 ----
                    label8.setText("Time Slice");
                    panelConfiguration.add(label8, new TableLayoutConstraints(6, 9, 6, 9,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- textFieldTimeSlice ----
                    textFieldTimeSlice.setText("210");
                    panelConfiguration.add(textFieldTimeSlice, new TableLayoutConstraints(7, 9, 7, 9,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label7 ----
                    label7.setText("Queue");
                    panelConfiguration.add(label7, new TableLayoutConstraints(1, 10, 1, 10,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- comboBoxQueue ----
                    comboBoxQueue.setModel(new DefaultComboBoxModel<>(new String[] { "FIFO",
                            "Highest Priority First", "Shortest Job First", "Round Robin", "Random Queue" }));
                    panelConfiguration.add(comboBoxQueue, new TableLayoutConstraints(2, 10, 5, 10,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    panelConfiguration.add(vSpacer2, new TableLayoutConstraints(1, 11, 7, 11,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label21 ----
                    label21.setText("Class Rate");
                    panelConfiguration.add(label21, new TableLayoutConstraints(1, 12, 1, 12,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- sliderclassRate ----
                    sliderclassRate.setValue(99);
                    sliderclassRate.addChangeListener(new ChangeListener() {
                        @Override
                        public void stateChanged(ChangeEvent e) {
                            sliderclassRateStateChanged(e);
                        }
                    });
                    panelConfiguration.add(sliderclassRate, new TableLayoutConstraints(2, 12, 4, 12,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- labelclassRate ----
                    labelclassRate.setText("99%");
                    panelConfiguration.add(labelclassRate, new TableLayoutConstraints(5, 12, 5, 12,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label12 ----
                    label12.setText("RT Job Prob");
                    panelConfiguration.add(label12, new TableLayoutConstraints(1, 13, 1, 13,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- sliderRTJob ----
                    sliderRTJob.setValue(45);
                    sliderRTJob.addChangeListener(new ChangeListener() {
                        @Override
                        public void stateChanged(ChangeEvent e) {
                            sliderRTJobStateChanged(e);
                        }
                    });
                    panelConfiguration.add(sliderRTJob, new TableLayoutConstraints(2, 13, 4, 13,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- labelRT ----
                    labelRT.setText("45%");
                    panelConfiguration.add(labelRT, new TableLayoutConstraints(5, 13, 5, 13,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- label14 ----
                    label14.setText("OpenCL Job ");
                    panelConfiguration.add(label14, new TableLayoutConstraints(1, 14, 1, 14,
                            TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- sliderOpenCl ----
                    sliderOpenCl.setValue(20);
                    sliderOpenCl.addChangeListener(new ChangeListener() {
                        @Override
                        public void stateChanged(ChangeEvent e) {
                            sliderOpenClStateChanged(e);
                        }
                    });
                    panelConfiguration.add(sliderOpenCl, new TableLayoutConstraints(2, 14, 4, 14,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- labelOPENCL ----
                    labelOPENCL.setText("20%");
                    panelConfiguration.add(labelOPENCL, new TableLayoutConstraints(5, 14, 5, 14,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- checkBox_enableLog ----
                    checkBox_enableLog.setText("log");
                    panelConfiguration.add(checkBox_enableLog, new TableLayoutConstraints(7, 14, 7, 14,
                            TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                }
                hpssimTab.addTab("Configuration", panelConfiguration);

                //======== panelPerformance ========
                {

                    //======== tabbedPane1 ========
                    {

                        //======== panelCPU ========
                        {
                            panelCPU.setLayout(new BorderLayout());

                            //---- labelCPUUsage ----
                            labelCPUUsage.setText("0\\0");
                            labelCPUUsage.setHorizontalAlignment(SwingConstants.CENTER);
                            panelCPU.add(labelCPUUsage, BorderLayout.SOUTH);
                        }
                        tabbedPane1.addTab("Usage", panelCPU);

                        //======== panelCPUQueue ========
                        {
                            panelCPUQueue.setLayout(new BorderLayout());
                        }
                        tabbedPane1.addTab("Queue", panelCPUQueue);

                    }

                    //======== tabbedPane2 ========
                    {

                        //======== panelGPU ========
                        {
                            panelGPU.setLayout(new BorderLayout());

                            //---- labelGPUUsage ----
                            labelGPUUsage.setText("0\\0");
                            labelGPUUsage.setHorizontalAlignment(SwingConstants.CENTER);
                            panelGPU.add(labelGPUUsage, BorderLayout.SOUTH);
                        }
                        tabbedPane2.addTab("Usage", panelGPU);

                        //======== panelGPUQueue ========
                        {
                            panelGPUQueue.setLayout(new BorderLayout());
                        }
                        tabbedPane2.addTab("Queue", panelGPUQueue);

                    }

                    //======== panel2 ========
                    {
                        panel2.setLayout(new TableLayout(new double[][] {
                                { TableLayout.PREFERRED, TableLayout.FILL },
                                { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED } }));

                        //---- label18 ----
                        label18.setText("Virtual Time");
                        panel2.add(label18, new TableLayoutConstraints(0, 0, 0, 0, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));
                        panel2.add(virtualTime, new TableLayoutConstraints(1, 0, 1, 0,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label5 ----
                        label5.setText("Processi nel sistema");
                        panel2.add(label5, new TableLayoutConstraints(0, 2, 0, 2, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));

                        //---- processiNelSistema ----
                        processiNelSistema.setText("0");
                        panel2.add(processiNelSistema, new TableLayoutConstraints(1, 2, 1, 2,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label17 ----
                        label17.setText("Processi in elaborazione");
                        panel2.add(label17, new TableLayoutConstraints(0, 3, 0, 3, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));

                        //---- processiElaborazione ----
                        processiElaborazione.setText("0");
                        panel2.add(processiElaborazione, new TableLayoutConstraints(1, 3, 1, 3,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label16 ----
                        label16.setText("Processi in coda");
                        panel2.add(label16, new TableLayoutConstraints(0, 4, 0, 4, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));

                        //---- processiInCoda ----
                        processiInCoda.setText("0");
                        panel2.add(processiInCoda, new TableLayoutConstraints(1, 4, 1, 4,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label15 ----
                        label15.setText("ldavg_1");
                        panel2.add(label15, new TableLayoutConstraints(0, 5, 0, 5, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));
                        panel2.add(ldavg_1, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.FULL,
                                TableLayoutConstraints.FULL));

                        //---- label19 ----
                        label19.setText("ldavg_5");
                        panel2.add(label19, new TableLayoutConstraints(0, 6, 0, 6, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));
                        panel2.add(ldavg_5, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.FULL,
                                TableLayoutConstraints.FULL));

                        //---- label20 ----
                        label20.setText("ldavg_15");
                        panel2.add(label20, new TableLayoutConstraints(0, 7, 0, 7, TableLayoutConstraints.RIGHT,
                                TableLayoutConstraints.FULL));
                        panel2.add(ldavg_15, new TableLayoutConstraints(1, 7, 1, 7, TableLayoutConstraints.FULL,
                                TableLayoutConstraints.FULL));
                    }

                    //======== panel3 ========
                    {
                        panel3.setLayout(new TableLayout(new double[][] {
                                { TableLayout.PREFERRED, TableLayout.PREFERRED },
                                { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } }));
                    }

                    GroupLayout panelPerformanceLayout = new GroupLayout(panelPerformance);
                    panelPerformance.setLayout(panelPerformanceLayout);
                    panelPerformanceLayout.setHorizontalGroup(panelPerformanceLayout.createParallelGroup()
                            .addGroup(panelPerformanceLayout.createSequentialGroup().addContainerGap()
                                    .addGroup(panelPerformanceLayout.createParallelGroup()
                                            .addComponent(separator1)
                                            .addGroup(panelPerformanceLayout.createSequentialGroup()
                                                    .addGroup(panelPerformanceLayout.createParallelGroup()
                                                            .addGroup(panelPerformanceLayout
                                                                    .createSequentialGroup()
                                                                    .addComponent(panel2,
                                                                            GroupLayout.PREFERRED_SIZE, 256,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addPreferredGap(
                                                                            LayoutStyle.ComponentPlacement.UNRELATED)
                                                                    .addGroup(panelPerformanceLayout
                                                                            .createParallelGroup()
                                                                            .addComponent(progressBar,
                                                                                    GroupLayout.DEFAULT_SIZE,
                                                                                    GroupLayout.DEFAULT_SIZE,
                                                                                    Short.MAX_VALUE)
                                                                            .addGroup(panelPerformanceLayout
                                                                                    .createSequentialGroup()
                                                                                    .addComponent(panel3,
                                                                                            GroupLayout.PREFERRED_SIZE,
                                                                                            256,
                                                                                            GroupLayout.PREFERRED_SIZE)
                                                                                    .addGap(0, 0,
                                                                                            Short.MAX_VALUE))))
                                                            .addGroup(panelPerformanceLayout
                                                                    .createSequentialGroup()
                                                                    .addComponent(tabbedPane1,
                                                                            GroupLayout.PREFERRED_SIZE, 261,
                                                                            GroupLayout.PREFERRED_SIZE)
                                                                    .addPreferredGap(
                                                                            LayoutStyle.ComponentPlacement.UNRELATED)
                                                                    .addComponent(tabbedPane2,
                                                                            GroupLayout.PREFERRED_SIZE, 261,
                                                                            GroupLayout.PREFERRED_SIZE)))
                                                    .addContainerGap(8, Short.MAX_VALUE)))));
                    panelPerformanceLayout.setVerticalGroup(panelPerformanceLayout.createParallelGroup()
                            .addGroup(panelPerformanceLayout.createSequentialGroup()
                                    .addContainerGap(15, Short.MAX_VALUE)
                                    .addGroup(panelPerformanceLayout.createParallelGroup()
                                            .addComponent(tabbedPane2, GroupLayout.DEFAULT_SIZE, 218,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(tabbedPane1, GroupLayout.PREFERRED_SIZE, 218,
                                                    GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(separator1, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 10,
                                            Short.MAX_VALUE)
                                    .addGroup(panelPerformanceLayout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(panel2, GroupLayout.PREFERRED_SIZE, 155,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGroup(panelPerformanceLayout.createSequentialGroup()
                                                    .addComponent(progressBar, GroupLayout.DEFAULT_SIZE,
                                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                    .addGap(18, 18, 18).addComponent(panel3,
                                                            GroupLayout.PREFERRED_SIZE, 119,
                                                            GroupLayout.PREFERRED_SIZE)))
                                    .addContainerGap()));
                }
                hpssimTab.addTab("Performance", panelPerformance);

                //======== panelGraph ========
                {

                    //======== graphPanel ========
                    {
                        graphPanel.setLayout(new TableLayout(new double[][] {
                                { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED },
                                { 27, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, 25, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                                        TableLayout.PREFERRED, TableLayout.PREFERRED } }));

                        //---- label23 ----
                        label23.setText("Carico costante");
                        label23.setFont(label23.getFont().deriveFont(Font.BOLD | Font.ITALIC));
                        graphPanel.add(label23, new TableLayoutConstraints(0, 0, 1, 0,
                                TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                        //---- label38 ----
                        label38.setText("Classification Rate");
                        label38.setFont(label38.getFont().deriveFont(Font.BOLD | Font.ITALIC));
                        graphPanel.add(label38, new TableLayoutConstraints(5, 0, 6, 0,
                                TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));
                        graphPanel.add(text_ClassRate, new TableLayoutConstraints(7, 0, 7, 0,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label24 ----
                        label24.setText("Coda\\Media");
                        graphPanel.add(label24, new TableLayoutConstraints(0, 1, 0, 1,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_CostanteCodaSuMedia ----
                        button_CostanteCodaSuMedia.setText("Esegui");
                        button_CostanteCodaSuMedia.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_CostanteCodaSuMediaActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_CostanteCodaSuMedia, new TableLayoutConstraints(2, 1, 2, 1,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label39 ----
                        label39.setText("Coda\\Media");
                        graphPanel.add(label39, new TableLayoutConstraints(5, 1, 5, 1,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_ClassRateCodaSuMedia ----
                        button_ClassRateCodaSuMedia.setText("Esegui");
                        button_ClassRateCodaSuMedia.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_ClassRateCodaSuMediaActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_ClassRateCodaSuMedia, new TableLayoutConstraints(7, 1, 7, 1,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label25 ----
                        label25.setText("Tempo Medio Arrivo");
                        graphPanel.add(label25, new TableLayoutConstraints(0, 2, 0, 2,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_CostanteTempoMedioArrivo ----
                        button_CostanteTempoMedioArrivo.setText("Esegui");
                        button_CostanteTempoMedioArrivo.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_CostanteTempoMedioArrivoActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_CostanteTempoMedioArrivo, new TableLayoutConstraints(2, 2, 2, 4,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                        graphPanel.add(hSpacer1, new TableLayoutConstraints(3, 0, 3, 15,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label40 ----
                        label40.setText("Tempo Medio Arrivo");
                        graphPanel.add(label40, new TableLayoutConstraints(5, 2, 5, 2,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_ClassRateTempoMedioArrivo ----
                        button_ClassRateTempoMedioArrivo.setText("Esegui");
                        button_ClassRateTempoMedioArrivo.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_ClassRateTempoMedioArrivoActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_ClassRateTempoMedioArrivo, new TableLayoutConstraints(7, 2, 7, 4,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label26 ----
                        label26.setText("Troughput");
                        graphPanel.add(label26, new TableLayoutConstraints(0, 3, 0, 3,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label41 ----
                        label41.setText("Troughput");
                        graphPanel.add(label41, new TableLayoutConstraints(5, 3, 5, 3,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label27 ----
                        label27.setText("Carico");
                        graphPanel.add(label27, new TableLayoutConstraints(0, 4, 0, 4,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label42 ----
                        label42.setText("Carico");
                        graphPanel.add(label42, new TableLayoutConstraints(5, 4, 5, 4,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label28 ----
                        label28.setText("Carico Crescente");
                        label28.setFont(label28.getFont().deriveFont(Font.BOLD | Font.ITALIC));
                        graphPanel.add(label28, new TableLayoutConstraints(0, 5, 1, 5,
                                TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                        //---- label33 ----
                        label33.setText("Carico Burst");
                        label33.setFont(label33.getFont().deriveFont(Font.BOLD | Font.ITALIC));
                        graphPanel.add(label33, new TableLayoutConstraints(5, 5, 6, 5,
                                TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                        //---- label29 ----
                        label29.setText("Coda\\Media");
                        graphPanel.add(label29, new TableLayoutConstraints(0, 6, 0, 6,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label30 ----
                        label30.setText("Tempo Medio Arrivo");
                        graphPanel.add(label30, new TableLayoutConstraints(0, 7, 0, 7,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label31 ----
                        label31.setText("Troughput");
                        graphPanel.add(label31, new TableLayoutConstraints(0, 8, 0, 8,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label32 ----
                        label32.setText("Carico");
                        graphPanel.add(label32, new TableLayoutConstraints(0, 9, 0, 9,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_CrescenteCodaSuMedia ----
                        button_CrescenteCodaSuMedia.setText("Esegui");
                        button_CrescenteCodaSuMedia.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_CrescenteCodaSuMediaActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_CrescenteCodaSuMedia, new TableLayoutConstraints(2, 6, 2, 6,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label34 ----
                        label34.setText("Coda\\Media");
                        graphPanel.add(label34, new TableLayoutConstraints(5, 6, 5, 6,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_BurstCodaSuMedia ----
                        button_BurstCodaSuMedia.setText("Esegui");
                        button_BurstCodaSuMedia.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_BurstCodaSuMediaActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_BurstCodaSuMedia, new TableLayoutConstraints(7, 6, 7, 6,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_CrescenteCarico ----
                        button_CrescenteCarico.setText("Esegui");
                        button_CrescenteCarico.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_CrescenteCaricoActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_CrescenteCarico, new TableLayoutConstraints(2, 7, 2, 9,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label35 ----
                        label35.setText("Tempo Medio Arrivo");
                        graphPanel.add(label35, new TableLayoutConstraints(5, 7, 5, 7,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- button_BurstTempoMedioArrivo ----
                        button_BurstTempoMedioArrivo.setText("Esegui");
                        button_BurstTempoMedioArrivo.addActionListener(new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent e) {
                                button_BurstTempoMedioArrivoActionPerformed(e);
                            }
                        });
                        graphPanel.add(button_BurstTempoMedioArrivo, new TableLayoutConstraints(7, 7, 7, 9,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label36 ----
                        label36.setText("Troughput");
                        graphPanel.add(label36, new TableLayoutConstraints(5, 8, 5, 8,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- label37 ----
                        label37.setText("Carico");
                        graphPanel.add(label37, new TableLayoutConstraints(5, 9, 5, 9,
                                TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    }

                    //---- label22 ----
                    label22.setText("Grafici");
                    label22.setFont(label22.getFont().deriveFont(label22.getFont().getStyle() | Font.BOLD,
                            label22.getFont().getSize() + 4f));

                    GroupLayout panelGraphLayout = new GroupLayout(panelGraph);
                    panelGraph.setLayout(panelGraphLayout);
                    panelGraphLayout.setHorizontalGroup(panelGraphLayout.createParallelGroup()
                            .addGroup(panelGraphLayout.createSequentialGroup().addGroup(panelGraphLayout
                                    .createParallelGroup()
                                    .addGroup(panelGraphLayout.createSequentialGroup().addGap(243, 243, 243)
                                            .addComponent(label22).addGap(0, 246, Short.MAX_VALUE))
                                    .addGroup(GroupLayout.Alignment.TRAILING,
                                            panelGraphLayout.createSequentialGroup().addContainerGap()
                                                    .addComponent(graphPanel, GroupLayout.DEFAULT_SIZE, 530,
                                                            Short.MAX_VALUE)))
                                    .addContainerGap()));
                    panelGraphLayout.setVerticalGroup(panelGraphLayout.createParallelGroup().addGroup(
                            GroupLayout.Alignment.TRAILING,
                            panelGraphLayout.createSequentialGroup().addContainerGap().addComponent(label22)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(graphPanel, GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)
                                    .addContainerGap()));
                }
                hpssimTab.addTab("Graph", panelGraph);

            }
            hpssimWindow.add(hpssimTab);
            hpssimTab.setBounds(10, 40, 555, 450);

            //---- title1 ----
            title1.setFont(title1.getFont().deriveFont(title1.getFont().getSize() + 8f));
            hpssimWindow.add(title1);
            title1.setBounds(10, 11, 132, title1.getPreferredSize().height);

            //---- button1 ----
            button1.setText("Stop");
            button1.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    button1ActionPerformed(e);
                }
            });
            hpssimWindow.add(button1);
            button1.setBounds(385, 495, 74, button1.getPreferredSize().height);

            //---- okButton ----
            okButton.setText("Start");
            okButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    okButtonActionPerformed(e);
                }
            });
            hpssimWindow.add(okButton);
            okButton.setBounds(470, 495, 74, okButton.getPreferredSize().height);

            //---- button3 ----
            button3.setText("Resume");
            button3.setVisible(false);
            button3.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    pauseActionPerformed(e);
                }
            });
            hpssimWindow.add(button3);
            button3.setBounds(300, 495, 74, button3.getPreferredSize().height);

            { // compute preferred size
                Dimension preferredSize = new Dimension();
                for (int i = 0; i < hpssimWindow.getComponentCount(); i++) {
                    Rectangle bounds = hpssimWindow.getComponent(i).getBounds();
                    preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                    preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                }
                Insets insets = hpssimWindow.getInsets();
                preferredSize.width += insets.right;
                preferredSize.height += insets.bottom;
                hpssimWindow.setMinimumSize(preferredSize);
                hpssimWindow.setPreferredSize(preferredSize);
            }
        }

        GroupLayout HPSsimWindowContentPaneLayout = new GroupLayout(HPSsimWindowContentPane);
        HPSsimWindowContentPane.setLayout(HPSsimWindowContentPaneLayout);
        HPSsimWindowContentPaneLayout.setHorizontalGroup(HPSsimWindowContentPaneLayout.createParallelGroup()
                .addGroup(HPSsimWindowContentPaneLayout.createSequentialGroup()
                        .addComponent(hpssimWindow, GroupLayout.PREFERRED_SIZE, 565, GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 4, Short.MAX_VALUE)));
        HPSsimWindowContentPaneLayout.setVerticalGroup(HPSsimWindowContentPaneLayout.createParallelGroup()
                .addGroup(HPSsimWindowContentPaneLayout.createSequentialGroup()
                        .addComponent(hpssimWindow, GroupLayout.PREFERRED_SIZE, 528, GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 1, Short.MAX_VALUE)));
        HPSsimWindow.pack();
        HPSsimWindow.setLocationRelativeTo(HPSsimWindow.getOwner());
    }

    //======== dialog1 ========
    {
        dialog1.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        Container dialog1ContentPane = dialog1.getContentPane();

        //---- button2 ----
        button2.setText("ok");
        button2.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                button2ActionPerformed(e);
            }
        });

        //---- label13 ----
        label13.setText("Attenzione!");

        GroupLayout dialog1ContentPaneLayout = new GroupLayout(dialog1ContentPane);
        dialog1ContentPane.setLayout(dialog1ContentPaneLayout);
        dialog1ContentPaneLayout.setHorizontalGroup(dialog1ContentPaneLayout.createParallelGroup()
                .addGroup(dialog1ContentPaneLayout.createSequentialGroup().addContainerGap()
                        .addGroup(dialog1ContentPaneLayout.createParallelGroup()
                                .addComponent(label13, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE,
                                        324, Short.MAX_VALUE)
                                .addGroup(GroupLayout.Alignment.TRAILING,
                                        dialog1ContentPaneLayout.createSequentialGroup()
                                                .addGap(0, 281, Short.MAX_VALUE).addComponent(button2))
                                .addComponent(erroreLabel, GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE))
                        .addContainerGap()));
        dialog1ContentPaneLayout.setVerticalGroup(dialog1ContentPaneLayout.createParallelGroup().addGroup(
                GroupLayout.Alignment.TRAILING,
                dialog1ContentPaneLayout.createSequentialGroup().addContainerGap()
                        .addComponent(label13, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                        .addComponent(erroreLabel, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(button2)
                        .addContainerGap()));
        dialog1.pack();
        dialog1.setLocationRelativeTo(dialog1.getOwner());
    }

    //======== Grafici ========
    {
        Container GraficiContentPane = Grafici.getContentPane();

        //======== panelGraficoFinestra ========
        {

            // JFormDesigner evaluation mark
            panelGraficoFinestra.setBorder(new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    panelGraficoFinestra.getBorder()));
            panelGraficoFinestra.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
                public void propertyChange(java.beans.PropertyChangeEvent e) {
                    if ("border".equals(e.getPropertyName()))
                        throw new RuntimeException();
                }
            });

            panelGraficoFinestra.setLayout(new BorderLayout());
        }

        GroupLayout GraficiContentPaneLayout = new GroupLayout(GraficiContentPane);
        GraficiContentPane.setLayout(GraficiContentPaneLayout);
        GraficiContentPaneLayout.setHorizontalGroup(GraficiContentPaneLayout.createParallelGroup()
                .addGroup(GraficiContentPaneLayout.createSequentialGroup().addContainerGap()
                        .addComponent(panelGraficoFinestra, GroupLayout.DEFAULT_SIZE, 519, Short.MAX_VALUE)
                        .addContainerGap()));
        GraficiContentPaneLayout.setVerticalGroup(GraficiContentPaneLayout.createParallelGroup()
                .addGroup(GraficiContentPaneLayout.createSequentialGroup().addContainerGap()
                        .addComponent(panelGraficoFinestra, GroupLayout.DEFAULT_SIZE, 457, Short.MAX_VALUE)
                        .addContainerGap()));
        Grafici.pack();
        Grafici.setLocationRelativeTo(Grafici.getOwner());
    }
    // //GEN-END:initComponents
}

From source file:org.moeaframework.analysis.plot.Plot.java

/**
 * Displays the chart in a blocking JDialog.
 * /*from  ww w . ja  v  a2  s.c  om*/
 * @param width the width of the chart
 * @param height the height of the chart
 * @return the window that was created
 */
public JDialog showDialog(int width, int height) {
    JDialog frame = new JDialog();

    frame.getContentPane().setLayout(new BorderLayout());
    frame.getContentPane().add(getChartPanel(), BorderLayout.CENTER);

    frame.setPreferredSize(new Dimension(width, height));
    frame.pack();

    frame.setLocationRelativeTo(null);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setTitle("MOEA Framework Plot");
    frame.setModalityType(ModalityType.APPLICATION_MODAL);
    frame.setVisible(true);

    return frame;
}

From source file:org.fhcrc.cpl.viewer.amt.AmtDatabaseMatcher.java

/**
 * Separating this out so the interesting code flows better
 * @param matchingResult// ww w  .j  av a2 s.  c om
 */
public void createMassTimeErrorPlots(FeatureSetMatcher.FeatureMatchingResult matchingResult) {

    int numUnambiguousMatches = 0;
    for (Feature ms1Feature : matchingResult.getMasterSetFeatures()) {
        if (matchingResult.get(ms1Feature).size() == 1)
            numUnambiguousMatches++;
    }
    double[] ms1FeatureMasses = new double[numUnambiguousMatches];
    double[] ms1FeatureHydrophobicities = new double[numUnambiguousMatches];
    double[] massErrorData = new double[numUnambiguousMatches];
    double[] elutionErrorData = new double[numUnambiguousMatches];
    int i = 0;
    for (Feature ms1Feature : matchingResult.getMasterSetFeatures()) {
        ms1FeatureMasses[i] = ms1Feature.getMass();
        ms1FeatureHydrophobicities[i] = AmtExtraInfoDef.getObservedHydrophobicity(ms1Feature);

        if (matchingResult.get(ms1Feature).size() > 1)
            continue;

        Feature matchedAmtFeature = matchingResult.get(ms1Feature).get(0);
        //convert to ppm
        massErrorData[i] = (ms1Feature.getMass() - matchedAmtFeature.getMass())
                * (1000000 / ms1Feature.getMass());
        //System.err.println("Error: " + histogramData[i-1] + ", " +ms1Feature.getMass() + ", " + result.get(ms1Feature).get(0).getMass());

        elutionErrorData[i] = (AmtExtraInfoDef.getObservedHydrophobicity(ms1Feature)
                - (AmtExtraInfoDef.getObservedHydrophobicity(matchedAmtFeature)));
        i++;
    }

    //3D mass-elution histogram
    JDialog perspDialog = new JDialog();
    perspDialog.setSize(1000, 800);
    massTimeErrorPerspectivePlot = new PanelWithRPerspectivePlot();
    massTimeErrorPerspectivePlot.setChartHeight(800);
    massTimeErrorPerspectivePlot.setChartWidth(1000);

    massTimeErrorPerspectivePlot.setSize(1000, 800);
    massTimeErrorPerspectivePlot.setTiltAngle(25);
    massTimeErrorPerspectivePlot.setRotationAngle(-30);
    massTimeErrorPerspectivePlot.setAxisRVariableNames("Hydrophobicity", "Mass_ppm", "Matches");
    double xBinSize = .002;
    double yBinSize = 1;
    massTimeErrorPerspectivePlot.plotPointsSummary(elutionErrorData, massErrorData, xBinSize, yBinSize);
    perspDialog.add(massTimeErrorPerspectivePlot);
    perspDialog.setVisible(true);

    //scatterplot of mass vs. deltaMass
    ScatterPlotDialog spd = new ScatterPlotDialog(ms1FeatureMasses, massErrorData,
            "MS1 feature mass vs. (signed) match mass error");
    spd.setAxisLabels("MS1 Feature Mass", "PPM error (MS1 - AMT)");
    massDeltaMassScatterPlot = spd.getPanelWithScatterPlot().getChart();
    spd.setVisible(true);

    //scatterplot of hydrophobicity error vs. mass error
    ScatterPlotDialog spdHandM = new ScatterPlotDialog(elutionErrorData, massErrorData,
            "MS1 feature mass error vs. H error");
    spdHandM.setAxisLabels("H error", "PPM error");
    spdHandM.setVisible(true);
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes addAttributeDialog
 * //from   ww w .  ja  va2 s.  c om
 * @return javax.swing.JDialog
 */
private JDialog getAddAttributeDialog() {
    if (addAttributeDialog == null) {
        addAttributeDialog = new JDialog();
        addAttributeDialog.setSize(350, 300);
        addAttributeDialog.setTitle("Add Attributes");
        addAttributeDialog.setContentPane(getAddAttributeContentPane());
    }
    return addAttributeDialog;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes openUrlDialog   
 *    /*from ww w  . ja va 2s.  c  o  m*/
 * @return javax.swing.JDialog   
 */
private JDialog getOpenUrlDialog() {
    if (openUrlDialog == null) {
        openUrlDialog = new JDialog();
        openUrlDialog.setContentPane(getOpenUrlContentPane());
        openUrlDialog.setSize(425, 125);
    }
    openUrlStatusLabel.setText("Enter the URL of the configuration file:");
    openUrlTextField.setText("http://");
    return openUrlDialog;
}

From source file:self.philbrown.javaQuery.$.java

/**
 * Show an alert//from  w  ww  .  j a v a  2 s.  c o  m
 * @param context used to display the alert window
 * @param title the title of the alert window. Use {@code null} to show no title
 * @param text the alert message
 * @see #alert(String)
 */
public static void alert(String title, String text) {
    JDialog alert = new JDialog();
    if (title != null)
        alert.setTitle(title);
    if (text != null)
        alert.add(new JLabel(text, JLabel.CENTER));
    alert.setVisible(true);
}