/**
* TestIvySwing, a swing Ivy Java example to probe the Ivy software bus.
*
* @author Yannick Jestin
* @author http://www.tls.cena.fr/products/ivy/
*
* (c) CENA
*
* it relies on the Swing toolkit, which is not standard on jdk1.1 platforms,
* if you don't have swing, your can use TestIvy.
*
* New:
* 1.2.3: use of Vector.addElement instead of add() and the old Properties
* model
*
*/
import java.awt.BorderLayout;
import java.awt.event.*;
import javax.swing.* ;
import gnu.getopt.Getopt ;
import fr.dgac.ivy.*;
import java.util.*;
class TestIvySwing extends JPanel implements IvyApplicationListener {
public static final String helpmsg = "usage: java TestIvySwing [options]\n\t-b BUS\tspecifies the Ivy bus domain\n\t-q\tquiet, no tty output\n\t-d\tdebug\n\t-h\thelp\n";
public static final int WIDTH=30;
public static final int HEIGHT=30;
private static int index;
private static int nbTIS=0;
private String localname;
private Ivy bus ;
private String domain;
private String regexp = "(.*)";
private JLabel laRegex;
private JTextArea ta ;
private JTextField tfRegex, tfSend ;
private JButton buApply, buSend, buClear ;
private JComboBox ports;
private int regexp_id;
private REGCB reg;
private java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("hh:mm:ss");
private static String[] startDomainList = {
"127.255.255.255:2010",
"10.192.36:3110",
"10.0.0:54321",
"228.1.2.4:4567",
};
private static java.util.Vector domainList;
static {
// initialize the domainlist
domainList = new java.util.Vector();
for (int i = 0; i