Skip to content
Snippets Groups Projects
Commit b99d899c authored by Arthur Coolen's avatar Arthur Coolen
Browse files

Task #3311: solved error in ParSetMetaViewPanel, no mouseclick trigger.

parent 084fcf68
No related branches found
No related tags found
No related merge requests found
......@@ -40,75 +40,75 @@ import java.util.Set;
*
*/
public class ConfigPanelHelper {
private HashMap<String,ArrayList<String> > itsPanelMap;
private ArrayList<String> itsArrayList;
private static ConfigPanelHelper ref;
/** Creates a new instance of ConfigPanelHelper */
private ConfigPanelHelper() {
initMap();
}
public static synchronized ConfigPanelHelper getConfigPanelHelper() {
if (ref== null) {
ref = new ConfigPanelHelper();
}
return ref;
}
@Override
public Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
private void initMap() {
itsPanelMap = new HashMap<>();
//generic panels
itsArrayList = new ArrayList<>();
addBasePanels();
itsPanelMap.put("*",itsArrayList);
//BBS
// itsVector = new Vector<String>();
// itsVector.add("nl.astron.lofar.sas.otbcomponents.bbs.BBSPanel");
// itsArrayList = new ArrayList<>();
// itsArrayList.add("nl.astron.lofar.sas.otbcomponents.bbs.BBSPanel");
// itsPanelMap.put("BBSControl",itsVector);
// addParSetPanel();
//BBS Strategy
// itsVector = new Vector<String>();
// itsVector.add("nl.astron.lofar.sas.otbcomponents.bbs.BBSStrategyPanel");
// itsArrayList = new ArrayList<>();
// itsArrayList.add("nl.astron.lofar.sas.otbcomponents.bbs.BBSStrategyPanel");
// itsPanelMap.put("Strategy",itsVector);
// addParSetPanel();
//OLAP
itsArrayList = new ArrayList<>();
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.OlapPanel");
itsPanelMap.put("OLAP",itsArrayList);
addParSetPanel();
// Observation
itsArrayList = new ArrayList<>();
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ObservationPanel");
itsPanelMap.put("Observation",itsArrayList);
addParSetPanel();
//TBB
itsArrayList = new ArrayList<>();
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.TBBConfigPanel");
itsPanelMap.put("TBB",itsArrayList);
addParSetPanel();
//Imager
itsArrayList = new ArrayList<>();
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ImagerPanel");
itsPanelMap.put("Imager",itsArrayList);
addParSetPanel();
}
private void addBasePanels() {
//generic node panel
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel");
......@@ -116,7 +116,7 @@ public class ConfigPanelHelper {
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel");
addParSetPanel();
}
private void addParSetPanel() {
//generic parset view panel
itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParSetViewPanel");
......@@ -145,7 +145,7 @@ public class ConfigPanelHelper {
}
return returnVector;
}
/**
* Returns all keys kept in this class
*
......@@ -174,6 +174,6 @@ public class ConfigPanelHelper {
}
return returnBool;
}
}
......@@ -472,20 +472,21 @@ public class ParSetMetaViewPanel extends javax.swing.JPanel implements IViewPane
}//GEN-LAST:event_jScrollPane1MouseClicked
private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
String aS= (String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(), 1);
String newS = "";
// add newlines per 80 chars to be able to have a smaller sized popupwindow
for (int i=0; i< aS.length();i++) {
newS=newS.concat(aS.substring(i, i+1));
if ((i+1)%80==0) {
newS=newS.concat("\n");
if (jTable1.getSelectedRow() == -1) return;
String aS= (String)jTable1.getModel().getValueAt(jTable1.getSelectedRow(), 1);
String newS = "";
// add newlines per 80 chars to be able to have a smaller sized popupwindow
for (int i=0; i< aS.length();i++) {
newS=newS.concat(aS.substring(i, i+1));
if ((i+1)%80==0) {
newS=newS.concat("\n");
}
}
}
//popup the result
JOptionPane.showMessageDialog(this,newS,
"Show full row value",
JOptionPane.INFORMATION_MESSAGE);
//popup the result
JOptionPane.showMessageDialog(this,newS,
"Show full row value",
JOptionPane.INFORMATION_MESSAGE);
}//GEN-LAST:event_jTable1MouseClicked
private jOTDBnode itsNode = null;
......
......@@ -22,7 +22,7 @@
<!-- Properties that can be used throughout the POM as a substitution,
and are used as filters in resources if enabled. -->
<properties>
<lofar.lib.version>1.8.1</lofar.lib.version>
<lofar.lib.version>1.8.2-SNAPSHOT</lofar.lib.version>
</properties>
......
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