Closedown
This commit is contained in:
@@ -16,24 +16,34 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="244" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="244" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="144" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="370" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="224" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="198" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="327" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="18" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -62,5 +72,26 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="jTable1">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="4" rowCount="4">
|
||||
<Column editable="true" title="Title 1" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 2" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 3" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 4" type="java.lang.Object"/>
|
||||
</Table>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -25,6 +25,7 @@ import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
|
||||
|
||||
/**
|
||||
@@ -58,6 +59,8 @@ public class TestingList extends Panel {
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
txtOutput = new javax.swing.JTextArea();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jTable1 = new javax.swing.JTable();
|
||||
|
||||
jButton1.setText("jButton1");
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -70,25 +73,45 @@ public class TestingList extends Panel {
|
||||
txtOutput.setRows(5);
|
||||
jScrollPane1.setViewportView(txtOutput);
|
||||
|
||||
jTable1.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
{null, null, null, null},
|
||||
{null, null, null, null},
|
||||
{null, null, null, null},
|
||||
{null, null, null, null}
|
||||
},
|
||||
new String [] {
|
||||
"Title 1", "Title 2", "Title 3", "Title 4"
|
||||
}
|
||||
));
|
||||
jScrollPane2.setViewportView(jTable1);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(244, 244, 244)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButton1))
|
||||
.addContainerGap(370, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(244, 244, 244)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButton1)))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(144, 144, 144)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(224, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(198, 198, 198)
|
||||
.addGap(42, 42, 42)
|
||||
.addComponent(jButton1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(327, Short.MAX_VALUE))
|
||||
.addGap(28, 28, 28)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(18, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@@ -99,16 +122,33 @@ public class TestingList extends Panel {
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTable jTable1;
|
||||
private javax.swing.JTextArea txtOutput;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
|
||||
//table with checkboxes
|
||||
|
||||
public void buildTable(){
|
||||
Object[] columnNames = {"Type", "Company", "Shares", "Price", "Boolean"};
|
||||
Object[][] data = {
|
||||
{"Buy", "IBM", new Integer(1000), new Double(80.50), false},
|
||||
{"Sell", "MicroSoft", new Integer(2000), new Double(6.25), true},
|
||||
{"Sell", "Apple", new Integer(3000), new Double(7.35), true},
|
||||
{"Buy", "Nortel", new Integer(4000), new Double(20.00), false}
|
||||
};
|
||||
|
||||
DefaultTableModel model = new DefaultTableModel(data, columnNames);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//dynamically added checkbboxes
|
||||
JButton remove;
|
||||
JButton appear;
|
||||
JCheckBox cb[]=new JCheckBox[10];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void buildGUI() {
|
||||
JFrame fr=new JFrame();
|
||||
JPanel p=new JPanel();
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="check" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
|
||||
@@ -58,7 +58,10 @@
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="panelPlot" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="plot" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -107,8 +110,8 @@
|
||||
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="panelPlot" pref="144" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="plot" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -155,10 +158,6 @@
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelPlot">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Java Code"/>
|
||||
@@ -218,5 +217,10 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="ch.psi.pshell.plot.LinePlotJFree" name="plot">
|
||||
<Properties>
|
||||
<Property name="title" type="java.lang.String" value=""/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -66,9 +66,9 @@ public class TestingPanel extends Panel {
|
||||
panel.add(motorPanel);
|
||||
onInitialize(-1);
|
||||
|
||||
plot = new LinePlotJFree();
|
||||
|
||||
plot.setTitle("bo");
|
||||
panelPlot.add(plot);
|
||||
|
||||
series=new LinePlotSeries("Position");
|
||||
plot.addSeries(series);
|
||||
|
||||
@@ -84,7 +84,6 @@ public class TestingPanel extends Panel {
|
||||
check = new javax.swing.JCheckBox();
|
||||
spinner = new javax.swing.JSpinner();
|
||||
panel = new javax.swing.JPanel();
|
||||
panelPlot = new javax.swing.JPanel();
|
||||
jButton2 = new javax.swing.JButton();
|
||||
cmTestPS = new javax.swing.JButton();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
@@ -93,6 +92,7 @@ public class TestingPanel extends Panel {
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
txtOutput = new javax.swing.JTextArea();
|
||||
plot = new ch.psi.pshell.plot.LinePlotJFree();
|
||||
|
||||
buttonExecute.setText("Execute test11");
|
||||
buttonExecute.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -121,8 +121,6 @@ public class TestingPanel extends Panel {
|
||||
|
||||
panel.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
panelPlot.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jButton2.setText("Java Code");
|
||||
jButton2.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -164,14 +162,16 @@ public class TestingPanel extends Panel {
|
||||
txtOutput.setRows(5);
|
||||
jScrollPane1.setViewportView(txtOutput);
|
||||
|
||||
plot.setTitle("");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(41, 41, 41)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(41, 41, 41)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(check)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
@@ -200,7 +200,9 @@ public class TestingPanel extends Panel {
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jButton2))))
|
||||
.addComponent(panelPlot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
@@ -237,8 +239,8 @@ public class TestingPanel extends Panel {
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButton1)
|
||||
.addComponent(jButton2))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(panelPlot, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
@@ -334,9 +336,9 @@ public class TestingPanel extends Panel {
|
||||
args.put("relative", var1);
|
||||
args.put("steps", var2);
|
||||
run("power-supply", args);
|
||||
|
||||
Object ret = eval("ret");
|
||||
//try to print the result
|
||||
txtTestPSRes.setText(args.get("steps").toString());
|
||||
txtTestPSRes.setText(ret.toString());
|
||||
|
||||
|
||||
//evalAsync("run('args', locals = {'relative':" + (var1 ? "True" :"False") + ", 'steps':" + var2 + "})");
|
||||
@@ -387,7 +389,7 @@ public class TestingPanel extends Panel {
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JPanel panel;
|
||||
private javax.swing.JPanel panelPlot;
|
||||
private ch.psi.pshell.plot.LinePlotJFree plot;
|
||||
private javax.swing.JSpinner spinner;
|
||||
private javax.swing.JTextArea txtOutput;
|
||||
private javax.swing.JTextField txtTestPSRes;
|
||||
|
||||
@@ -61,4 +61,4 @@ ActualIA.close()
|
||||
|
||||
scan.end()
|
||||
|
||||
#sys.exit(0)
|
||||
ret = 0
|
||||
Reference in New Issue
Block a user