Beispiel #1
0
  public BrowseToolBar(ControllerAdapter controller) {

    this.c = controller;
    this.setRollover(true);
    this.add(controller.getController().showFilterToolbarAction);
    urlfield = new PersistentEditableComboBox(controller, BROWSE_URL_STORAGE_KEY);

    urlfield.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            String urlText = urlfield.getText();
            if ("".equals(urlText) || e.getActionCommand().equals("comboBoxEdited")) return;
            try {
              c.load(new URL(urlText));
            } catch (Exception e1) {
              freemind.main.Resources.getInstance().logException(e1);
              // FIXME: Give a good error message.
              c.getController().errorMessage(e1);
            }
          }
        });

    add(new JLabel("URL:"));
    add(urlfield);
  }
Beispiel #2
0
 void setURLField(String text) {
   urlfield.setText(text);
 }