if (af.getViewport().featuresDisplayed == null || fr.renderOrder==null)\r
fr.findAllFeatures();\r
\r
-\r
setTableData();\r
\r
frame = new JInternalFrame();\r
frame.setLayer(JLayeredPane.PALETTE_LAYER);\r
}\r
\r
- public void setTableData()\r
+ synchronized public void setTableData()\r
{\r
alignmentHasFeatures = false;\r
\r
{\r
visible = ( (Boolean) fr.featureGroups.get(group)).booleanValue();\r
}\r
- else\r
- {\r
- fr.featureGroups.put(group, new Boolean(visible));\r
+\r
if (groupPanel == null)\r
{\r
groupPanel = new JPanel();\r
}\r
\r
+ boolean alreadyAdded = false;\r
+ for(int g=0; g<groupPanel.getComponentCount(); g++)\r
+ {\r
+ if(((JCheckBox)groupPanel.getComponent(g))\r
+ .getText().equals(group))\r
+ {\r
+ alreadyAdded = true;\r
+ break;\r
+ }\r
+ }\r
+\r
+ if(alreadyAdded)\r
+ continue;\r
+\r
+ fr.featureGroups.put(group, new Boolean(visible));\r
+\r
final JCheckBox check = new JCheckBox(group, visible);\r
check.setFont(new Font("Serif", Font.BOLD, 12));\r
check.addItemListener(new ItemListener()\r
});\r
groupPanel.add(check);\r
}\r
- }\r
-\r
}\r
\r
if (!allFeatures.contains(tmpfeatures[index].getType()))\r