Package freenet.clients.http

Examples of freenet.clients.http.ToadletContainer


    }
  }
 
  /** Get the PageMaker. */
  public PageMaker getPageMaker(){
    ToadletContainer container = getToadletContainer();
    if(container == null) return null;
    return container.getPageMaker();
  }
View Full Code Here


    pageToadlets.add(pageToadletFactory.createPageToadlet(new UnbookmarkAjaxPage(this)));
    pageToadlets.add(pageToadletFactory.createPageToadlet(new EditProfileFieldAjaxPage(this)));
    pageToadlets.add(pageToadletFactory.createPageToadlet(new DeleteProfileFieldAjaxPage(this)));
    pageToadlets.add(pageToadletFactory.createPageToadlet(new MoveProfileFieldAjaxPage(this)));

    ToadletContainer toadletContainer = sonePlugin.pluginRespirator().getToadletContainer();
    toadletContainer.getPageMaker().addNavigationCategory("/Sone/index.html", "Navigation.Menu.Sone.Name", "Navigation.Menu.Sone.Tooltip", sonePlugin);
    for (PageToadlet toadlet : pageToadlets) {
      String menuName = toadlet.getMenuName();
      if (menuName != null) {
        toadletContainer.register(toadlet, "Navigation.Menu.Sone.Name", toadlet.path(), true, "Navigation.Menu.Sone.Item." + menuName + ".Name", "Navigation.Menu.Sone.Item." + menuName + ".Tooltip", false, toadlet);
      } else {
        toadletContainer.register(toadlet, null, toadlet.path(), true, false);
      }
    }
  }
View Full Code Here

  /**
   * Unregisters all toadlets.
   */
  private void unregisterToadlets() {
    ToadletContainer toadletContainer = sonePlugin.pluginRespirator().getToadletContainer();
    for (PageToadlet pageToadlet : pageToadlets) {
      toadletContainer.unregister(pageToadlet);
    }
    toadletContainer.getPageMaker().removeNavigationCategory("Navigation.Menu.Sone.Name");
  }
View Full Code Here

    }
   
    mFreetalk = myFreetalk;
    mPageMaker = mFreetalk.getPluginRespirator().getPageMaker();

    ToadletContainer container = mFreetalk.getPluginRespirator().getToadletContainer();
   
    mSessionManager = mFreetalk.getPluginRespirator().getSessionManager(Freetalk.WEB_OF_TRUST_NAME);
   
    mPageMaker.addNavigationCategory(Freetalk.PLUGIN_URI+"/", "WebInterface.DiscussionMenuName", "WebInterface.DiscussionMenuName.Tooltip", mFreetalk, 1);
   
    NodeClientCore clientCore = mFreetalk.getPluginRespirator().getNode().clientCore;
   
    // Visible pages
    homeToadlet = new HomeWebInterfaceToadlet(null, this, clientCore, "");
    logInToadlet = new LogInWebInterfaceToadlet(null, this, clientCore, "LogIn");
    subscribedBoardsToadlet = new SubscribedBoardsWebInterfaceToadlet(null, this, clientCore, "SubscribedBoards");
    selectBoardsToadlet = new SelectBoardsWebInterfaceToadlet(null, this, clientCore, "SelectBoards");
    outboxToadlet = new OutboxWebInterfaceToadlet(null, this, clientCore, "Outbox");
    identitiesToadlet = new IdentitiesWebInterfaceToadlet(null, this, clientCore, "identities");
    settingsToadlet = new SettingsWebInterfaceToadlet(null, this, clientCore, "Settings");
    statisticsToadlet = new StatisticsToadlet(null, this, clientCore, "Statistics");
    logOutToadlet = new LogOutWebInterfaceToadlet(null, this, clientCore, "LogOut");

    container.register(homeToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/", true, "WebInterface.DiscussionMenuItem.Home", "WebInterface.DiscussionMenuItem.Home.Tooltip", true, homeToadlet);
    container.register(logInToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/LogIn", true, "WebInterface.DiscussionMenuItem.LogIn", "WebInterface.DiscussionMenuItem.LogIn.Tooltip", true, logInToadlet);
    container.register(subscribedBoardsToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/SubscribedBoards", true, "WebInterface.DiscussionMenuItem.SubscribedBoards", "WebInterface.DiscussionMenuItem.SubscribedBoards.Tooltip", true, subscribedBoardsToadlet);
    container.register(selectBoardsToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/SelectBoards", true, "WebInterface.DiscussionMenuItem.SelectBoards", "WebInterface.DiscussionMenuItem.SelectBoards.Tooltip", true, selectBoardsToadlet);
    container.register(outboxToadlet, "WebInterface.DiscussionMenuName", OutboxPage.getURI(), true, "WebInterface.DiscussionMenuItem.Outbox", "WebInterface.DiscussionMenuItem.Outbox.Tooltip", true, outboxToadlet);
    container.register(identitiesToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/identities", true, "WebInterface.DiscussionMenuItem.Identities", "WebInterface.DiscussionMenuItem.Identities.Tooltip", true, identitiesToadlet);
    container.register(settingsToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/Settings", true, "WebInterface.DiscussionMenuItem.Settings", "WebInterface.DiscussionMenuItem.Settings.Tooltip", true, settingsToadlet);
    container.register(statisticsToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/Statistics", true, "WebInterface.DiscussionMenuItem.Statistics", "WebInterface.DiscussionMenuItem.Statistics.Tooltip", true, statisticsToadlet);
    container.register(logOutToadlet, "WebInterface.DiscussionMenuName", Freetalk.PLUGIN_URI+"/LogOut", true, "WebInterface.DiscussionMenuItem.LogOut", "WebInterface.DiscussionMenuItem.LogOut.Tooltip", true, logOutToadlet);
   
    // Invisible pages
    createIdentityToadlet = new CreateIdentityWebInterfaceToadlet(null, this, clientCore, "CreateIdentity");
    newThreadToadlet = new NewThreadWebInterfaceToadlet(null, this, clientCore, "NewThread");
    showBoardToadlet = new ShowBoardWebInterfaceToadlet(null, this, clientCore, "showBoard");
    showThreadToadlet = new ShowThreadWebInterfaceToadlet(null, this, clientCore, "showThread");
    showNotFetchedMessagesToadlet = new ShowNotFetchedMessagesWebInterfaceToadlet(null, this, clientCore, "showNotFetchedMessages");
    newReplyToadlet = new NewReplyWebInterfaceToadlet(null, this, clientCore, "NewReply");
    newBoardToadlet = new NewBoardWebInterfaceToadlet(null, this, clientCore, "NewBoard");
    deleteEmptyBoardsToadlet = new DeleteEmptyBoardsToadlet(null, this, clientCore, "DeleteEmptyBoards");
    changeTrustToadlet = new ChangeTrustWebInterfaceToadlet(null, this, clientCore, "ChangeTrust");
    getPuzzleToadlet = new GetPuzzleWebInterfaceToadlet(null, this, clientCore, "GetPuzzle");
    introduceIdentityToadlet = new IntroduceIdentityWebInterfaceToadlet(null, this, clientCore, "IntroduceIdentity");
    cssToadlet = new CSSWebInterfaceToadlet(null, this, clientCore, "CSS");
   
    container.register(logInToadlet, null, Freetalk.PLUGIN_URI + "/LogIn", true, true);
    container.register(createIdentityToadlet, null, Freetalk.PLUGIN_URI + "/CreateIdentity", true, true);
    container.register(newThreadToadlet, null, Freetalk.PLUGIN_URI + "/NewThread", true, true);
    container.register(showBoardToadlet, null, Freetalk.PLUGIN_URI + "/showBoard", true, true);
    container.register(showThreadToadlet, null, Freetalk.PLUGIN_URI + "/showThread", true, true);
    container.register(showNotFetchedMessagesToadlet, null, Freetalk.PLUGIN_URI + "/showNotFetchedMessages", true, true);
    container.register(newReplyToadlet, null, Freetalk.PLUGIN_URI + "/NewReply", true, true);
    container.register(newBoardToadlet, null, Freetalk.PLUGIN_URI + "/NewBoard", true, true);
    container.register(deleteEmptyBoardsToadlet, null, Freetalk.PLUGIN_URI + "/DeleteEmptyBoards", true, true);
    container.register(changeTrustToadlet, null, Freetalk.PLUGIN_URI + "/ChangeTrust", true, true);
    container.register(getPuzzleToadlet, null, Freetalk.PLUGIN_URI + "/GetPuzzle", true, true);
    container.register(introduceIdentityToadlet, null, Freetalk.PLUGIN_URI + "/IntroduceIdentity", true, true);
    container.register(cssToadlet, null, Freetalk.PLUGIN_URI + "/css/", true, true);
  }
View Full Code Here

  public final PageMaker getPageMaker() {
    return mPageMaker;
  }
 
  public void terminate() {
    ToadletContainer container = mFreetalk.getPluginRespirator().getToadletContainer();
    for(Toadlet t : new Toadlet[] {
        homeToadlet,
        subscribedBoardsToadlet,
        selectBoardsToadlet,
        outboxToadlet,
        identitiesToadlet,
        settingsToadlet,
        statisticsToadlet,
        logOutToadlet,
        logInToadlet,
        createIdentityToadlet,
        newThreadToadlet,
        showBoardToadlet,
        showThreadToadlet,
        showNotFetchedMessagesToadlet,
        newReplyToadlet,
        newBoardToadlet,
        deleteEmptyBoardsToadlet,
        getPuzzleToadlet,
        introduceIdentityToadlet,
        cssToadlet,
    }) container.unregister(t);
    mPageMaker.removeNavigationCategory("WebInterface.DiscussionMenuName");
  }
View Full Code Here

TOP

Related Classes of freenet.clients.http.ToadletContainer

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.