Esempio n. 1
0
  /** Execute the command. */
  @Override
  @SuppressWarnings("nls")
  public final void execute() {
    /* FIXME: implement command */
    Form f = new Form();

    InputString title = new InputString(f, "New title: ");
    f.parse();
    entity().setTitle(title.toString());
  }
Esempio n. 2
0
  /** Execute the command. */
  @Override
  @SuppressWarnings("nls")
  public final void execute() {
    Form form = new Form();
    InputInteger localIdInput = new InputInteger(form, Message.requestSectionId());
    InputString titleInput = new InputString(form, Message.requestSectionTitle());
    form.parse();

    entity().addSection(new Section(titleInput.value()), localIdInput.value());
  }
Esempio n. 3
0
  /** Execute the command. */
  @Override
  @SuppressWarnings("nls")
  public final void execute() throws InvalidOperation {
    Document document = new Document();
    Display display = new Display();

    Form f = new Form();
    InputString inS = new InputString(f, Message.openFile());
    f.parse();

    if (entity().getDocument().loadDocument(inS.value()) != null)
      entity().setDocument(document.loadDocument(inS.value()));
    else {
      display.add(Message.fileNotFound());
      display.display();
    }
  }