SimulatedIVPump2(Spawner spawn, InitialJFrame app)
	{
		super("Gamma Infusion Pump");
		title = new JLabel("   Gamma Infusion Pump");
		title.setFont(new Font("Arial", Font.PLAIN, 32));
		title.setForeground(Color.WHITE);
		title.setBackground(Color.BLACK);
		setSize(defaultWidth, defaultHeight);
		getContentPane().setBackground(Color.BLACK);
		setLayout(new GridLayout(7, 1));
		
		Standby = new JButton("STANDBY");
		Standby.setBackground(green);
		Standby.setFocusPainted(false);
		Standby.addActionListener(this);
		
		Active = new JButton("INTERLOCK");
		Active.setBackground(regular);
		Active.setFocusPainted(false);
		Active.addActionListener(this);
		
		Manual = new JButton("MANUAL");
		Manual.setBackground(regular);
		Manual.setFocusPainted(false);
		Manual.addActionListener(this);
		
		Q4 = new JButton("Q4 - NOT ASSOCIATED (Click to Associate)");
		Q4.setBackground(regular);
		Q4.setFocusPainted(false);
		Q4AssociationStatus.Q = false;
		Q4.addActionListener(this);
		
		Q5 = new JButton("Q5 - NOT ASSOCIATED (Click to Associate)");
		Q5.setBackground(regular);
		Q5.setFocusPainted(false);
		Q5AssociationStatus.Q = false;
		Q5.addActionListener(this);
		
		MStart = new JButton("X");
		MStop = new JButton("X");
		MStart.setBackground(Color.GRAY);
		MStop.setBackground(Color.GRAY);
		MStart.setFocusPainted(false);
		MStop.setFocusPainted(false);
		MStart.addActionListener(this);
		MStop.addActionListener(this);
		
		JPanel manualContainer = new JPanel();
		manualContainer.setLayout(new GridLayout(1, 3));
		manualContainer.setBackground(Color.BLACK);
		manualContainer.add(Manual);
		manualContainer.add(MStart);
		manualContainer.add(MStop);
		
		ModeStatus = PumpMode.STANDBY;
		stop = true;
		stopped = false;
		modeLock = false;
		
		pumpNotice = new JLabel(ModeStatus.toString() + " Mode - " + (stop == true ? "PCA Off" : "PCA On"));
		pumpNotice.setFont(new Font("Arial", Font.PLAIN, (int)(15)));
		pumpNotice.setForeground(Color.YELLOW);
		pumpNotice.setBackground(Color.BLACK);

		JPanel pumpNoticeContainer = new JPanel();
		pumpNoticeContainer.setLayout(new BoxLayout(pumpNoticeContainer, BoxLayout.X_AXIS));
		pumpNoticeContainer.setBackground(Color.BLACK);
		pumpNoticeContainer.add(Box.createHorizontalGlue());
		pumpNoticeContainer.add(pumpNotice);
		pumpNoticeContainer.add(Box.createHorizontalGlue());
		
		add(title);
		add(Q4);
		add(Q5);
		add(Active);
		add(Standby);
		add(manualContainer);
		add(pumpNoticeContainer);
		
		warningType = WarningType.NULL;
		requestedMode = IVMode.NULL;
		requestedDisassociation = Disassociation.NULL;
		
		application = app;
		spawner = spawn;
		spawned = false;
		
		setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
		WindowAdapter exitListener = new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                int confirm = JOptionPane.showOptionDialog(null, "Are You Sure You Want To Close Simulated IV Pump?", "Exit Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
                if (confirm == 0) {
                   generator.interrupt();
                   spawner.infusionPumpClosed();
                   if (application.isQ4Associated().equals(true))
                	   application.toggleQ4();
                   if (application.isQ5Associated().equals(true))
                	   application.toggleQ5();
                   dispose();
                }
            }
        };
        addWindowListener(exitListener);
	}