From 6eee871e1fafae61475e1fc9fb8148f3167986ba Mon Sep 17 00:00:00 2001 From: pompert <sdos@astron.nl> Date: Mon, 31 Jul 2006 14:54:23 +0000 Subject: [PATCH] BugID: 791 Additions: -Dialog to host the Step Explorer panel -Further implemented the BBSStep class --- .../lofar/sas/otbcomponents/bbs/BBSPanel.form | 9 - .../lofar/sas/otbcomponents/bbs/BBSPanel.java | 12 +- .../bbs/BBSStepExplorerPanel.form | 24 +- .../bbs/BBSStepExplorerPanel.java | 208 +++--------------- .../otbcomponents/bbs/BBSStrategyPanel.java | 14 ++ .../bbs/stepmanagement/BBSStep.java | 130 ++++++++++- .../stepmanagement/BBSStepDataManager.java | 27 ++- .../stepmanagement/BBSStepExplorerPanel.form | 24 +- .../stepmanagement/BBSStepExplorerPanel.java | 208 +++--------------- .../stepmanagement/BBSStepInputDialog.form | 41 ++++ .../stepmanagement/BBSStepInputDialog.java | 77 +++++++ 11 files changed, 346 insertions(+), 428 deletions(-) create mode 100644 SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.form create mode 100644 SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.java diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form index 615414b74fc..ec092b3d884 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form @@ -339,15 +339,6 @@ </Constraint> </Constraints> </Component> - <Component class="nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel" name="aBBSStepExplorerPanel"> - <Constraints> - <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> - <JTabbedPaneConstraints tabName="Step Explorer"> - <Property name="tabTitle" type="java.lang.String" value="Step Explorer"/> - </JTabbedPaneConstraints> - </Constraint> - </Constraints> - </Component> </SubComponents> </Container> </SubComponents> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java index c5e164c5fa8..9d08740b3aa 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java @@ -446,7 +446,6 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ BBSDatasetDeRefText = new javax.swing.JTextField(); buttonPanel1 = new nl.astron.lofar.sas.otbcomponents.ButtonPanel(); aBBSStrategyPanel = new nl.astron.lofar.sas.otbcomponents.bbs.BBSStrategyPanel(); - aBBSStepExplorerPanel = new nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel(); setLayout(new java.awt.BorderLayout()); @@ -566,26 +565,24 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ jTabbedPane1.addTab("Strategy", aBBSStrategyPanel); - jTabbedPane1.addTab("Step Explorer", aBBSStepExplorerPanel); - add(jTabbedPane1, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents - + private void ParmDBLocalSkyTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ParmDBLocalSkyTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_ParmDBLocalSkyTextActionPerformed - + private void configurationRevertButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configurationRevertButtonActionPerformed this.restoreBBSGlobalSettingsPanel(); }//GEN-LAST:event_configurationRevertButtonActionPerformed - + private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed if(evt.getActionCommand() == "Save Settings") { saveInput(); } }//GEN-LAST:event_buttonPanel1ActionPerformed - + private jOTDBnode itsNode = null; private MainFrame itsMainFrame; private Vector<jOTDBparam> itsParamList; @@ -624,7 +621,6 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ private javax.swing.JLabel ParmDBLocalSkyLabel; private javax.swing.JTextField ParmDBLocalSkyText; private javax.swing.JPanel ParmDBPanel; - private nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel aBBSStepExplorerPanel; private nl.astron.lofar.sas.otbcomponents.bbs.BBSStrategyPanel aBBSStrategyPanel; private nl.astron.lofar.sas.otbcomponents.ButtonPanel buttonPanel1; private javax.swing.JButton configurationRevertButton; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.form index f4965bcd6aa..ca774cc2529 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.form @@ -143,11 +143,7 @@ <Component class="javax.swing.JList" name="stepExplorerInstrumentModelList"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="3"> - <StringItem index="0" value="Bandpass"/> - <StringItem index="1" value="DirGain"/> - <StringItem index="2" value="Phase"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -755,9 +751,6 @@ </Layout> <SubComponents> <Component class="javax.swing.JTextField" name="stepExplorerOutputDataText"> - <Properties> - <Property name="text" type="java.lang.String" value="OUTDATA2"/> - </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> <AbsoluteConstraints x="10" y="30" width="140" height="20"/> @@ -1143,12 +1136,7 @@ <Component class="javax.swing.JList" name="stepExplorerSourcesList1"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="4"> - <StringItem index="0" value="3C347"/> - <StringItem index="1" value="3C348"/> - <StringItem index="2" value="3C349"/> - <StringItem index="3" value="3C350"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -1261,12 +1249,7 @@ <Component class="javax.swing.JList" name="stepExplorerSourcesList"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="4"> - <StringItem index="0" value="3C343"/> - <StringItem index="1" value="3C344"/> - <StringItem index="2" value="3C345"/> - <StringItem index="3" value="3C346"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -1291,6 +1274,7 @@ </Component> <Component class="javax.swing.JTextField" name="stepExplorerStepNameText"> <Properties> + <Property name="editable" type="boolean" value="false"/> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Dialog" size="18" style="1"/> </Property> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.java index 0956eb85317..ce497c4591a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStepExplorerPanel.java @@ -36,6 +36,7 @@ import nl.astron.lofar.sas.otb.jotdb2.jOTDBnode; import nl.astron.lofar.sas.otb.jotdb2.jOTDBparam; import nl.astron.lofar.sas.otb.util.IViewPanel; import nl.astron.lofar.sas.otb.util.UserAccount; +import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStep; import org.apache.log4j.Logger; /** @@ -86,37 +87,16 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } public void setContent(Object anObject) { - itsNode=(jOTDBnode)anObject; - jOTDBparam aParam=null; - try { - //we need to get all the childs from this node. - Vector childs = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1); + + if(anObject instanceof BBSStep){ + itsBBSStep=(BBSStep)anObject; + fillBBSGui(itsBBSStep); + stepExplorerStepNameText.setEditable(false); + + }else if(anObject instanceof jOTDBnode){ + itsNode=(jOTDBnode)anObject; - // get all the params per child - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { - aParam=null; - jOTDBnode aNode = (jOTDBnode)e.nextElement(); - - // We need to keep all the nodes needed by this panel - // if the node is a leaf we need to get the pointed to value via Param. - if (aNode.leaf) { - aParam = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getParam(aNode); - setField(itsNode,aParam,aNode); - - //we need to get all the childs from the following nodes as well. - }else if (LofarUtils.keyName(aNode.name).equals("ParmDB")) { - this.retrieveAndDisplayChildDataForNode(aNode); - }else if (LofarUtils.keyName(aNode.name).equals("BBDB")) { - this.retrieveAndDisplayChildDataForNode(aNode); - } - } - } catch (RemoteException ex) { - logger.debug("Error during getComponentParam: "+ ex); - itsParamList=null; - return; } - initPanel(); } @@ -164,50 +144,22 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan */ public void popupMenuHandler(java.awt.event.ActionEvent evt) { } - /** Restore original Values in Detauks panel - */ - private void retrieveAndDisplayChildDataForNode(jOTDBnode aNode){ - jOTDBparam aParam=null; - try { - Vector HWchilds = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1); - // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); - aParam=null; - // We need to keep all the params needed by this panel - if (aHWNode.leaf) { - aParam = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getParam(aHWNode); - } - setField(aNode,aParam,aHWNode); - } - } catch (RemoteException ex) { - logger.debug("Error during retrieveAndDisplayChildDataForNode: "+ ex); - return; - } - } - /** Restore original Values in Global Settings panel */ private void restoreBBSStepExplorerPanel() { - /* - // Global Settings parameters - this.BBSDatasetText.setText(dataSet.limits); - this.BBDBHostText.setText(BBDBHost.limits); - this.BBDBPortText.setText(BBDBPort.limits); - this.BBDBDBNameText.setText(BBDBDBName.limits); - this.BBDBDBUsernameText.setText(BBDBUsername.limits); - this.BBDBDBPasswordText.setText(BBDBPassword.limits); - this.ParmDBInstrumentText.setText(ParmDBInstrument.limits); - this.ParmDBLocalSkyText.setText(ParmDBLocalSky.limits); - */ + // Global Settings parameters + if(itsBBSStep != null){ + this.stepExplorerStepNameText.setText(itsBBSStep.getName()); + } } private void initialize() { buttonPanel1.addButton("Save Settings"); + if(itsBBSStep == null){ + stepExplorerStepNameText.setEditable(true); + } } private void initPanel() { @@ -232,100 +184,13 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } else { logger.debug("ERROR: no node given"); } + } /* Set's the different fields in the GUI */ - private void setField(jOTDBnode parent, jOTDBparam aParam, jOTDBnode aNode) { - // OLAP_HW settings - if (aParam==null) { - return; - } - boolean isRef = LofarUtils.isReference(aNode.limits); - String aKeyName = LofarUtils.keyName(aNode.name); - String parentName = String.valueOf(parent.name); - /* - if (aKeyName.equals("DataSet")) { - this.BBSDatasetText.setToolTipText(aParam.description); - this.dataSet=aNode; - - if (isRef && aParam != null) { - this.BBSDatasetDeRefText.setVisible(true); - BBSDatasetText.setText(aNode.limits); - BBSDatasetDeRefText.setText(aParam.limits); - } else { - BBSDatasetDeRefText.setVisible(false); - BBSDatasetDeRefText.setText(""); - BBSDatasetText.setText(aNode.limits); - } - }else if (aKeyName.equals("DBName")) { - this.BBDBDBNameText.setToolTipText(aParam.description); - this.BBDBDBName=aNode; - if (isRef && aParam != null) { - BBDBDBNameText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBNameText.setText(aNode.limits); - } - }else if (aKeyName.equals("Host")) { - this.BBDBHostText.setToolTipText(aParam.description); - this.BBDBHost=aNode; - if (isRef && aParam != null) { - BBDBHostText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBHostText.setText(aNode.limits); - } - }else if (aKeyName.equals("Port")) { - this.BBDBPortText.setToolTipText(aParam.description); - this.BBDBPort=aNode; - if (isRef && aParam != null) { - BBDBPortText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBPortText.setText(aNode.limits); - } - }else if (aKeyName.equals("UserName")) { - this.BBDBDBUsernameText.setToolTipText(aParam.description); - this.BBDBUsername=aNode; - if (isRef && aParam != null) { - BBDBDBUsernameText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBUsernameText.setText(aNode.limits); - } - }else if (aKeyName.equals("PassWord")) { - this.BBDBDBPasswordText.setToolTipText(aParam.description); - this.BBDBPassword=aNode; - if (isRef && aParam != null) { - BBDBDBPasswordText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBPasswordText.setText(aNode.limits); - } - }else if (aKeyName.equals("Instrument")) { - this.ParmDBInstrumentText.setToolTipText(aParam.description); - this.ParmDBInstrument=aNode; - if (isRef && aParam != null) { - ParmDBInstrumentText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBInstrumentText.setText(aNode.limits); - } - }else if (aKeyName.equals("LocalSky")) { - this.ParmDBLocalSkyText.setToolTipText(aParam.description); - this.ParmDBLocalSky=aNode; - if (isRef && aParam != null) { - ParmDBLocalSkyText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBLocalSkyText.setText(aNode.limits); - } - }*/ - } - - /** saves the given param back to the database - */ - private void saveNode(jOTDBnode aNode) { - if (aNode == null) { - return; - } - try { - itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().saveNode(aNode); - } catch (RemoteException ex) { - logger.debug("Error: saveNode failed : " + ex); - } + private void fillBBSGui(BBSStep theBBSStep) { + + this.stepExplorerStepNameText.setText(theBBSStep.getName()); + //TODO: Add variables from BBSStep } /** Enables/disables the buttons @@ -365,7 +230,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan dataSet.limits = BBSDatasetText.getText(); logger.trace("Variable BBS ("+dataSet.name+"//"+dataSet.treeID()+"//"+dataSet.nodeID()+"//"+dataSet.parentID()+"//"+dataSet.paramDefID()+") from value ("+BBSDatasetText.getText()+") updated to :"+dataSet.limits); saveNode(dataSet); - } + } if (this.BBDBHost != null && !this.BBDBHostText.getText().equals(BBDBHost.limits)) { BBDBHost.limits = BBDBHostText.getText(); logger.trace("Variable BBS ("+BBDBHost.name+"//"+BBDBHost.treeID()+"//"+BBDBHost.nodeID()+"//"+BBDBHost.parentID()+"//"+BBDBHost.paramDefID()+") updated to :"+BBDBHost.limits); @@ -513,11 +378,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerInstrumentModelPanel.setLayout(new java.awt.BorderLayout()); stepExplorerInstrumentModelPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Instrument Model")); - stepExplorerInstrumentModelList.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "Bandpass", "DirGain", "Phase" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerInstrumentModelScrollPane.setViewportView(stepExplorerInstrumentModelList); stepExplorerInstrumentModelPanel.add(stepExplorerInstrumentModelScrollPane, java.awt.BorderLayout.CENTER); @@ -719,7 +579,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerOutputDataPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); stepExplorerOutputDataPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Output Data Column")); - stepExplorerOutputDataText.setText("OUTDATA2"); stepExplorerOutputDataPanel.add(stepExplorerOutputDataText, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 140, 20)); stepExplorerPanel.add(stepExplorerOutputDataPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 230, 160, 120)); @@ -880,11 +739,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerSourcesPanel1.add(stepExplorerSourcesModsPanel1, java.awt.BorderLayout.SOUTH); - stepExplorerSourcesList1.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "3C347", "3C348", "3C349", "3C350" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerSourcesScrollPane1.setViewportView(stepExplorerSourcesList1); stepExplorerSourcesPanel1.add(stepExplorerSourcesScrollPane1, java.awt.BorderLayout.CENTER); @@ -922,11 +776,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerSourcesPanel.add(stepExplorerSourcesModsPanel, java.awt.BorderLayout.SOUTH); - stepExplorerSourcesList.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "3C343", "3C344", "3C345", "3C346" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerSourcesScrollPane.setViewportView(stepExplorerSourcesList); stepExplorerSourcesPanel.add(stepExplorerSourcesScrollPane, java.awt.BorderLayout.CENTER); @@ -939,6 +788,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerStepNameLabel.setText("Step"); stepExplorerPanel.add(stepExplorerStepNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 10, -1, 30)); + stepExplorerStepNameText.setEditable(false); stepExplorerStepNameText.setFont(new java.awt.Font("Dialog", 1, 18)); stepExplorerStepNameText.setToolTipText("This is the name of the displayed step"); stepExplorerPanel.add(stepExplorerStepNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 10, 250, 30)); @@ -950,7 +800,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan add(BBSStepExplorerPanel, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents - + private void stepExplorerRevertButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stepExplorerRevertButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_stepExplorerRevertButtonActionPerformed @@ -965,30 +815,30 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } }//GEN-LAST:event_baselineUseAllCheckboxStateChanged - + private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed if(evt.getActionCommand() == "Save Settings") { saveInput(); } }//GEN-LAST:event_buttonPanel1ActionPerformed + private BBSStep itsBBSStep = null; private jOTDBnode itsNode = null; private MainFrame itsMainFrame; - private Vector<jOTDBparam> itsParamList; /*modify to step explorer panels // Global Settings parameters private jOTDBnode dataSet; - + private jOTDBnode BBDBHost; private jOTDBnode BBDBPort; private jOTDBnode BBDBDBName; private jOTDBnode BBDBUsername; private jOTDBnode BBDBPassword; - + private jOTDBnode ParmDBInstrument; private jOTDBnode ParmDBLocalSky; - */ + */ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel BBSStepExplorerPanel; private javax.swing.JPanel BaselineSelectionPanel; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java index d0cbd0ef1cd..3c8fdc89bb3 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java @@ -43,6 +43,7 @@ import nl.astron.lofar.sas.otb.util.IViewPanel; import nl.astron.lofar.sas.otb.util.UserAccount; import nl.astron.lofar.sas.otb.util.treenodes.TreeNode; import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStep; +import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStepInputDialog; import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStepNode; import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStepTreeManager; import org.apache.log4j.Logger; @@ -963,6 +964,12 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ if(selectedPath != null){ TreeNode someBBSStepNode = (TreeNode)selectedPath.getLastPathComponent(); logger.trace("BBS Step to be modified : "+someBBSStepNode.getName()); + if(!someBBSStepNode.getName().equals("Strategy Steps")){ + BBSStep theStep = ((BBSStepNode)someBBSStepNode.getUserObject()).getContainedStep(); + BBSStepInputDialog bbsStepDialog = new BBSStepInputDialog(this.itsMainFrame,false,theStep); + bbsStepDialog.setTitle("Step Explorer - "+theStep.getName()); + bbsStepDialog.setVisible(true); + } } }//GEN-LAST:event_modifyStepButtonActionPerformed @@ -989,6 +996,13 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ if(selectedPath != null){ TreeNode someBBSStepNode = (TreeNode)selectedPath.getLastPathComponent(); logger.trace("BBS Step Node to be supplied with child : "+someBBSStepNode.getName()); + if(!someBBSStepNode.getName().equals("Strategy Steps")){ + BBSStepInputDialog bbsStepDialog = new BBSStepInputDialog(this.itsMainFrame,false,null); + bbsStepDialog.setVisible(true); + } + + + } }//GEN-LAST:event_addStepButtonActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java index 9f767773f4b..121090bda70 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java @@ -40,23 +40,25 @@ public class BBSStep{ //Step Name private String name; //Step Baseline Selection - private String[] station1Selection; - private String[] station2Selection; + private Vector<String> station1Selection = null; + private Vector<String> station2Selection = null; //Step Sources - private String[] peelSources; - private String[] predictSources; + private Vector<String> sources = null; + private Vector<String> extraSources = null; //Step Instrument Model - private String[] instrumentModel; + private Vector<String> instrumentModel = null; //Step Integration - private double integrationFrequency; - private double integrationTime; + private double integrationFrequency = -1; + private double integrationTime = -1; //Step Correlation - private String correlationSelection; - private String[] correlationType; + private String correlationSelection = null; + private Vector<String> correlationType = null; //Step Output Data Column - private String outputDataColumn; + private String outputDataColumn = null; //TODO: Step Operation Types + + /** Creates a new instance of BBSStep */ public BBSStep(String name) { this.name=name; @@ -72,6 +74,114 @@ public class BBSStep{ this.name = name; } + public Vector<String> getStation1Selection(){ + if(parentStep!=null && station1Selection == null){ + return parentStep.getStation1Selection(); + } + return station1Selection; + } + + public void setStation1Selection(Vector<String> station1Selection){ + this.station1Selection = station1Selection; + } + public Vector<String> getStation2Selection(){ + if(parentStep!=null && station2Selection == null){ + return parentStep.getStation2Selection(); + } + return station2Selection; + } + + public void setStation2Selection(Vector<String> station2Selection){ + this.station2Selection = station2Selection; + } + public Vector<String> getSources(){ + if(parentStep!=null && sources == null){ + return parentStep.getSources(); + } + return sources; + } + + public void setSources(Vector<String> sources){ + this.sources = sources; + } + + public Vector<String> getExtraSources(){ + if(parentStep!=null && extraSources == null){ + return parentStep.getExtraSources(); + } + return extraSources; + } + + public void setExtraSources(Vector<String> extraSources){ + this.extraSources = extraSources; + } + + public Vector<String> getInstrumentModel(){ + if(parentStep!=null && instrumentModel == null){ + return parentStep.getInstrumentModel(); + } + return instrumentModel; + } + + public void setInstrumentModel(Vector<String> instrumentModel){ + this.instrumentModel = instrumentModel; + } + + public double getIntegrationFrequency(){ + if(parentStep!=null && integrationFrequency == -1){ + return parentStep.getIntegrationFrequency(); + } + return integrationFrequency; + } + + public void setIntegrationFrequency(double integrationFrequency){ + this.integrationFrequency = integrationFrequency; + } + + public double getIntegrationTime(){ + if(parentStep!=null && integrationTime == -1){ + return parentStep.getIntegrationTime(); + } + return integrationTime; + } + + public void setIntegrationTime(double integrationTime){ + this.integrationTime = integrationTime; + } + + public String getCorrelationSelection(){ + if(parentStep!=null && correlationSelection == null){ + return parentStep.getCorrelationSelection(); + } + return correlationSelection; + } + + public void setCorrelationSelection(String correlationSelection){ + this.correlationSelection = correlationSelection; + } + + public Vector<String> getCorrelationType(){ + if(parentStep!=null && correlationType == null){ + return parentStep.getCorrelationType(); + } + return correlationType; + } + + public void setCorrelationType(Vector<String> correlationType){ + this.correlationType = correlationType; + } + + public String getOutputDataColumn(){ + if(parentStep!=null && outputDataColumn == null){ + return parentStep.getOutputDataColumn(); + } + return outputDataColumn; + } + + public void setOutputDataColumn(String name){ + this.name = name; + } + public BBSStep getParentStep(){ return parentStep; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java index 48112477fb2..76bea6268bb 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java @@ -53,13 +53,13 @@ public class BBSStepDataManager{ return instance; } - public Vector<BBSStepNode> buildStepTree(BBSStepNode aRootNode, boolean buildStrategyStepTree) throws RemoteException{ + public Vector<BBSStepNode> buildStepTree(BBSStepNode stepContainerNode, boolean buildStrategyStepTree) throws RemoteException{ Vector<BBSStepNode> returnNode = new Vector<BBSStepNode>(); //Fetch the step names that are mentioned in the strategy tree (Strategy.Steps) //The following otdbnode should be the Step container node (Step) - jOTDBnode rootNode = aRootNode.getOTDBNode(); + jOTDBnode rootNode = stepContainerNode.getOTDBNode(); jOTDBnode strategyStepsParameter=null; Vector HWchilds = null; @@ -142,6 +142,26 @@ public class BBSStepDataManager{ strategyStepsParameter = aHWNode; logger.trace("Strategy Steps defined :"+strategyStepsParameter.limits); } + if (aHWNode.leaf && aHWNode.name.equals("Sources")) { + parentNode.setSources(this.getVectorFromString(aHWNode.limits,true)); + + } + if (aHWNode.leaf && aHWNode.name.equals("ExtraSources")) { + parentNode.setExtraSources(this.getVectorFromString(aHWNode.limits,true)); + + } + if (aHWNode.leaf && aHWNode.name.equals("InstrumentModel")) { + strategyStepsParameter = aHWNode; + + } + if (aHWNode.leaf && aHWNode.name.equals("Operation")) { + strategyStepsParameter = aHWNode; + + } + if (aHWNode.leaf && aHWNode.name.equals("OutData")) { + strategyStepsParameter = aHWNode; + + } } if(strategyStepsParameter!=null){ //retrieve the step names mentioned in the strategy steps parameter (Strategy.Steps) @@ -159,9 +179,10 @@ public class BBSStepDataManager{ if (!aHWNode.leaf && strategySteps.contains(aHWNode.name)) { //Create a new step and build it (with its substeps as well) BBSStep newStep = new BBSStep(aHWNode.name); + //build its childsteps recursively buildStep(newStep,aHWNode); parentNode.addChildStep(newStep); - logger.trace("Strategy Step defined : "+newStep.getName()); + logger.trace("Step defined : "+newStep.getName()); } } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form index f4965bcd6aa..ca774cc2529 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form @@ -143,11 +143,7 @@ <Component class="javax.swing.JList" name="stepExplorerInstrumentModelList"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="3"> - <StringItem index="0" value="Bandpass"/> - <StringItem index="1" value="DirGain"/> - <StringItem index="2" value="Phase"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -755,9 +751,6 @@ </Layout> <SubComponents> <Component class="javax.swing.JTextField" name="stepExplorerOutputDataText"> - <Properties> - <Property name="text" type="java.lang.String" value="OUTDATA2"/> - </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> <AbsoluteConstraints x="10" y="30" width="140" height="20"/> @@ -1143,12 +1136,7 @@ <Component class="javax.swing.JList" name="stepExplorerSourcesList1"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="4"> - <StringItem index="0" value="3C347"/> - <StringItem index="1" value="3C348"/> - <StringItem index="2" value="3C349"/> - <StringItem index="3" value="3C350"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -1261,12 +1249,7 @@ <Component class="javax.swing.JList" name="stepExplorerSourcesList"> <Properties> <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> - <StringArray count="4"> - <StringItem index="0" value="3C343"/> - <StringItem index="1" value="3C344"/> - <StringItem index="2" value="3C345"/> - <StringItem index="3" value="3C346"/> - </StringArray> + <StringArray count="0"/> </Property> </Properties> </Component> @@ -1291,6 +1274,7 @@ </Component> <Component class="javax.swing.JTextField" name="stepExplorerStepNameText"> <Properties> + <Property name="editable" type="boolean" value="false"/> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Dialog" size="18" style="1"/> </Property> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java index 0956eb85317..ce497c4591a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java @@ -36,6 +36,7 @@ import nl.astron.lofar.sas.otb.jotdb2.jOTDBnode; import nl.astron.lofar.sas.otb.jotdb2.jOTDBparam; import nl.astron.lofar.sas.otb.util.IViewPanel; import nl.astron.lofar.sas.otb.util.UserAccount; +import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStep; import org.apache.log4j.Logger; /** @@ -86,37 +87,16 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } public void setContent(Object anObject) { - itsNode=(jOTDBnode)anObject; - jOTDBparam aParam=null; - try { - //we need to get all the childs from this node. - Vector childs = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1); + + if(anObject instanceof BBSStep){ + itsBBSStep=(BBSStep)anObject; + fillBBSGui(itsBBSStep); + stepExplorerStepNameText.setEditable(false); + + }else if(anObject instanceof jOTDBnode){ + itsNode=(jOTDBnode)anObject; - // get all the params per child - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { - aParam=null; - jOTDBnode aNode = (jOTDBnode)e.nextElement(); - - // We need to keep all the nodes needed by this panel - // if the node is a leaf we need to get the pointed to value via Param. - if (aNode.leaf) { - aParam = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getParam(aNode); - setField(itsNode,aParam,aNode); - - //we need to get all the childs from the following nodes as well. - }else if (LofarUtils.keyName(aNode.name).equals("ParmDB")) { - this.retrieveAndDisplayChildDataForNode(aNode); - }else if (LofarUtils.keyName(aNode.name).equals("BBDB")) { - this.retrieveAndDisplayChildDataForNode(aNode); - } - } - } catch (RemoteException ex) { - logger.debug("Error during getComponentParam: "+ ex); - itsParamList=null; - return; } - initPanel(); } @@ -164,50 +144,22 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan */ public void popupMenuHandler(java.awt.event.ActionEvent evt) { } - /** Restore original Values in Detauks panel - */ - private void retrieveAndDisplayChildDataForNode(jOTDBnode aNode){ - jOTDBparam aParam=null; - try { - Vector HWchilds = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1); - // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); - aParam=null; - // We need to keep all the params needed by this panel - if (aHWNode.leaf) { - aParam = itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().getParam(aHWNode); - } - setField(aNode,aParam,aHWNode); - } - } catch (RemoteException ex) { - logger.debug("Error during retrieveAndDisplayChildDataForNode: "+ ex); - return; - } - } - /** Restore original Values in Global Settings panel */ private void restoreBBSStepExplorerPanel() { - /* - // Global Settings parameters - this.BBSDatasetText.setText(dataSet.limits); - this.BBDBHostText.setText(BBDBHost.limits); - this.BBDBPortText.setText(BBDBPort.limits); - this.BBDBDBNameText.setText(BBDBDBName.limits); - this.BBDBDBUsernameText.setText(BBDBUsername.limits); - this.BBDBDBPasswordText.setText(BBDBPassword.limits); - this.ParmDBInstrumentText.setText(ParmDBInstrument.limits); - this.ParmDBLocalSkyText.setText(ParmDBLocalSky.limits); - */ + // Global Settings parameters + if(itsBBSStep != null){ + this.stepExplorerStepNameText.setText(itsBBSStep.getName()); + } } private void initialize() { buttonPanel1.addButton("Save Settings"); + if(itsBBSStep == null){ + stepExplorerStepNameText.setEditable(true); + } } private void initPanel() { @@ -232,100 +184,13 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } else { logger.debug("ERROR: no node given"); } + } /* Set's the different fields in the GUI */ - private void setField(jOTDBnode parent, jOTDBparam aParam, jOTDBnode aNode) { - // OLAP_HW settings - if (aParam==null) { - return; - } - boolean isRef = LofarUtils.isReference(aNode.limits); - String aKeyName = LofarUtils.keyName(aNode.name); - String parentName = String.valueOf(parent.name); - /* - if (aKeyName.equals("DataSet")) { - this.BBSDatasetText.setToolTipText(aParam.description); - this.dataSet=aNode; - - if (isRef && aParam != null) { - this.BBSDatasetDeRefText.setVisible(true); - BBSDatasetText.setText(aNode.limits); - BBSDatasetDeRefText.setText(aParam.limits); - } else { - BBSDatasetDeRefText.setVisible(false); - BBSDatasetDeRefText.setText(""); - BBSDatasetText.setText(aNode.limits); - } - }else if (aKeyName.equals("DBName")) { - this.BBDBDBNameText.setToolTipText(aParam.description); - this.BBDBDBName=aNode; - if (isRef && aParam != null) { - BBDBDBNameText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBNameText.setText(aNode.limits); - } - }else if (aKeyName.equals("Host")) { - this.BBDBHostText.setToolTipText(aParam.description); - this.BBDBHost=aNode; - if (isRef && aParam != null) { - BBDBHostText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBHostText.setText(aNode.limits); - } - }else if (aKeyName.equals("Port")) { - this.BBDBPortText.setToolTipText(aParam.description); - this.BBDBPort=aNode; - if (isRef && aParam != null) { - BBDBPortText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBPortText.setText(aNode.limits); - } - }else if (aKeyName.equals("UserName")) { - this.BBDBDBUsernameText.setToolTipText(aParam.description); - this.BBDBUsername=aNode; - if (isRef && aParam != null) { - BBDBDBUsernameText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBUsernameText.setText(aNode.limits); - } - }else if (aKeyName.equals("PassWord")) { - this.BBDBDBPasswordText.setToolTipText(aParam.description); - this.BBDBPassword=aNode; - if (isRef && aParam != null) { - BBDBDBPasswordText.setText(aNode.limits + " : " + aParam.limits); - } else { - BBDBDBPasswordText.setText(aNode.limits); - } - }else if (aKeyName.equals("Instrument")) { - this.ParmDBInstrumentText.setToolTipText(aParam.description); - this.ParmDBInstrument=aNode; - if (isRef && aParam != null) { - ParmDBInstrumentText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBInstrumentText.setText(aNode.limits); - } - }else if (aKeyName.equals("LocalSky")) { - this.ParmDBLocalSkyText.setToolTipText(aParam.description); - this.ParmDBLocalSky=aNode; - if (isRef && aParam != null) { - ParmDBLocalSkyText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBLocalSkyText.setText(aNode.limits); - } - }*/ - } - - /** saves the given param back to the database - */ - private void saveNode(jOTDBnode aNode) { - if (aNode == null) { - return; - } - try { - itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().saveNode(aNode); - } catch (RemoteException ex) { - logger.debug("Error: saveNode failed : " + ex); - } + private void fillBBSGui(BBSStep theBBSStep) { + + this.stepExplorerStepNameText.setText(theBBSStep.getName()); + //TODO: Add variables from BBSStep } /** Enables/disables the buttons @@ -365,7 +230,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan dataSet.limits = BBSDatasetText.getText(); logger.trace("Variable BBS ("+dataSet.name+"//"+dataSet.treeID()+"//"+dataSet.nodeID()+"//"+dataSet.parentID()+"//"+dataSet.paramDefID()+") from value ("+BBSDatasetText.getText()+") updated to :"+dataSet.limits); saveNode(dataSet); - } + } if (this.BBDBHost != null && !this.BBDBHostText.getText().equals(BBDBHost.limits)) { BBDBHost.limits = BBDBHostText.getText(); logger.trace("Variable BBS ("+BBDBHost.name+"//"+BBDBHost.treeID()+"//"+BBDBHost.nodeID()+"//"+BBDBHost.parentID()+"//"+BBDBHost.paramDefID()+") updated to :"+BBDBHost.limits); @@ -513,11 +378,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerInstrumentModelPanel.setLayout(new java.awt.BorderLayout()); stepExplorerInstrumentModelPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Instrument Model")); - stepExplorerInstrumentModelList.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "Bandpass", "DirGain", "Phase" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerInstrumentModelScrollPane.setViewportView(stepExplorerInstrumentModelList); stepExplorerInstrumentModelPanel.add(stepExplorerInstrumentModelScrollPane, java.awt.BorderLayout.CENTER); @@ -719,7 +579,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerOutputDataPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); stepExplorerOutputDataPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Output Data Column")); - stepExplorerOutputDataText.setText("OUTDATA2"); stepExplorerOutputDataPanel.add(stepExplorerOutputDataText, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 140, 20)); stepExplorerPanel.add(stepExplorerOutputDataPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 230, 160, 120)); @@ -880,11 +739,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerSourcesPanel1.add(stepExplorerSourcesModsPanel1, java.awt.BorderLayout.SOUTH); - stepExplorerSourcesList1.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "3C347", "3C348", "3C349", "3C350" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerSourcesScrollPane1.setViewportView(stepExplorerSourcesList1); stepExplorerSourcesPanel1.add(stepExplorerSourcesScrollPane1, java.awt.BorderLayout.CENTER); @@ -922,11 +776,6 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerSourcesPanel.add(stepExplorerSourcesModsPanel, java.awt.BorderLayout.SOUTH); - stepExplorerSourcesList.setModel(new javax.swing.AbstractListModel() { - String[] strings = { "3C343", "3C344", "3C345", "3C346" }; - public int getSize() { return strings.length; } - public Object getElementAt(int i) { return strings[i]; } - }); stepExplorerSourcesScrollPane.setViewportView(stepExplorerSourcesList); stepExplorerSourcesPanel.add(stepExplorerSourcesScrollPane, java.awt.BorderLayout.CENTER); @@ -939,6 +788,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan stepExplorerStepNameLabel.setText("Step"); stepExplorerPanel.add(stepExplorerStepNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 10, -1, 30)); + stepExplorerStepNameText.setEditable(false); stepExplorerStepNameText.setFont(new java.awt.Font("Dialog", 1, 18)); stepExplorerStepNameText.setToolTipText("This is the name of the displayed step"); stepExplorerPanel.add(stepExplorerStepNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 10, 250, 30)); @@ -950,7 +800,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan add(BBSStepExplorerPanel, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents - + private void stepExplorerRevertButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stepExplorerRevertButtonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_stepExplorerRevertButtonActionPerformed @@ -965,30 +815,30 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel implements IViewPan } }//GEN-LAST:event_baselineUseAllCheckboxStateChanged - + private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed if(evt.getActionCommand() == "Save Settings") { saveInput(); } }//GEN-LAST:event_buttonPanel1ActionPerformed + private BBSStep itsBBSStep = null; private jOTDBnode itsNode = null; private MainFrame itsMainFrame; - private Vector<jOTDBparam> itsParamList; /*modify to step explorer panels // Global Settings parameters private jOTDBnode dataSet; - + private jOTDBnode BBDBHost; private jOTDBnode BBDBPort; private jOTDBnode BBDBDBName; private jOTDBnode BBDBUsername; private jOTDBnode BBDBPassword; - + private jOTDBnode ParmDBInstrument; private jOTDBnode ParmDBLocalSky; - */ + */ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel BBSStepExplorerPanel; private javax.swing.JPanel BaselineSelectionPanel; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.form new file mode 100644 index 00000000000..a03b592d873 --- /dev/null +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.form @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + </SyntheticProperties> + <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="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="sePanel" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" 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="sePanel" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel" name="sePanel"> + </Component> + </SubComponents> +</Form> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.java new file mode 100644 index 00000000000..5a36b3f680d --- /dev/null +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepInputDialog.java @@ -0,0 +1,77 @@ +/* + * BBSStepInputDialog.java + * + * Created on July 31, 2006, 2:14 PM + */ + +package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; + +import nl.astron.lofar.sas.otb.MainFrame; + + +/** + * Dialog that contains a panel for BBS Step Explorer + * + * @created 31-07-2006, 13:37 + * + * @author pompert + * + * @version $Id$ + */ +public class BBSStepInputDialog extends javax.swing.JDialog { + + /** Creates new form BBSStepInputDialog */ + public BBSStepInputDialog(MainFrame parent, boolean modal, BBSStep tobeDisplayedBBSStep) { + super(parent, modal); + initComponents(); + this.sePanel.setMainFrame(parent); + this.sePanel.setContent(tobeDisplayedBBSStep); + + } + + /** 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() { + sePanel = new nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(sePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(sePanel, 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)) + ); + pack(); + }// </editor-fold>//GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new BBSStepInputDialog(null, true,null).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private nl.astron.lofar.sas.otbcomponents.bbs.BBSStepExplorerPanel sePanel; + // End of variables declaration//GEN-END:variables + +} -- GitLab