Skip to content
Snippets Groups Projects
Commit d1660056 authored by cvs's avatar cvs
Browse files

%lofarcvsmv%: Moved to LOFAR/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats

parent 175a0f0f
No related merge requests found
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<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"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<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"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer" name="plotContainer">
</Component>
</SubComponents>
</Form>
/*
* BeamletStatsPanel.java
*
* Copyright (C) 2006
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats;
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;
/**
*
* @author balken
*/
public class BeamletStatsPanel extends JPanel implements ITabPanel {
/** Reference to the MainPanel. */
private MainPanel itsMainPanel;
/** Creates new form BeamletStatsPanel */
public BeamletStatsPanel() {
initComponents();
}
/**
* Used to initialize the ITabPanel and give it a refrence to the main panel.
* @param mainPanel The MainPanel.
*/
public void init(MainPanel mainPanel) {
itsMainPanel = mainPanel;
}
/**
* Method that can be called by the main panel to update this panel.
* @param updateType The type of update.
*/
public void update(int updateType) {
/**
* If the board is connected update the plot.
* Else disable panel with enablePanel().
*/
if (itsMainPanel.getBoard().isConnected()) {
/*
* Construct a mask based on the currently selected board.
*/
RSPMask mask = new RSPMask();
mask.setBit( itsMainPanel.getSelectedBoardIndex() );
plotContainer.updatePlot( itsMainPanel.getBoard().getBeamletStats(mask) );
System.out.println(itsMainPanel.getBoard().getBeamletStats(mask).length);
} else {
enablePanel(false);
}
}
/**
* Method that can be called to disable or enable the board.
* @param b Boolean value used to determine to enable (true) or
* disable (false).
*/
public void enablePanel(boolean b) {
// on disable
if (!b) {
plotContainer.updatePlot(new double[216]);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
plotContainer = new nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer();
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
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)
.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)
.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;
// End of variables declaration//GEN-END:variables
}
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<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"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<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"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer" name="plotContainer">
</Component>
</SubComponents>
</Form>
/*
* BeamletStatsPanel.java
*
* Copyright (C) 2006
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats;
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;
/**
*
* @author balken
*/
public class BeamletStatsPanel extends JPanel implements ITabPanel {
/** Reference to the MainPanel. */
private MainPanel itsMainPanel;
/** Creates new form BeamletStatsPanel */
public BeamletStatsPanel() {
initComponents();
}
/**
* Used to initialize the ITabPanel and give it a refrence to the main panel.
* @param mainPanel The MainPanel.
*/
public void init(MainPanel mainPanel) {
itsMainPanel = mainPanel;
}
/**
* Method that can be called by the main panel to update this panel.
* @param updateType The type of update.
*/
public void update(int updateType) {
/**
* If the board is connected update the plot.
* Else disable panel with enablePanel().
*/
if (itsMainPanel.getBoard().isConnected()) {
/*
* Construct a mask based on the currently selected board.
*/
RSPMask mask = new RSPMask();
mask.setBit( itsMainPanel.getSelectedBoardIndex() );
plotContainer.updatePlot( itsMainPanel.getBoard().getBeamletStats(mask) );
System.out.println(itsMainPanel.getBoard().getBeamletStats(mask).length);
} else {
enablePanel(false);
}
}
/**
* Method that can be called to disable or enable the board.
* @param b Boolean value used to determine to enable (true) or
* disable (false).
*/
public void enablePanel(boolean b) {
// on disable
if (!b) {
plotContainer.updatePlot(new double[216]);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
plotContainer = new nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer();
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
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)
.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)
.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;
// End of variables declaration//GEN-END:variables
}
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<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"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<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"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer" name="plotContainer">
</Component>
</SubComponents>
</Form>
/*
* BeamletStatsPanel.java
*
* Copyright (C) 2006
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id$
*/
package nl.astron.lofar.mac.apl.gui.jrsp.panels.beamletstats;
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;
/**
*
* @author balken
*/
public class BeamletStatsPanel extends JPanel implements ITabPanel {
/** Reference to the MainPanel. */
private MainPanel itsMainPanel;
/** Creates new form BeamletStatsPanel */
public BeamletStatsPanel() {
initComponents();
}
/**
* Used to initialize the ITabPanel and give it a refrence to the main panel.
* @param mainPanel The MainPanel.
*/
public void init(MainPanel mainPanel) {
itsMainPanel = mainPanel;
}
/**
* Method that can be called by the main panel to update this panel.
* @param updateType The type of update.
*/
public void update(int updateType) {
/**
* If the board is connected update the plot.
* Else disable panel with enablePanel().
*/
if (itsMainPanel.getBoard().isConnected()) {
/*
* Construct a mask based on the currently selected board.
*/
RSPMask mask = new RSPMask();
mask.setBit( itsMainPanel.getSelectedBoardIndex() );
plotContainer.updatePlot( itsMainPanel.getBoard().getBeamletStats(mask) );
System.out.println(itsMainPanel.getBoard().getBeamletStats(mask).length);
} else {
enablePanel(false);
}
}
/**
* Method that can be called to disable or enable the board.
* @param b Boolean value used to determine to enable (true) or
* disable (false).
*/
public void enablePanel(boolean b) {
// on disable
if (!b) {
plotContainer.updatePlot(new double[216]);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
plotContainer = new nl.astron.lofar.mac.apl.gui.jrsp.panels.PlotContainer();
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
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)
.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)
.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;
// 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