Skip to content
Snippets Groups Projects
Commit 31f8bd2d authored by balken's avatar balken
Browse files

BugID: 678

Moved everything in CVS and added the BeamletStats.
parent 5540b851
No related branches found
No related tags found
No related merge requests found
Showing
with 334 additions and 63 deletions
......@@ -157,6 +157,7 @@ Demo/CEP/TFlopCorrelator/TFC_GUI/plot3.png -text
Demo/CEP/TFlopCorrelator/TFC_GUI/src/tfc_gui/startTFC.sh -text svneol=native#application/octet-stream
Demo/CEP/TFlopCorrelator/TFC_GUI/startTFC.sh -text svneol=native#application/octet-stream
JAVA/CEP/jParmFacade/nbproject/.cvsignore -text
JAVA/GUI/MAC/jRSP/.cvsignore -text
JAVA/GUI/MAC/jRSP/nbproject/.cvsignore -text
JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/.cvsignore -text
JAVA/GUI/Plotter/.cvsignore -text
......@@ -166,6 +167,7 @@ JAVA/GUI/Plotter/dist/lib/sgt.jar -text svneol=unset#unset
JAVA/GUI/Plotter/doc/Plotter.EAP -text
JAVA/GUI/Plotter/doc/javadoc/resources/inherit.gif -text
JAVA/GUI/Plotter/nbproject/.cvsignore -text
JAVA/MAC/jRSP/.cvsignore -text
JAVA/MAC/jRSP/nbproject/.cvsignore -text
LCS/AMC/amc_main_classes.png -text
LCS/AMC/amc_package.png -text
......
JAVA/CEP/jParmFacade/nbproject/private
JAVA/GUI/MAC/jRSP/build
JAVA/GUI/MAC/jRSP/dist
JAVA/GUI/MAC/jRSP/nbproject/private
JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.form
JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.java
......@@ -8,6 +10,8 @@ JAVA/GUI/Plotter/PlotterConfig/nbproject/private
JAVA/GUI/Plotter/build
JAVA/GUI/Plotter/dist
JAVA/GUI/Plotter/nbproject/private
JAVA/MAC/jRSP/build
JAVA/MAC/jRSP/dist
JAVA/MAC/jRSP/nbproject/private
MAC/Navigator/panels/nav_fw/test.pnl
SAS/OTB/MoM-OTDB-adapter/bin
......
build
dist
......@@ -233,7 +233,9 @@ is divided into following sections:
COMPILATION SECTION
===================
-->
<target name="deps-jar" depends="init" unless="no.deps"/>
<target name="deps-jar" depends="init" unless="no.deps">
<ant target="jar" inheritall="false" antfile="${project.jRSP}/build.xml"/>
</target>
<target name="-pre-pre-compile" depends="init,deps-jar">
<mkdir dir="${build.classes.dir}"/>
</target>
......@@ -528,7 +530,9 @@ is divided into following sections:
CLEANUP SECTION
===============
-->
<target name="deps-clean" depends="init" unless="no.deps"/>
<target name="deps-clean" depends="init" unless="no.deps">
<ant target="clean" inheritall="false" antfile="${project.jRSP}/build.xml"/>
</target>
<target name="-do-clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
......
build.xml.data.CRC32=e5731f99
build.xml.data.CRC32=ac466ab8
build.xml.script.CRC32=d2d162b4
build.xml.stylesheet.CRC32=d5b6853a
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=e5731f99
nbproject/build-impl.xml.script.CRC32=42af39f4
nbproject/build-impl.xml.data.CRC32=ac466ab8
nbproject/build-impl.xml.script.CRC32=d47fb163
nbproject/build-impl.xml.stylesheet.CRC32=99b91518
......@@ -16,8 +16,21 @@ debug.test.classpath=\
dist.dir=dist
dist.jar=${dist.dir}/jRSP.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.jParmFacade.jar=../../../../../../repository/jParmFacade.jar
file.reference.jRSP.jar=../../../MAC/jRSP/dist/jRSP.jar
file.reference.log4j-1.2.13.jar=../../../../../../repository/log4j-1.2.13.jar
file.reference.OTB.jar=../../../../SAS/OTB/OTB/dist/OTB.jar
file.reference.Plotter-config-jrsp.jar=../../../../../../repository/Plotter-config-jrsp.jar
file.reference.Plotter.jar=../../Plotter/dist/Plotter.jar
file.reference.Plotter.jar-1=../../../../../../repository/Plotter.jar
jar.compress=false
javac.classpath=
javac.classpath=\
${libs.swing-layout.classpath}:\
${file.reference.log4j-1.2.13.jar}:\
${file.reference.OTB.jar}:\
${reference.jRSP.jar}:\
${file.reference.PlotterConfig.jar}:\
${file.reference.Plotter.jar-1}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
......@@ -42,6 +55,8 @@ main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
project.jRSP=../../../MAC/jRSP
reference.jRSP.jar=${project.jRSP}/dist/jRSP.jar
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
......
......@@ -12,5 +12,15 @@
<root id="test.src.dir"/>
</test-roots>
</data>
<references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
<reference>
<foreign-project>jRSP</foreign-project>
<artifact-type>jar</artifact-type>
<script>build.xml</script>
<target>jar</target>
<clean-target>clean</clean-target>
<id>jar</id>
</reference>
</references>
</configuration>
</project>
......@@ -22,7 +22,7 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
......
......@@ -22,7 +22,7 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
/**
* This interface declares some methods that are needed for interaction with the
......
......@@ -22,7 +22,7 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
import javax.swing.JPanel;
import javax.swing.event.EventListenerList;
......
......@@ -43,7 +43,7 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.status.StatusPanel" name="statusPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.status.StatusPanel" name="statusPanel">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Status">
......@@ -52,7 +52,7 @@
</Constraint>
</Constraints>
</Component>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.subbandstats.SubbandStatsPanel" name="subbandStatsPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPanel" name="subbandStatsPanel">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Subband Statistics">
......@@ -61,7 +61,7 @@
</Constraint>
</Constraints>
</Component>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.control.RSPControlPanel" name="itsRSPControlPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.control.RSPControlPanel" name="itsRSPControlPanel">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Control">
......@@ -70,7 +70,7 @@
</Constraint>
</Constraints>
</Component>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats.BeamletStatsPanel" name="beamletStatsPanel1">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.beamletstats.BeamletStatsPanel" name="beamletStatsPanel1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Beamlet Statistics">
......@@ -81,12 +81,12 @@
</Component>
</SubComponents>
</Container>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.ControlPanel" name="controlPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.ControlPanel" name="controlPanel">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="controlPanelActionPerformed"/>
</Events>
</Component>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.ListPanel" name="listPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.ListPanel" name="listPanel">
<Properties>
<Property name="title" type="java.lang.String" value="Boards"/>
</Properties>
......
......@@ -22,12 +22,12 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
import java.awt.Cursor;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import nl.astron.lofar.mac.apl.gui.jrsp.Board;
import nl.astron.lofar.java.mac.jrsp.Board;
import nl.astron.lofar.sas.otb.MainFrame;
import nl.astron.lofar.sas.otb.panels.IPluginPanel;
import org.apache.log4j.Logger;
......@@ -380,12 +380,12 @@ public class MainPanel extends JPanel implements IPluginPanel, Runnable
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane = new javax.swing.JTabbedPane();
statusPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.status.StatusPanel();
subbandStatsPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.subbandstats.SubbandStatsPanel();
itsRSPControlPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.control.RSPControlPanel();
beamletStatsPanel1 = new nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats.BeamletStatsPanel();
controlPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.ControlPanel();
listPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.ListPanel();
statusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.StatusPanel();
subbandStatsPanel = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPanel();
itsRSPControlPanel = new nl.astron.lofar.java.gui.mac.jrsp.control.RSPControlPanel();
beamletStatsPanel1 = new nl.astron.lofar.java.gui.mac.jrsp.beamletstats.BeamletStatsPanel();
controlPanel = new nl.astron.lofar.java.gui.mac.jrsp.ControlPanel();
listPanel = new nl.astron.lofar.java.gui.mac.jrsp.ListPanel();
jTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
......@@ -546,7 +546,7 @@ public class MainPanel extends JPanel implements IPluginPanel, Runnable
}//GEN-LAST:event_controlPanelActionPerformed
/**
* Invoked when another itsBoard is selected on the listPanel.
* Invoked when another board is selected on the listPanel.
* @param evt ListSelectionEvent
*/
private void listPanelValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_listPanelValueChanged
......@@ -555,13 +555,13 @@ public class MainPanel extends JPanel implements IPluginPanel, Runnable
// Variables declaration - do not modify//GEN-BEGIN:variables
private nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats.BeamletStatsPanel beamletStatsPanel1;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.ControlPanel controlPanel;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.control.RSPControlPanel itsRSPControlPanel;
private nl.astron.lofar.java.gui.mac.jrsp.beamletstats.BeamletStatsPanel beamletStatsPanel1;
private nl.astron.lofar.java.gui.mac.jrsp.ControlPanel controlPanel;
private nl.astron.lofar.java.gui.mac.jrsp.control.RSPControlPanel itsRSPControlPanel;
private javax.swing.JTabbedPane jTabbedPane;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.ListPanel listPanel;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.status.StatusPanel statusPanel;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.subbandstats.SubbandStatsPanel subbandStatsPanel;
private nl.astron.lofar.java.gui.mac.jrsp.ListPanel listPanel;
private nl.astron.lofar.java.gui.mac.jrsp.status.StatusPanel statusPanel;
private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPanel subbandStatsPanel;
// End of variables declaration//GEN-END:variables
}
......@@ -22,12 +22,12 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.event.EventListenerList;
import nl.astron.lofar.mac.apl.gui.jrsp.RCUMask;
import nl.astron.lofar.java.mac.jrsp.RCUMask;
/**
*
......
......@@ -22,15 +22,16 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels;
package nl.astron.lofar.java.gui.mac.jrsp;
import java.awt.BorderLayout;
import java.awt.Color;
import java.util.HashMap;
import javax.swing.JPanel;
import nl.astron.lofar.java.gui.plotter.PlotConstants;
import nl.astron.lofar.java.gui.plotter.PlotPanel;
import nl.astron.lofar.java.gui.plotter.exceptions.PlotterException;
import nl.astron.lofar.mac.apl.gui.jrsp.PlotDataModel;
import org.apache.log4j.Logger;
/**
* This class is used to make the Plotter scale. It's actually a hack...
......@@ -43,18 +44,29 @@ import nl.astron.lofar.mac.apl.gui.jrsp.PlotDataModel;
*/
public class PlotContainer extends JPanel {
/** log4j logger. */
private Logger itsLogger;
/** The plotter */
private PlotPanel itsPlotPanel;
/** Creates a new instance of PlotContainer */
public PlotContainer() {
itsLogger = Logger.getLogger(PlotContainer.class);
itsLogger.info("Constructor");
setBackground(new Color(255, 255, 255)); // make background white
setLayout(new BorderLayout());
itsPlotPanel = new nl.astron.lofar.java.gui.plotter.PlotPanel();
try {
itsPlotPanel.createPlot(PlotConstants.PLOT_XYLINE, true, new double[0]);
// create hashmap to send with the createPlot-method
HashMap<String,Object> hm = new HashMap<String,Object>();
hm.put("type", PlotDataModel.EMPTY);
hm.put("data", new double[0]);
try {
itsPlotPanel.createPlot(PlotConstants.PLOT_XYLINE, true, hm);
} catch (PlotterException ex) {
ex.printStackTrace();
}
......@@ -71,7 +83,7 @@ public class PlotContainer extends JPanel {
* calling validate() to make the plot change/show.
* @param data Subband statistics data to be shown in the plot.
*/
public void updatePlot(double[] data) {
public void updatePlot(HashMap<String,Object> data) {
try {
itsPlotPanel.createPlot(PlotConstants.PLOT_XYLINE, true, data);
} catch (PlotterException ex) {
......
......@@ -22,11 +22,10 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp;
package nl.astron.lofar.java.gui.mac.jrsp;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.logging.Logger;
import nl.astron.lofar.java.gui.plotter.IPlotDataAccess;
import nl.astron.lofar.java.gui.plotter.PlotConstants;
import nl.astron.lofar.java.gui.plotter.exceptions.PlotterDataAccessException;
......@@ -42,8 +41,9 @@ import nl.astron.lofar.java.gui.plotter.exceptions.PlotterDataAccessException;
public class PlotDataModel implements IPlotDataAccess {
/** Type-values. */
public static final int SUBBAND_STATS = 1;
public static final int BEAMLET_STATS = 2;
public static final String SUBBAND_STATS = "subband-stats";
public static final String BEAMLET_STATS = "beamlet-stats";
public static final String EMPTY = "empty";
/** Creates a new instance of PlotDataModel */
public PlotDataModel() {
......@@ -55,74 +55,158 @@ public class PlotDataModel implements IPlotDataAccess {
}
public void finalize() throws Throwable {
}
}
/**
* @param constraints
*/
public HashMap retrieveData(Object constraints) throws PlotterDataAccessException {
// Create the hashmap to be returned
HashMap<String,Object> returnData = new HashMap<String,Object>();
/*
* Change constraints to a usefull hashmap.
*/
HashMap<String,Object> constraintsData = (HashMap<String,Object>) constraints;
// int type = (int)constraintsData.get("type");
/*
* Get the type and the data out of the constraints
*/
String type = (String)constraintsData.get("type");
double[] data = (double[])constraintsData.get("data");
// switch (type) {
// case SUBBAND_STATS:
String plotTitle = "";
returnData.put(PlotConstants.DATASET_NAME,plotTitle);
String plotSubTitle = "";
returnData.put(PlotConstants.DATASET_SUBNAME,plotSubTitle);
String xAxisTitle = "Frequency";
returnData.put(PlotConstants.DATASET_XAXISLABEL,xAxisTitle);
String xAxisUnits = "MHz";
returnData.put(PlotConstants.DATASET_XAXISUNIT,xAxisUnits);
String yAxisTitle = "?????";
returnData.put(PlotConstants.DATASET_YAXISLABEL,yAxisTitle);
String yAxisUnits = "Db";
returnData.put(PlotConstants.DATASET_YAXISUNIT,yAxisUnits);
LinkedList<HashMap> values = new LinkedList<HashMap>();
if (data != null && data.length > 0) {
/*
* Use the type to determine which retrieveData method should be used.
*/
if (SUBBAND_STATS.equals(type)) {
return retrieveDataSubband(data);
} else if (BEAMLET_STATS.equals(type)) {
return retrieveDataBeamlet(data);
} else { // EMPTY.equals(type)
return retrieveDataEmpty();
}
}
public HashMap retrieveDataSubband(double[] data) {
// Create the hashmap to be returned
HashMap<String,Object> returnData = new HashMap<String,Object>();
String plotTitle = "";
returnData.put(PlotConstants.DATASET_NAME,plotTitle);
String plotSubTitle = "";
returnData.put(PlotConstants.DATASET_SUBNAME,plotSubTitle);
String xAxisTitle = "Frequency";
returnData.put(PlotConstants.DATASET_XAXISLABEL,xAxisTitle);
String xAxisUnits = "MHz";
returnData.put(PlotConstants.DATASET_XAXISUNIT,xAxisUnits);
String yAxisTitle = "";
returnData.put(PlotConstants.DATASET_YAXISLABEL,yAxisTitle);
String yAxisUnits = "Db";
returnData.put(PlotConstants.DATASET_YAXISUNIT,yAxisUnits);
LinkedList<HashMap> values = new LinkedList<HashMap>();
if (data != null && data.length > 0) {
/*
* Prepare x-values.
*/
double[] xValues = new double[512];
for (int j = 0; j < 512; j ++)
{
xValues[j] = j * ( 80.0 / 512);
}
for(int i = 0; i < data.length / 512; i++) {
HashMap<String,Object> aLine = new HashMap<String,Object>();
aLine.put(PlotConstants.DATASET_VALUELABEL,"Line " + i);
double[] yValues = new double[512];
System.arraycopy(data, i*512, yValues, 0, 512);
aLine.put(PlotConstants.DATASET_XVALUES, xValues);
aLine.put(PlotConstants.DATASET_YVALUES, yValues);
values.add(aLine);
returnData.put(PlotConstants.DATASET_VALUES,values);
}
}
// }
double[] xValues = new double[512];
for (int j = 0; j < 512; j ++) {
xValues[j] = j * ( 80.0 / 512);
}
for(int i = 0; i < data.length / 512; i++) {
HashMap<String,Object> aLine = new HashMap<String,Object>();
aLine.put(PlotConstants.DATASET_VALUELABEL,"Line " + i);
double[] yValues = new double[512];
System.arraycopy(data, i*512, yValues, 0, 512);
aLine.put(PlotConstants.DATASET_XVALUES, xValues);
aLine.put(PlotConstants.DATASET_YVALUES, yValues);
values.add(aLine);
returnData.put(PlotConstants.DATASET_VALUES,values);
}
}
return returnData;
}
public HashMap retrieveDataBeamlet(double[] data) {
// Create the hashmap to be returned
HashMap<String,Object> returnData = new HashMap<String,Object>();
String plotTitle = "";
returnData.put(PlotConstants.DATASET_NAME,plotTitle);
String plotSubTitle = "";
returnData.put(PlotConstants.DATASET_SUBNAME,plotSubTitle);
String xAxisTitle = "Frequency";
returnData.put(PlotConstants.DATASET_XAXISLABEL,xAxisTitle);
String xAxisUnits = "MHz";
returnData.put(PlotConstants.DATASET_XAXISUNIT,xAxisUnits);
String yAxisTitle = "";
returnData.put(PlotConstants.DATASET_YAXISLABEL,yAxisTitle);
String yAxisUnits = "Db";
returnData.put(PlotConstants.DATASET_YAXISUNIT,yAxisUnits);
LinkedList<HashMap> values = new LinkedList<HashMap>();
if (data != null && data.length > 0) {
/*
* Prepare x-values.
*/
double[] xValues = new double[ data.length ];
for (int j = 0; j < data.length; j ++) {
xValues[j] = j;
}
HashMap<String,Object> aLine = new HashMap<String,Object>();
aLine.put(PlotConstants.DATASET_VALUELABEL,"Line");
aLine.put(PlotConstants.DATASET_XVALUES, xValues);
aLine.put(PlotConstants.DATASET_YVALUES, data);
values.add(aLine);
returnData.put(PlotConstants.DATASET_VALUES,values);
}
return returnData;
}
public HashMap retrieveDataEmpty() {
// Create the hashmap to be returned
HashMap<String,Object> returnData = new HashMap<String,Object>();
String plotTitle = "";
returnData.put(PlotConstants.DATASET_NAME,plotTitle);
String plotSubTitle = "";
returnData.put(PlotConstants.DATASET_SUBNAME,plotSubTitle);
return returnData;
String xAxisTitle = "";
returnData.put(PlotConstants.DATASET_XAXISLABEL,xAxisTitle);
String xAxisUnits = "";
returnData.put(PlotConstants.DATASET_XAXISUNIT,xAxisUnits);
String yAxisTitle = "";
returnData.put(PlotConstants.DATASET_YAXISLABEL,yAxisTitle);
String yAxisUnits = "";
returnData.put(PlotConstants.DATASET_YAXISUNIT,yAxisUnits);
LinkedList<HashMap> values = new LinkedList<HashMap>();
return returnData;
}
public HashMap updateData(HashMap currentDataSet, Object constraints) throws PlotterDataAccessException {
return null;
}
}
......@@ -13,8 +13,8 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="plotContainer" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="plotContainer" min="-2" pref="426" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="1"/>
</Group>
</Group>
</DimensionLayout>
......@@ -22,14 +22,14 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="plotContainer" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="plotContainer" min="-2" pref="311" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="1"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer" name="plotContainer">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.PlotContainer" name="plotContainer">
</Component>
</SubComponents>
</Form>
......@@ -22,12 +22,14 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats;
package nl.astron.lofar.java.gui.mac.jrsp.beamletstats;
import java.util.HashMap;
import javax.swing.JPanel;
import nl.astron.lofar.mac.apl.gui.jrsp.RSPMask;
import nl.astron.lofar.mac.apl.gui.jrsp.panels.ITabPanel;
import nl.astron.lofar.mac.apl.gui.jrsp.panels.MainPanel;
import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel;
import nl.astron.lofar.java.gui.mac.jrsp.MainPanel;
import nl.astron.lofar.java.gui.mac.jrsp.PlotDataModel;
import nl.astron.lofar.java.mac.jrsp.RSPMask;
/**
*
......@@ -66,9 +68,13 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel {
RSPMask mask = new RSPMask();
mask.setBit( itsMainPanel.getSelectedBoardIndex() );
plotContainer.updatePlot( itsMainPanel.getBoard().getBeamletStats(mask) );
System.out.println(itsMainPanel.getBoard().getBeamletStats(mask).length);
// make hashmap to send type and data to the plotContainer
HashMap<String,Object> hm = new HashMap<String,Object>();
hm.put("type", PlotDataModel.BEAMLET_STATS);
hm.put("data", itsMainPanel.getBoard().getBeamletStats(mask));
plotContainer.updatePlot( hm );
} else {
enablePanel(false);
}
......@@ -82,8 +88,12 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel {
*/
public void enablePanel(boolean b) {
// on disable
if (!b) {
plotContainer.updatePlot(new double[216]);
if (!b) {
// create hashmap to send with updateplot
HashMap<String,Object> hm = new HashMap<String,Object>();
hm.put("type", PlotDataModel.BEAMLET_STATS);
hm.put("data", new double[0]);
plotContainer.updatePlot(hm);
}
}
......@@ -94,7 +104,7 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel {
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
plotContainer = new nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer();
plotContainer = new nl.astron.lofar.java.gui.mac.jrsp.PlotContainer();
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
......@@ -102,21 +112,21 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel {
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(plotContainer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(plotContainer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 426, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(plotContainer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(plotContainer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 311, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer plotContainer;
private nl.astron.lofar.java.gui.mac.jrsp.PlotContainer plotContainer;
// End of variables declaration//GEN-END:variables
}
......@@ -175,7 +175,7 @@
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.MaskSelectionPanel" name="itsMaskSelectionPanel">
<Component class="nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel" name="itsMaskSelectionPanel">
</Component>
<Component class="javax.swing.JComboBox" name="cmbRCUMode">
<Properties>
......
......@@ -22,13 +22,13 @@
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels.control;
package nl.astron.lofar.java.gui.mac.jrsp.control;
import javax.swing.JOptionPane;
import nl.astron.lofar.mac.apl.gui.jrsp.RCUMask;
import nl.astron.lofar.mac.apl.gui.jrsp.RSPMask;
import nl.astron.lofar.mac.apl.gui.jrsp.panels.ITabPanel;
import nl.astron.lofar.mac.apl.gui.jrsp.panels.MainPanel;
import nl.astron.lofar.java.mac.jrsp.RCUMask;
import nl.astron.lofar.java.mac.jrsp.RSPMask;
import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel;
import nl.astron.lofar.java.gui.mac.jrsp.MainPanel;
/**
*
......@@ -120,7 +120,7 @@ public class RSPControlPanel extends javax.swing.JPanel implements ITabPanel {
btnSync = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
RCUModePanel = new javax.swing.JPanel();
itsMaskSelectionPanel = new nl.astron.lofar.mac.apl.gui.jrsp.panels.MaskSelectionPanel();
itsMaskSelectionPanel = new nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel();
cmbRCUMode = new javax.swing.JComboBox();
lblRCUMode = new javax.swing.JLabel();
btnSetFilter = new javax.swing.JButton();
......@@ -384,12 +384,12 @@ public class RSPControlPanel extends javax.swing.JPanel implements ITabPanel {
private javax.swing.JButton btnSetFilter;
private javax.swing.JButton btnSync;
private javax.swing.JComboBox cmbRCUMode;
private nl.astron.lofar.mac.apl.gui.jrsp.panels.MaskSelectionPanel itsMaskSelectionPanel;
private nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel itsMaskSelectionPanel;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel lblRCUMode;
// End of variables declaration//GEN-END:variables
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment