Package com.jgoodies.uif.builder

Examples of com.jgoodies.uif.builder.MenuBuilder


     *
     * @return the created menu.
     */
    private JMenu buildGuidesMenu()
    {
        MenuBuilder bld = createBuilder("guides");
        JMenu menu = bld.getMenu();

        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_WHATIS));
        bld.addSeparator();

        menu.add(buildGuideGetLatestSubmenu());
        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_ADD));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_DELETE));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_MERGE));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_SUBSCRIBE_READINGLIST));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_POST_TO_BLOG));
        bld.addSeparator();

        menu.add(buildGuideMarkReadSubmenu());
        menu.add(buildGuideMarkUnreadSubmenu());
        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_IMPORT));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_EXPORT));
        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_SORT_BY_TITLE));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_PROPERTIES));

        if (!SystemUtils.IS_OS_MAC)
        {
            bld.addSeparator();
            menu.add(ActionManager.get(ActionsTable.CMD_BB_EXIT));
        }

        return bld.getMenu();
    }
View Full Code Here


    private static MenuBuilder createBuilder(String menu)
    {
        String title = Strings.message("mainmenu." + menu);
        char mnemonic = Strings.message("mainmenu." + menu + ".m").charAt(0);

        return new MenuBuilder(title, mnemonic);
    }
View Full Code Here

     *
     * @return created menu.
     */
    private JMenu buildGuideGetLatestSubmenu()
    {
        MenuBuilder bld = createBuilder("guides.getlatest");
        JMenu menu = bld.getMenu();

        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_RELOAD_ALL_SM));
        menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_RELOAD_SM));

        return bld.getMenu();
    }
View Full Code Here

     *
     * @return created menu.
     */
    private JMenu buildGuideMarkReadSubmenu()
    {
      MenuBuilder bld = createBuilder("guides.markread");
      JMenu menu = bld.getMenu();

      menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_MARK_ALL_READ));
      menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_MARK_READ_SM));

      return bld.getMenu();
    }
View Full Code Here

     *
     * @return created menu.
     */
    private JMenu buildGuideMarkUnreadSubmenu()
    {
      MenuBuilder bld = createBuilder("guides.markunread");
      JMenu menu = bld.getMenu();

      menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_MARK_ALL_UNREAD));
      menu.add(ActionManager.get(ActionsTable.CMD_GUIDE_MARK_UNREAD_SM));

      return bld.getMenu();

    }
View Full Code Here

     *
     * @return the created menu.
     */
    private JMenu buildFeedsMenu()
    {
        MenuBuilder bld = createBuilder("feeds");
        JMenu menu = bld.getMenu();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_WHATIS));

        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_RELOAD));

        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_SUBSCRIBE));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_ADD_SMART_FEED));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_DELETE));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_PROPERTIES));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_TAGS));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_POST_TO_BLOG));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_DISCOVER));

        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_BROWSE));

        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_MARK_READ));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_MARK_UNREAD));

        bld.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_FEED_RATING_UP));
        menu.add(ActionManager.get(ActionsTable.CMD_FEED_RATING_DOWN));

        return bld.getMenu();
    }
View Full Code Here

     *
     * @return the created menu.
     */
    private JMenu buildArticlesMenu()
    {
        MenuBuilder bld = createBuilder("articles");
        JMenu menu = bld.getMenu();

        menu.add(ActionManager.get(ActionsTable.CMD_ARTICLE_WHATIS));

        bld.addSeparator();

        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_MARK_READ));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_MARK_UNREAD));

        bld.addSeparator();

        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_BROWSE));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_COPY_LINK));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_SEND_LINK));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_POST_TO_BLOG));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_TWEET_THIS));

        bld.addSeparator();

        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_PROPERTIES));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_TAGS));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_PIN_UNPIN));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_DISCOVER));

        bld.addSeparator();

        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_GOTO_NEXT_UNREAD));

        bld.addSeparator();

        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_ALL));
        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_UNREAD));
        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_PINNED));

        if (SentimentsFeature.isAvailable())
        {
            bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_POSITIVE));
            bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_NEGATIVE));
            bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_SHOW_NON_NEGATIVE));
        }

        bld.addSeparator();
        bld.add(buildViewModeSubmenu());
        bld.add(buildTextSizeSubmenu());
        return bld.getMenu();
    }
View Full Code Here

     *
     * @return created menu.
     */
    private JMenu buildViewModeSubmenu()
    {
        MenuBuilder bld = createBuilder("articles.viewmode");
        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_VIEWMODE_MINI_TB));
        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_VIEWMODE_BRIEF_TB));
        bld.addToggle((ToggleAction)ActionManager.get(ActionsTable.CMD_ARTICLE_VIEWMODE_FULL_TB));

        return bld.getMenu();
    }
View Full Code Here

     * Create and populate the Text Size submenuu
     * @return the created menu.
     */
    private JMenu buildTextSizeSubmenu()
    {
        MenuBuilder bld = createBuilder("articles.textsize");
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_FONT_BIGGER));
        bld.add(ActionManager.get(ActionsTable.CMD_ARTICLE_FONT_SMALLER));
        return bld.getMenu();
    }
View Full Code Here

     *
     * @return the created menu.
     */
    private JMenu buildToolsMenu()
    {
        MenuBuilder bld = createBuilder("tools");
        JMenu menu = bld.getMenu();

        menu.add(ActionManager.get(ActionsTable.CMD_BB_SEARCH));
        menu.add(ActionManager.get(ActionsTable.CMD_BB_WHATS_HOT));
        menu.add(ActionManager.get(ActionsTable.CMD_BB_STATISTICS));
        menu.addSeparator();

        menu.add(ActionManager.get(ActionsTable.CMD_BB_CLEANUP_WIZARD));
        menu.add(ActionManager.get(ActionsTable.CMD_SYNC_FULL));
        menu.add(ActionManager.get(ActionsTable.CMD_BB_SERVICE));

        menu.addSeparator();
        menu.add(ActionManager.get(ActionsTable.CMD_BB_ACTIVITY));
        menu.add(ActionManager.get(ActionsTable.CMD_BB_ONLINEOFFLINE));
        menu.add(ActionManager.get(ActionsTable.CMD_BB_FORGET_PASSWORDS));
        // We don't do any updates checks when under JWS
        if (ApplicationLauncher.isAutoUpdatesEnabled())
        {
            menu.add(ActionManager.get(ActionsTable.CMD_BB_CHECK_FOR_UPDATES));
        }
        menu.add(buildDatabaseSubmenu());
        menu.add(buildSettingsSubmenu());

        return bld.getMenu();
    }
View Full Code Here

TOP

Related Classes of com.jgoodies.uif.builder.MenuBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.