displayFullDetails(null);\r
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
\r
- capabilities.addListSelectionListener(this);\r
- coords1.addListSelectionListener(this);\r
- coords2.addListSelectionListener(this);\r
+ filter1.addListSelectionListener(this);\r
+ filter2.addListSelectionListener(this);\r
+ filter3.addListSelectionListener(this);\r
\r
//Ask to be notified of selection changes.\r
ListSelectionModel rowSM = table.getSelectionModel();\r
\r
private void setCapabilities(DasSource[] sources)\r
{\r
- Vector vcapabilities = new Vector();\r
- Vector vcoords = new Vector();\r
- Vector vcoords2 = new Vector();\r
+ Vector authority = new Vector();\r
+ Vector type = new Vector();\r
+ Vector label = new Vector();\r
\r
- vcapabilities.addElement("All");\r
- vcoords.addElement("All");\r
- vcoords2.addElement("All");\r
+ authority.addElement("Any");\r
+ type.addElement("Any");\r
+ label.addElement("Any");\r
+ label.addElement("NOT IMPLEMENTED YET");\r
+ filter3.setEnabled(false);\r
\r
for (int i = 0; i < sources.length; i++)\r
{\r
DasSource ds = sources[i];\r
- String[] scap = ds.getCapabilities();\r
- for (int s = 0; s < scap.length; s++)\r
- {\r
- if (!vcapabilities.contains(scap[s]))\r
- {\r
- vcapabilities.addElement(scap[s]);\r
- }\r
- }\r
\r
DasCoordinateSystem[] dcs = ds.getCoordinateSystem();\r
\r
for (int j = 0; j < dcs.length; j++)\r
{\r
- if (!vcoords.contains(dcs[j].getCategory()))\r
- vcoords.addElement(dcs[j].getCategory());\r
+ if (!type.contains(dcs[j].getCategory()))\r
+ type.addElement(dcs[j].getCategory());\r
+\r
+ if (!authority.contains(dcs[j].getName()))\r
+ authority.addElement(dcs[j].getName());\r
+ }\r
\r
- if (!vcoords2.contains(dcs[j].getName()))\r
- vcoords2.addElement(dcs[j].getName());\r
+ String[] slabels = ds.getLabels();\r
+ for (int s = 0; s < slabels.length; s++)\r
+ {\r
+ if (!label.contains(slabels[s]))\r
+ {\r
+ label.addElement(slabels[s]);\r
+ }\r
}\r
+\r
}\r
\r
- capabilities.setListData(vcapabilities);\r
- coords1.setListData(vcoords);\r
- coords2.setListData(vcoords2);\r
+ filter1.setListData(authority);\r
+ filter2.setListData(type);\r
+ filter3.setListData(label);\r
\r
javax.swing.SwingUtilities.invokeLater(new Runnable()\r
{\r
public void run()\r
{\r
- capabilities.setSelectedIndex(0);\r
- coords1.setSelectedIndex(0);\r
- coords2.setSelectedIndex(0);\r
+ filter1.setSelectedIndex(0);\r
+ filter2.setSelectedIndex(0);\r
+ filter3.setSelectedIndex(0);\r
}\r
});\r
}\r
{\r
ds = dasSources[i];\r
\r
- if (!selectedInList(capabilities, ds.getCapabilities()))\r
+ if (!selectedInList(filter3, ds.getLabels()))\r
{\r
continue;\r
}\r
DasCoordinateSystem[] dcs = ds.getCoordinateSystem();\r
for (int j = 0; j < dcs.length; j++)\r
{\r
- if (selectedInList(coords1, new String[]\r
- {dcs[j].getCategory()})\r
- && selectedInList(coords2, new String[]\r
- {dcs[j].getName()}))\r
+ if (selectedInList(filter1, new String[]\r
+ {dcs[j].getName()})\r
+ && selectedInList(filter2, new String[]\r
+ {dcs[j].getCategory()}))\r
{\r
names.add(ds.getNickname());\r
selected.add(new Boolean(\r
Object[] selection = list.getSelectedValues();\r
for (int i = 0; i < selection.length; i++)\r
{\r
- if (selection[i].equals("All"))\r
+ if (selection[i].equals("Any"))\r
return true;\r
\r
for (int j = 0; j < items.length; j++)\r