Package freenet.support

Examples of freenet.support.HTMLNode.addChild()


        new String[] { "link" },
        new HTMLNode[] { HTMLNode.link("/config/"+sc.getPrefix()) });
   
    int peers = node.peers.getDarknetPeers().length;
    if(peers > 0)
      textNode.addChild("p", l10n("noIPMaybeFromPeers", "number", Integer.toString(peers)));
   
    if(node.ipDetector.noDetectPlugins()) {
      HTMLNode p = textNode.addChild("p");
      NodeL10n.getBase().addL10nSubstitution(p, "IPUndetectedUserAlert.loadDetectPlugins", new String[] { "plugins", "config", },
          new HTMLNode[] { HTMLNode.link("/plugins/"), HTMLNode.link("/config/node") });
View Full Code Here


    }
   
    addPortForwardSuggestion(textNode);
   
    HTMLNode formNode = textNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", "class", "configshortdesc", o.getLocalisedShortDesc()).addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", sc.getPrefix() + ".tempIPAddressHint", o.getValueDisplayString() });
    itemNode.addChild("span", "class", "configlongdesc", o.getLocalisedLongDesc());
View Full Code Here

   
    addPortForwardSuggestion(textNode);
   
    HTMLNode formNode = textNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", "class", "configshortdesc", o.getLocalisedShortDesc()).addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", sc.getPrefix() + ".tempIPAddressHint", o.getValueDisplayString() });
    itemNode.addChild("span", "class", "configlongdesc", o.getLocalisedLongDesc());
    formNode.addChild("input", new String[] { "type", "value" }, new String[] { "submit", NodeL10n.getBase().getString("UserAlert.apply") });
View Full Code Here

    HTMLNode formNode = textNode.addChild("form", new String[] { "action", "method" }, new String[] { "/config/"+sc.getPrefix(), "post" });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", "class", "configshortdesc", o.getLocalisedShortDesc()).addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", sc.getPrefix() + ".tempIPAddressHint", o.getValueDisplayString() });
    itemNode.addChild("span", "class", "configlongdesc", o.getLocalisedLongDesc());
    formNode.addChild("input", new String[] { "type", "value" }, new String[] { "submit", NodeL10n.getBase().getString("UserAlert.apply") });
    formNode.addChild("input", new String[] { "type", "value" }, new String[] { "reset", NodeL10n.getBase().getString("UserAlert.reset") });
   
    return textNode;
View Full Code Here

    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.clientCore.formPassword });
    formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "subconfig", sc.getPrefix() });
    HTMLNode listNode = formNode.addChild("ul", "class", "config");
    HTMLNode itemNode = listNode.addChild("li");
    itemNode.addChild("span", "class", "configshortdesc", o.getLocalisedShortDesc()).addChild("input", new String[] { "type", "name", "value" }, new String[] { "text", sc.getPrefix() + ".tempIPAddressHint", o.getValueDisplayString() });
    itemNode.addChild("span", "class", "configlongdesc", o.getLocalisedLongDesc());
    formNode.addChild("input", new String[] { "type", "value" }, new String[] { "submit", NodeL10n.getBase().getString("UserAlert.apply") });
    formNode.addChild("input", new String[] { "type", "value" }, new String[] { "reset", NodeL10n.getBase().getString("UserAlert.reset") });
   
    return textNode;
  }
View Full Code Here

      return null; // Not going to be changed.
    HTMLNode parent = new HTMLNode("div");
    if((newThreatLevel == NETWORK_THREAT_LEVEL.HIGH && networkThreatLevel != NETWORK_THREAT_LEVEL.MAXIMUM) ||
        newThreatLevel == NETWORK_THREAT_LEVEL.MAXIMUM) {
      if(node.peers.getDarknetPeers().length == 0) {
        parent.addChild("p", l10n("noFriendsWarning"));
        if(newThreatLevel == NETWORK_THREAT_LEVEL.MAXIMUM) {
          HTMLNode p = parent.addChild("p");
          NodeL10n.getBase().addL10nSubstitution(p, "SecurityLevels.maximumNetworkThreatLevelWarning", new String[] { "bold" },
              new HTMLNode[] { HTMLNode.STRONG });
        }
View Full Code Here

    } // Don't warn on switching to NORMAL.
    if(newThreatLevel == NETWORK_THREAT_LEVEL.MAXIMUM) {
      HTMLNode p = parent.addChild("p");
      NodeL10n.getBase().addL10nSubstitution(p, "SecurityLevels.maximumNetworkThreatLevelWarning", new String[] { "bold" },
          new HTMLNode[] { HTMLNode.STRONG });
      p.addChild("#", " ");
      NodeL10n.getBase().addL10nSubstitution(p, "SecurityLevels.maxSecurityYouNeedFriends", new String[] { "bold" },
          new HTMLNode[] { HTMLNode.STRONG });
      parent.addChild("input", new String[] { "type", "name", "value" }, new String[] { "checkbox", checkboxName, "off" }, l10n("maximumNetworkThreatLevelCheckbox"));
      return parent;
    }
View Full Code Here

        for(String part : request.getParts()) {
          if(!part.startsWith("identifier-")) continue;
          String key = request.getPartAsStringFailsafe("key-"+part.substring("identifier-".length()), MAX_KEY_LENGTH);
          if(key == null || key.equals("")) continue;
          form.addChild("#", l10n("key") + ":");
          form.addChild("br");
          form.addChild("#", key);
          form.addChild("br");
          form.addChild("input", new String[] { "type", "name", "value" },
              new String[] { "hidden", "key-"+x, key });
        }
View Full Code Here

          if(!part.startsWith("identifier-")) continue;
          String key = request.getPartAsStringFailsafe("key-"+part.substring("identifier-".length()), MAX_KEY_LENGTH);
          if(key == null || key.equals("")) continue;
          form.addChild("#", l10n("key") + ":");
          form.addChild("br");
          form.addChild("#", key);
          form.addChild("br");
          form.addChild("input", new String[] { "type", "name", "value" },
              new String[] { "hidden", "key-"+x, key });
        }
        form.addChild("label", "for", "descB", (l10n("recommendDescription") + ' '));
View Full Code Here

          String key = request.getPartAsStringFailsafe("key-"+part.substring("identifier-".length()), MAX_KEY_LENGTH);
          if(key == null || key.equals("")) continue;
          form.addChild("#", l10n("key") + ":");
          form.addChild("br");
          form.addChild("#", key);
          form.addChild("br");
          form.addChild("input", new String[] { "type", "name", "value" },
              new String[] { "hidden", "key-"+x, key });
        }
        form.addChild("label", "for", "descB", (l10n("recommendDescription") + ' '));
        form.addChild("br");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.