⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 populationmixpanel.java

📁 一个用于排队系统仿真的开源软件,有非常形象的图象仿真过程!
💻 JAVA
字号:
/**
 * Copyright (C) 2006, Laboratorio di Valutazione delle Prestazioni - Politecnico di Milano

 * 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 2 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, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package jmt.gui.common.panels.parametric;

import jmt.gui.common.definitions.parametric.PopulationMixParametricAnalysis;
import jmt.gui.common.definitions.parametric.ParametricAnalysis;
import jmt.gui.common.definitions.ClassDefinition;
import jmt.gui.common.definitions.StationDefinition;
import jmt.gui.common.definitions.SimulationDefinition;

import javax.swing.*;
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;
import javax.swing.border.TitledBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.border.EtchedBorder;
import java.awt.*;
import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
import java.util.Vector;

/**
 * <p>Title: PopulationMixPanel</p>
 * <p>Description: this is the panel for the parametric analysis where
 * the proportion between two closed classes is modified while global
 * number of jobs is kept constant.</p>
 *
 * @author Francesco D'Aquino
 *         Date: 9-mar-2006
 *         Time: 16.18.40
 */
public class PopulationMixPanel extends ParameterOptionPanel {
    private JLabel fromLabel;
    private JSpinner from;
    private JLabel toLabel;
    private JSpinner to;
    private JLabel stepsLabel;
    private JSpinner steps;
    private JLabel classChooserLabel;
    private JComboBox classChooser;
    private JScrollPane scroll;
    private JTextArea description;
    private JScrollPane descrPane;
    private TitledBorder descriptionTitle;
    private PopulationMixParametricAnalysis PMPA;


    public PopulationMixPanel(PopulationMixParametricAnalysis pmpa, ClassDefinition classDef, StationDefinition stationDef, SimulationDefinition simDef) {
        super();
        PMPA = pmpa;
        super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
        super.setDividerSize(3);
        DESCRIPTION ="This type of analysis is available for closed models with two classes only.\n\n" +
                "Repeat the simulation changing the proportion of jobs " +
                "between the two closed classes, keeping constant the total number of jobs.\n\n" +
                "The 'From' and 'To' values represent the initial and final values of " +
                "population mix (遡 = Ni / N) for the chosen class.\n\n" +
                "Since only integer values are allowed " +
                "the number of steps that can be practically executed may be very small.";

        sd = stationDef;
        cd = classDef;
        simd = simDef;
        initialize();
    }

    public void initialize() {
        JPanel edit = new JPanel(new GridLayout(4,1,0,5));
        fromLabel = new JLabel("Initial 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -