All Downloads are FREE. Search and download functionalities are using the official Maven repository.

devices.7.138.0.source-code.Aurora14Setup Maven / Gradle / Ivy

There is a newer version: 7.139.60
Show newest version

/*
		A basic implementation of the DeviceSetup class.
*/
import java.awt.*;
import javax.swing.*;

public class Aurora14Setup extends DeviceSetup
{
	private static final long serialVersionUID = 1L;

	public Aurora14Setup(JFrame parent)
	{
		super(parent);
		// This code is automatically generated by Visual Cafe when you add
		// components to the visual environment. It instantiates and initializes
		// the components. To modify the code, only use code syntax that matches
		// what Visual Cafe can generate, or Visual Cafe may be unable to back
		// parse your Java file into its visual environment.
		// {{INIT_CONTROLS
		setDeviceProvider("150.178.3.112");
		setDeviceTitle("Aurora 14 Transient Recorder");
		setDeviceType("Aurora14");
		getContentPane().setLayout(null);
		setSize(550, 456);
		deviceField1.setTextOnly(true);
		deviceField1.setOffsetNid(1);
		deviceField1.setLabelString("Camac Name: ");
		getContentPane().add(deviceField1);
		deviceField1.setBounds(-12, 12, 252, 40);
		getContentPane().add(deviceDispatch1);
		deviceDispatch1.setBounds(408, 12, 131, 40);
		deviceField2.setNumCols(33);
		deviceField2.setTextOnly(true);
		deviceField2.setOffsetNid(2);
		deviceField2.setLabelString("Comment: ");
		getContentPane().add(deviceField2);
		deviceField2.setBounds(12, 48, 504, 40);
		deviceChoice1.setOffsetNid(3);
		{
			final String[] tempString = new String[2];
			tempString[0] = "SOFTWARE";
			tempString[1] = "EXTERNAL";
			deviceChoice1.setChoiceItems(tempString);
		}
		deviceChoice1.setLabelString("Trig. Mode: ");
		getContentPane().add(deviceChoice1);
		deviceChoice1.setBounds(0, 84, 204, 40);
		deviceChoice2.setOffsetNid(5);
		{
			final String[] tempString = new String[2];
			tempString[0] = "EXTERNAL";
			tempString[1] = "INTERNAL";
			deviceChoice2.setChoiceItems(tempString);
		}
		deviceChoice2.setLabelString("Clock Mode: ");
		getContentPane().add(deviceChoice2);
		deviceChoice2.setBounds(204, 84, 180, 40);
		deviceChoice3.setChoiceFloatValues(new float[]
		{ (float) 1000000.0, (float) 500000.0, (float) 250000.0, (float) 100000.0, (float) 50000.0, (float) 25000.0,
				(float) 10000.0 });
		deviceChoice3.setOffsetNid(7);
		{
			final String[] tempString = new String[7];
			tempString[0] = "1E6";
			tempString[1] = "0.5E6";
			tempString[2] = "0.25E6";
			tempString[3] = "0.1E6";
			tempString[4] = "0.5E5";
			tempString[5] = "0.25E5";
			tempString[6] = "0.1E5";
			deviceChoice3.setChoiceItems(tempString);
		}
		deviceChoice3.setLabelString("Frequency:");
		getContentPane().add(deviceChoice3);
		deviceChoice3.setBounds(384, 84, 156, 40);
		deviceChoice4.setOffsetNid(8);
		{
			final String[] tempString = new String[2];
			tempString[0] = "NORMAL";
			tempString[1] = "BURST";
			deviceChoice4.setChoiceItems(tempString);
		}
		deviceChoice4.setLabelString("Op. Mode: ");
		getContentPane().add(deviceChoice4);
		deviceChoice4.setBounds(228, 12, 180, 40);
		deviceField3.setNumCols(20);
		deviceField3.setOffsetNid(4);
		deviceField3.setLabelString("     Trig. Source: ");
		getContentPane().add(deviceField3);
		deviceField3.setBounds(0, 132, 348, 40);
		deviceField4.setOffsetNid(10);
		deviceField4.setLabelString("PTS: ");
		getContentPane().add(deviceField4);
		deviceField4.setBounds(372, 132, 168, 40);
		deviceField5.setNumCols(20);
		deviceField5.setOffsetNid(6);
		deviceField5.setLabelString("Clock Source: ");
		getContentPane().add(deviceField5);
		deviceField5.setBounds(12, 168, 336, 40);
		deviceChoice5.setOffsetNid(9);
		{
			final String[] tempString = new String[2];
			tempString[0] = "TRUE";
			tempString[1] = "FALSE";
			deviceChoice5.setChoiceItems(tempString);
		}
		deviceChoice5.setLabelString("Use Time: ");
		getContentPane().add(deviceChoice5);
		deviceChoice5.setBounds(360, 168, 180, 40);
		getContentPane().add(JTabbedPane1);
		JTabbedPane1.setBounds(12, 204, 516, 192);
		JScrollPane1.setOpaque(true);
		JTabbedPane1.add(JScrollPane1);
		JScrollPane1.setBounds(2, 24, 511, 165);
		JScrollPane1.setVisible(false);
		JPanel1.setLayout(new GridLayout(6, 1, 0, 0));
		JScrollPane1.getViewport().add(JPanel1);
		JPanel1.setBounds(0, 0, 493, 246);
		deviceChannel1.setInSameLine(true);
		deviceChannel1.setOffsetNid(11);
		deviceChannel1.setLabelString("Ch1: ");
		deviceChannel1.setBorderVisible(true);
		deviceChannel1.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel1);
		deviceField6.setOffsetNid(14);
		deviceField6.setLabelString("Start Time: ");
		deviceChannel1.add(deviceField6);
		deviceField7.setOffsetNid(15);
		deviceField7.setLabelString("End Time: ");
		deviceChannel1.add(deviceField7);
		deviceChannel2.setInSameLine(true);
		deviceChannel2.setOffsetNid(19);
		deviceChannel2.setLabelString("Ch2: ");
		deviceChannel2.setBorderVisible(true);
		deviceChannel2.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel2);
		deviceField8.setOffsetNid(22);
		deviceField8.setLabelString("Start Time: ");
		deviceChannel2.add(deviceField8);
		deviceField9.setOffsetNid(23);
		deviceField9.setLabelString("End Time: ");
		deviceChannel2.add(deviceField9);
		deviceChannel3.setInSameLine(true);
		deviceChannel3.setOffsetNid(27);
		deviceChannel3.setLabelString("Ch3: ");
		deviceChannel3.setBorderVisible(true);
		deviceChannel3.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel3);
		deviceField10.setOffsetNid(30);
		deviceField10.setLabelString("Start Time: ");
		deviceChannel3.add(deviceField10);
		deviceField11.setOffsetNid(31);
		deviceField11.setLabelString("End Time: ");
		deviceChannel3.add(deviceField11);
		deviceChannel4.setInSameLine(true);
		deviceChannel4.setOffsetNid(35);
		deviceChannel4.setLabelString("Ch4: ");
		deviceChannel4.setBorderVisible(true);
		deviceChannel4.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel4);
		deviceField12.setOffsetNid(38);
		deviceField12.setLabelString("Start Time: ");
		deviceChannel4.add(deviceField12);
		deviceField13.setOffsetNid(39);
		deviceField13.setLabelString("End Time: ");
		deviceChannel4.add(deviceField13);
		deviceChannel5.setInSameLine(true);
		deviceChannel5.setOffsetNid(43);
		deviceChannel5.setLabelString("Ch5: ");
		deviceChannel5.setBorderVisible(true);
		deviceChannel5.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel5);
		deviceField14.setOffsetNid(46);
		deviceField14.setLabelString("Start Time: ");
		deviceChannel5.add(deviceField14);
		deviceField15.setOffsetNid(47);
		deviceField15.setLabelString("End Time: ");
		deviceChannel5.add(deviceField15);
		deviceChannel6.setInSameLine(true);
		deviceChannel6.setOffsetNid(51);
		deviceChannel6.setLabelString("Ch6: ");
		deviceChannel6.setBorderVisible(true);
		deviceChannel6.setLayout(new BorderLayout(0, 0));
		JPanel1.add(deviceChannel6);
		deviceField16.setOffsetNid(54);
		deviceField16.setLabelString("Start Time: ");
		deviceChannel6.add(deviceField16);
		deviceField17.setOffsetNid(55);
		deviceField17.setLabelString("End Time: ");
		deviceChannel6.add(deviceField17);
		JScrollPane2.setOpaque(true);
		JTabbedPane1.add(JScrollPane2);
		JScrollPane2.setBounds(2, 24, 511, 165);
		JScrollPane2.setVisible(false);
		JPanel2.setLayout(new GridLayout(6, 1, 0, 0));
		JScrollPane2.getViewport().add(JPanel2);
		JPanel2.setBounds(0, 0, 493, 246);
		deviceChannel7.setInSameLine(true);
		deviceChannel7.setOffsetNid(11);
		deviceChannel7.setLabelString("Ch1: ");
		deviceChannel7.setBorderVisible(true);
		deviceChannel7.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel7);
		deviceField18.setOffsetNid(16);
		deviceField18.setLabelString("Start Idx: ");
		deviceChannel7.add(deviceField18);
		deviceField19.setOffsetNid(17);
		deviceField19.setLabelString("End Idx: ");
		deviceChannel7.add(deviceField19);
		deviceChannel8.setInSameLine(true);
		deviceChannel8.setOffsetNid(19);
		deviceChannel8.setLabelString("Ch2: ");
		deviceChannel8.setBorderVisible(true);
		deviceChannel8.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel8);
		deviceField20.setOffsetNid(24);
		deviceField20.setLabelString("Start Idx: ");
		deviceChannel8.add(deviceField20);
		deviceField21.setOffsetNid(25);
		deviceField21.setLabelString("End Idx: ");
		deviceChannel8.add(deviceField21);
		deviceChannel9.setInSameLine(true);
		deviceChannel9.setOffsetNid(27);
		deviceChannel9.setLabelString("Ch3: ");
		deviceChannel9.setBorderVisible(true);
		deviceChannel9.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel9);
		deviceField22.setOffsetNid(32);
		deviceField22.setLabelString("Start Idx: ");
		deviceChannel9.add(deviceField22);
		deviceField23.setOffsetNid(33);
		deviceField23.setLabelString("End Idx: ");
		deviceChannel9.add(deviceField23);
		deviceChannel10.setInSameLine(true);
		deviceChannel10.setOffsetNid(35);
		deviceChannel10.setLabelString("Ch4: ");
		deviceChannel10.setBorderVisible(true);
		deviceChannel10.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel10);
		deviceField24.setOffsetNid(40);
		deviceField24.setLabelString("Start Idx: ");
		deviceChannel10.add(deviceField24);
		deviceField25.setOffsetNid(41);
		deviceField25.setLabelString("End Idx: ");
		deviceChannel10.add(deviceField25);
		deviceChannel11.setInSameLine(true);
		deviceChannel11.setOffsetNid(43);
		deviceChannel11.setLabelString("Ch5: ");
		deviceChannel11.setBorderVisible(true);
		deviceChannel11.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel11);
		deviceField26.setOffsetNid(48);
		deviceField26.setLabelString("Start Idx: ");
		deviceChannel11.add(deviceField26);
		deviceField27.setOffsetNid(49);
		deviceField27.setLabelString("End Idx: ");
		deviceChannel11.add(deviceField27);
		deviceChannel12.setInSameLine(true);
		deviceChannel12.setOffsetNid(51);
		deviceChannel12.setLabelString("Ch6: ");
		deviceChannel12.setBorderVisible(true);
		deviceChannel12.setLayout(new BorderLayout(0, 0));
		JPanel2.add(deviceChannel12);
		deviceField28.setOffsetNid(56);
		deviceField28.setLabelString("Start Idx: ");
		deviceChannel12.add(deviceField28);
		deviceField29.setOffsetNid(57);
		deviceField29.setLabelString("End Idx: ");
		deviceChannel12.add(deviceField29);
		JTabbedPane1.setSelectedIndex(0);
		JTabbedPane1.setSelectedComponent(JScrollPane1);
		JTabbedPane1.setTitleAt(0, "Channels (Time)");
		JTabbedPane1.setTitleAt(1, "Channels (Samples)");
		getContentPane().add(deviceButtons1);
		deviceButtons1.setBounds(96, 408, 336, 40);
		// }}
	}

	public Aurora14Setup()
	{
		this((JFrame) null);
	}

	public Aurora14Setup(String sTitle)
	{
		this();
		setTitle(sTitle);
	}

	@Override
	public void setVisible(boolean b)
	{
		if (b)
			setLocation(50, 50);
		super.setVisible(b);
	}

	static public void main(String args[])
	{
		(new Aurora14Setup()).setVisible(true);
	}

	@Override
	public void addNotify()
	{
		// Record the size of the window prior to calling parents addNotify.
		final Dimension size = getSize();
		super.addNotify();
		if (frameSizeAdjusted)
			return;
		frameSizeAdjusted = true;
		// Adjust size of frame according to the insets
		final Insets insets = getInsets();
		setSize(insets.left + insets.right + size.width, insets.top + insets.bottom + size.height);
	}

	// Used by addNotify
	boolean frameSizeAdjusted = false;
	// {{DECLARE_CONTROLS
	DeviceField deviceField1 = new DeviceField();
	DeviceDispatch deviceDispatch1 = new DeviceDispatch();
	DeviceField deviceField2 = new DeviceField();
	DeviceChoice deviceChoice1 = new DeviceChoice();
	DeviceChoice deviceChoice2 = new DeviceChoice();
	DeviceChoice deviceChoice3 = new DeviceChoice();
	DeviceChoice deviceChoice4 = new DeviceChoice();
	DeviceField deviceField3 = new DeviceField();
	DeviceField deviceField4 = new DeviceField();
	DeviceField deviceField5 = new DeviceField();
	DeviceChoice deviceChoice5 = new DeviceChoice();
	javax.swing.JTabbedPane JTabbedPane1 = new javax.swing.JTabbedPane();
	javax.swing.JScrollPane JScrollPane1 = new javax.swing.JScrollPane();
	javax.swing.JPanel JPanel1 = new javax.swing.JPanel();
	DeviceChannel deviceChannel1 = new DeviceChannel();
	DeviceField deviceField6 = new DeviceField();
	DeviceField deviceField7 = new DeviceField();
	DeviceChannel deviceChannel2 = new DeviceChannel();
	DeviceField deviceField8 = new DeviceField();
	DeviceField deviceField9 = new DeviceField();
	DeviceChannel deviceChannel3 = new DeviceChannel();
	DeviceField deviceField10 = new DeviceField();
	DeviceField deviceField11 = new DeviceField();
	DeviceChannel deviceChannel4 = new DeviceChannel();
	DeviceField deviceField12 = new DeviceField();
	DeviceField deviceField13 = new DeviceField();
	DeviceChannel deviceChannel5 = new DeviceChannel();
	DeviceField deviceField14 = new DeviceField();
	DeviceField deviceField15 = new DeviceField();
	DeviceChannel deviceChannel6 = new DeviceChannel();
	DeviceField deviceField16 = new DeviceField();
	DeviceField deviceField17 = new DeviceField();
	javax.swing.JScrollPane JScrollPane2 = new javax.swing.JScrollPane();
	javax.swing.JPanel JPanel2 = new javax.swing.JPanel();
	DeviceChannel deviceChannel7 = new DeviceChannel();
	DeviceField deviceField18 = new DeviceField();
	DeviceField deviceField19 = new DeviceField();
	DeviceChannel deviceChannel8 = new DeviceChannel();
	DeviceField deviceField20 = new DeviceField();
	DeviceField deviceField21 = new DeviceField();
	DeviceChannel deviceChannel9 = new DeviceChannel();
	DeviceField deviceField22 = new DeviceField();
	DeviceField deviceField23 = new DeviceField();
	DeviceChannel deviceChannel10 = new DeviceChannel();
	DeviceField deviceField24 = new DeviceField();
	DeviceField deviceField25 = new DeviceField();
	DeviceChannel deviceChannel11 = new DeviceChannel();
	DeviceField deviceField26 = new DeviceField();
	DeviceField deviceField27 = new DeviceField();
	DeviceChannel deviceChannel12 = new DeviceChannel();
	DeviceField deviceField28 = new DeviceField();
	DeviceField deviceField29 = new DeviceField();
	DeviceButtons deviceButtons1 = new DeviceButtons();
	// }}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy