92 lines
2.5 KiB
Java
92 lines
2.5 KiB
Java
|
|
import ch.psi.pshell.ui.App;
|
|
import ch.psi.pshell.ui.Panel;
|
|
import ch.psi.pshell.ui.StripChart;
|
|
import ch.psi.utils.State;
|
|
import ch.psi.utils.Sys;
|
|
import java.io.File;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public class sc extends Panel {
|
|
StripChart stripChart;
|
|
public sc() {
|
|
initComponents();
|
|
|
|
/*
|
|
stripChart = new StripChart(this.getTopLevel(),false, null);
|
|
this.add(stripChart.getPlotPanel());
|
|
try {
|
|
stripChart.open(new File("test.scd"));
|
|
stripChart.start();
|
|
} catch (Exception ex) { showException(ex);
|
|
}
|
|
*/
|
|
}
|
|
|
|
//Overridable callbacks
|
|
@Override
|
|
public void onInitialize(int runCount) {
|
|
plotPanel.removeAll();
|
|
plotPanel.add(StripChart.getPlotPanel(new File("test.scd")));
|
|
}
|
|
|
|
@Override
|
|
public void onStateChange(State state, State former) {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void onExecutedFile(String fileName, Object result) {
|
|
}
|
|
|
|
@Override
|
|
protected void onTimer() {
|
|
}
|
|
|
|
@Override
|
|
protected void onLoaded() {
|
|
|
|
}
|
|
|
|
@Override
|
|
protected void onUnloaded() {
|
|
|
|
}
|
|
|
|
//Invoked by 'update()' to update components in the event thread
|
|
@Override
|
|
protected void doUpdate() {
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
private void initComponents() {
|
|
|
|
plotPanel = new javax.swing.JPanel();
|
|
|
|
plotPanel.setLayout(new java.awt.BorderLayout());
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
this.setLayout(layout);
|
|
layout.setHorizontalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(plotPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addContainerGap())
|
|
);
|
|
layout.setVerticalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addComponent(plotPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
|
|
.addGap(170, 170, 170))
|
|
);
|
|
}// </editor-fold>//GEN-END:initComponents
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
private javax.swing.JPanel plotPanel;
|
|
// End of variables declaration//GEN-END:variables
|
|
}
|