Esempio n. 1
0
  /**
   * Creates the Export submenu.
   *
   * @return The created JMenu
   */
  protected JMenu _createExportSubmenu() {
    JMenu exportMenu = UIUtils.makeMenu("Export", "archive+ovl_out");
    exportMenu.add(
        UIUtils.makeMenuItem(
            "To File...", "drive", this._cmdButtonListener, COMMAND_EXPORT_TO_FILE));

    return exportMenu;
  }
Esempio n. 2
0
  /**
   * Creates the Import submenu.
   *
   * @return The created JMenu
   */
  protected JMenu _createImportSubmenu() {
    this._menuImportFromArchive = UIUtils.makeMenu("From Archive", "archive+ovl_out");

    JMenu importMenu = UIUtils.makeMenu("Import", "archive+ovl_in");
    importMenu.add(
        UIUtils.makeMenuItem(
            "From File...", "drive", this._cmdButtonListener, COMMAND_IMPORT_FROM_FILE));
    importMenu.add(this._menuImportFromArchive);
    importMenu.add(new JSeparator());
    importMenu.add(
        UIUtils.makeMenuItem(
            "From Yahoo Messenger...",
            "yahoo",
            this._cmdButtonListener,
            COMMAND_IMPORT_FROM_YAHOO));
    importMenu.add(
        UIUtils.makeMenuItem(
            "From Gaim/Pidgin...", "pidgin", this._cmdButtonListener, COMMAND_IMPORT_FROM_GAIM));
    importMenu.add(
        UIUtils.makeMenuItem(
            "From Digsby...", "digsby", this._cmdButtonListener, COMMAND_IMPORT_FROM_DIGSBY));
    importMenu.add(
        UIUtils.makeMenuItem(
            "From MSN Messenger...", "msn", this._cmdButtonListener, COMMAND_IMPORT_FROM_MSN));

    return importMenu;
  }
Esempio n. 3
0
  /**
   * Creates the File menu.
   *
   * @return The created JMenu
   */
  protected JMenu _createFileMenu() {
    this._menuConnect = UIUtils.makeMenu("Connect To", "connect");
    this._menuItemDisconnect =
        UIUtils.makeMenuItem(
            "Disconnect", "disconnect", this._cmdButtonListener, COMMAND_DISCONNECT);
    this._menuExport = this._createExportSubmenu();

    JMenu fileMenu = new JMenu("File");
    fileMenu.add(
        UIUtils.makeMenuItem(
            "New Archive...", "archive+ovl_add", this._cmdButtonListener, COMMAND_NEW_ARCHIVE));
    fileMenu.add(this._menuConnect);
    fileMenu.add(this._menuItemDisconnect);
    fileMenu.add(this._createImportSubmenu());
    fileMenu.add(this._menuExport);
    fileMenu.add(new JSeparator());
    fileMenu.add(
        UIUtils.makeMenuItem("Exit Program", "exit", this._cmdButtonListener, COMMAND_END_PROGRAM));

    return fileMenu;
  }
Esempio n. 4
0
  /** Updates the Import From Archive submenu to reflect the list of known existing archives. */
  protected void _updateImportFromArchiveSubmenu() {
    this._menuImportFromArchive.setEnabled(!this._archives.isEmpty());
    this._menuImportFromArchive.removeAll();

    for (String arcName : this._archives) {
      boolean selected = ((this._archive != null) && (this._archive.getName().equals(arcName)));

      this._menuImportFromArchive.add(
          UIUtils.makeMenuItem(
              arcName,
              selected ? "archive_current" : "archive",
              this._cmdButtonListener,
              COMMAND_IMPORT_FROM_ARCHIVE));
    }
  }
Esempio n. 5
0
  /** Updates the Connect submenu to reflect the list of known existing archives. */
  protected void _updateConnectSubmenu() {
    this._menuConnect.setEnabled(!this._archives.isEmpty());
    this._menuConnect.removeAll();

    for (String arcName : this._archives) {
      boolean selected = ((this._archive != null) && (this._archive.getName().equals(arcName)));

      this._menuConnect.add(
          UIUtils.makeMenuItem(
              arcName + (selected ? " (connected)" : ""),
              selected ? "archive_current" : "archive",
              this._cmdButtonListener,
              selected ? COMMAND_NOP : COMMAND_CONNECT));
    }
  }
Esempio n. 6
0
  /**
   * Creates the Operations menu.
   *
   * @return The created JMenu
   */
  protected JMenu _createOperationsMenu() {
    this._menuItemAddGroup =
        UIUtils.makeMenuItem(
            "Create Group...", "group+ovl_add", this._cmdButtonListener, COMMAND_CREATE_GROUP);
    this._menuItemAddContact =
        UIUtils.makeMenuItem(
            "Create Contact...",
            "contact+ovl_add",
            this._cmdButtonListener,
            COMMAND_CREATE_CONTACT);
    this._menuItemAddIdentity =
        UIUtils.makeMenuItem(
            "Create Identity...",
            "identity+ovl_add",
            this._cmdButtonListener,
            COMMAND_CREATE_IDENTITY);
    this._menuItemDeleteSelected =
        UIUtils.makeMenuItem(
            "Delete Selected", "delete", this._cmdButtonListener, COMMAND_DELETE_SELECTED);
    this._menuItemRenameSelected =
        UIUtils.makeMenuItem(
            "Rename Selected", "rename", this._cmdButtonListener, COMMAND_RENAME_SELECTED);
    this._menuItemMoveSelected =
        UIUtils.makeMenuItem(
            "Move Selected", "move", this._cmdButtonListener, COMMAND_MOVE_SELECTED);
    this._menuItemMergeSelected =
        UIUtils.makeMenuItem(
            "Merge Selected", "merge", this._cmdButtonListener, COMMAND_MERGE_SELECTED);

    JMenu opsMenu = new JMenu("Operations");
    opsMenu.add(this._menuItemAddGroup);
    opsMenu.add(this._menuItemAddContact);
    opsMenu.add(this._menuItemAddIdentity);
    opsMenu.add(new JSeparator());
    opsMenu.add(this._menuItemDeleteSelected);
    opsMenu.add(this._menuItemRenameSelected);
    opsMenu.add(this._menuItemMoveSelected);
    opsMenu.add(this._menuItemMergeSelected);

    return opsMenu;
  }
Esempio n. 7
0
  /**
   * Creates the Search menu.
   *
   * @return The created JMenu
   */
  protected JMenu _createSearchMenu() {
    this._menuItemFind =
        UIUtils.makeMenuItem(
            "Find In Conversation...",
            "Ctrl+F",
            "find",
            this._cmdButtonListener,
            COMMAND_FIND_FIRST);
    this._menuItemFindNext =
        UIUtils.makeMenuItem(
            "Find Next Occurence",
            "F3",
            "occurence+ovl_next",
            this._cmdButtonListener,
            COMMAND_FIND_NEXT);
    this._menuItemFindPrev =
        UIUtils.makeMenuItem(
            "Find Previous Occurence",
            "Shift+F3",
            "occurence+ovl_prev",
            this._cmdButtonListener,
            COMMAND_FIND_PREV);
    this._menuItemClearFind =
        UIUtils.makeMenuItem(
            "Finish Search", "find+ovl_delete", this._cmdButtonListener, COMMAND_CLEAR_FIND);

    JMenu sfMenu = UIUtils.makeMenu("Search", null);
    sfMenu.add(
        UIUtils.makeMenuItem(
            "Search Conversations...",
            "Ctrl+H",
            "search",
            this._cmdButtonListener,
            COMMAND_SEARCH));
    sfMenu.add(new JSeparator());
    sfMenu.add(this._menuItemFind);
    sfMenu.add(this._menuItemFindNext);
    sfMenu.add(this._menuItemFindPrev);
    sfMenu.add(this._menuItemClearFind);

    return sfMenu;
  }