Unidata IDV Workshop for version 6.3 > Java Developer Topics > Data Choosers
5.4.1 Creating a Weather Text Data Chooser
Let's see how we can access weather text bulletins from an ADDE server.
- Start the Example IDV
- From the Dashboard, select the
Data Chooser
tab.
- Select the
URLs
Chooser. The IDV can use
the ADDE URL syntax to access weather text on a remote server.
- Paste the following URL into the
text box:
adde://adde.ucar.edu/wxtext?apro=zfp&astn=mkx
and click the Add Source
button.
- In this case, the IDV handles the URL as an input stream and
by default displays it in the TextDisplayControl. However, having to
type in an obscure URL syntax is not the ultimate User Interface.
- Exit the IDV.
Let's create a chooser that allows the user to select from some
predefined products.
- cd to /home/idv/idv/ucar/unidata/apps/example
- Open
WxTextChooser.java
in an editor and let's look what's
there.
- Exit the editor and compile the class
- Copy chooser.xml from the resources directory to the current
directory.
cp resources/chooser.xml .
- Open the file in an editor and look at what's defined.
- Exit the editor.
- Start the IDV.
- From the Dashboard, select the
Data Chooser
tab.
Notice that our chooser is there. Select a server, product and station
and click the Add Source
button. Try this with different
products. If you know some codes and station ids, try them as well.
- Now let's look at having a custom Data Source to handle our
data.
Unidata IDV Workshop for version 6.3 > Java Developer Topics > Data Choosers