/**
* Show the gui for jud management
* @return Form
*/
public void getGuiJudMenu() {
Form res = new Form("Search");
if (infopool.containsKey("register")){
res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
TextField tf = new TextField( "", 32);
TextField tf2 = new TextField( "", 32);
TextField tf3 = new TextField( "", 64);
infopool.put("jud_name", tf);
infopool.put("jud_surname", tf2);
infopool.put("jud_mail", tf3);
res.addComponent(new MyLabel("Name"));
res.addComponent(tf);
res.addComponent(new MyLabel("Surname"));
res.addComponent(tf2);
res.addComponent(new MyLabel("Mail"));
res.addComponent(tf3);
}
else if (infopool.containsKey("search")) {
res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
//TextField tf = new TextField("", 32);
TextField tf2 = new TextField( "", 32);
TextField tf3 = new TextField("", 32);
TextField tf4 = new TextField( "", 32);
TextField tf5 = new TextField("", 32);
//infopool.put("jud_username", tf);
infopool.put("jud_name", tf2);
infopool.put("jud_surname", tf3);
infopool.put("jud_nick", tf4);
infopool.put("jud_mail", tf5);
res.addComponent(new MyLabel("Nick"));
res.addComponent(tf4);
res.addComponent(new MyLabel("Name"));
res.addComponent(tf2);
res.addComponent(new MyLabel("Surname"));
res.addComponent(tf3);
//res.addComponent(new MyLabel("Username"));
//res.addComponent(tf);
res.addComponent(new MyLabel("Mail"));
res.addComponent(tf5);
}
else {
res.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
Image[] img = new Image[]{Contents.displayImage("connected"), Contents.displayImage("unsubscribed")};
ButtonActionListener action = new ButtonActionListener();
for (int k=0; k<Contents.judChoices.length; k++) {
Button b = new Button(Contents.judChoices[k], img[k]);
b.getStyle().setBgTransparency(100);
b.setTextPosition(Button.RIGHT);
b.addActionListener(action);
res.addComponent(b);
}
if (infopool.containsKey("jud_message"))
{
MyTextArea t = new MyTextArea((String)infopool.remove("jud_message"));
res.addComponent(t);
}
infopool.put("jud_form", res);
}
res.addCommand(Contents.ok);
res.addCommand(Contents.back);
res.setCommandListener(this);
res.show();
}