}
if (node.getType() == TreeNode.COOKIE_NODE) {
Cookie param = (Cookie) node;
JLabel l1 = new JLabel("Cookie: ");
l1.setFont(f);
l1.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(l1);
String v = param.getName();
name = new JTextField(v, v.length() + 2);
name.addKeyListener(this);
name.setFont(f);
name.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(name);
JLabel l2 = new JLabel("Regexp: ");
l2.setFont(f);
l2.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(l2);
v = param.getRegexp();
value = new JTextField(v, v.length() + 4);
value.addKeyListener(this);
value.setFont(f);
value.setAlignmentY(Component.CENTER_ALIGNMENT);
value.addFocusListener(new FocusListener() {
public void focusGained(FocusEvent evt) {
value.selectAll();
}
public void focusLost(FocusEvent ev) {
hideSelectionDialog();
}
});
p.add(value);
required.setOpaque(true);
required.setContentAreaFilled(false);
required.addKeyListener(this);
required.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(required);
p.setFont(new Font("Monospaced", Font.PLAIN, 13));
}
if (node.getType() == TreeNode.PARAMETER_NODE) {
scopes = new String[] { "any", "body", "header" };
this.scope = new JComboBox(scopes);
Parameter param = (Parameter) node;
JLabel l1 = new JLabel("Parameter: ");
l1.setFont(f);
l1.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(l1);
String v = param.getName();
name = new JTextField(v, v.length() + 2);
name.addKeyListener(this);
name.setFont(f);
name.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(name);
JLabel l2 = new JLabel("Type: ");
l2.setFont(f);
l2.setAlignmentY(Component.CENTER_ALIGNMENT);
p.add(l2);
v = param.getRegexp();
value = new JTextField(v, v.length() + 4);
value.addKeyListener(this);
value.addFocusListener(this);
value.setFont(f);
value.setAlignmentY(Component.CENTER_ALIGNMENT);