Example #1
0
  @Override
  protected Widget getContent() {

    VerticalPanel panel = new VerticalPanel();
    Paragraph introduction =
        new Paragraph(
            "Vous trouverez ci-dessous une"
                + " liste de questions que vous pourriez vous poser à propos de"
                + " cette application.");
    introduction.addStyleName("indent");
    panel.add(introduction);

    DecoratedStackPanel stackPanel = new DecoratedStackPanel();
    panel.add(stackPanel);

    String question;
    HTML answer;
    String header;
    String image = new String();
    FAQResourcesBundle resources = GWT.create(FAQResourcesBundle.class);
    XMLReader xml = new XMLReader(resources.FAQ());

    for (int i = 0; i < xml.getLength(); ++i) {
      question = new String(xml.getQuestion(i));
      answer = new HTML(xml.getAnswer(i));
      answer.addStyleName("justify");
      image = xml.getImage(i);
      header = new String(getHeaderString(question, this.getImage(image)));
      stackPanel.add(answer, header, true);
    }

    return panel;
  }
 public void setText(String text) {
   label.setText(text);
 }