Package freenet.support

Examples of freenet.support.HTMLNode.addAttribute()


               * From a plugin. Include the plugin name in the id.
               *
               * Note that a plugin could misbehave and fail to register its
               * menu with proper localization keys.
               */
              listItem.addAttribute("id", getPluginL10nCSSIdentifier(menu.plugin, text));

              String newTitle = menu.plugin.getString(menuItemTitle);
              if(newTitle == null) {
                Logger.error(this, "Plugin '"+menu.plugin+"' did return null in getString(key)!");
              } else {
View Full Code Here


    }

    HTMLNode infobox = new HTMLNode("div", "class", classes.toString());

    if(title != null && isUnique) {
      infobox.addAttribute("id", title);
    }

    infobox.addChild("div", "class", "infobox-header").addChild(header);
    return new InfoboxNode(infobox, infobox.addChild("div", "class", "infobox-content"));
  }
View Full Code Here

    HTMLNode radio =
      buttonCell.addChild("input",
          new String[] { "type", "name", "value" },
          new String[] { "radio", "bandwidth", limit.downBytes+"/"+limit.upBytes });
    if(recommended || (useMaybeDefault && limit.maybeDefault))
      radio.addAttribute("checked", "checked");
    if (recommended) {
      buttonCell.addChild("#", WizardL10n.l10n("autodetectedSuggestedLimit"));
    }
  }
}
View Full Code Here

    final HTMLNode translatingForForm = ctx.addFormChild(translatingForBox, TOADLET_URL, "ChooseWhatToTranslate").addChild("p", l10n("showTranslationOf"));
    final HTMLNode translatingForOption = translatingForForm.addChild("select", "name", "translating_for");
    for(String element : elementsToTranslate) {
      final HTMLNode option =  translatingForOption.addChild("option", "name", element, element);
      if(element.equals(this.translatingFor)) {
        option.addAttribute("selected", "selected");
      }
    }
    translatingForForm.addChild("input", "type", "submit");

    HTMLNode translationNode = contentNode.addChild("div", "class", "translation");
View Full Code Here

   *            The media for which this link is valid
   */
  public void addForwardLink(String linkType, String href, String type, String media) {
    HTMLNode linkNode = headNode.addChild("link", new String[] { "rel", "href" }, new String[] { linkType, href });
    if (type != null) {
      linkNode.addAttribute("type", type);
    }
    if (media != null) {
      linkNode.addAttribute("media", media);
    }
  }
View Full Code Here

    HTMLNode linkNode = headNode.addChild("link", new String[] { "rel", "href" }, new String[] { linkType, href });
    if (type != null) {
      linkNode.addAttribute("type", type);
    }
    if (media != null) {
      linkNode.addAttribute("media", media);
    }
  }

}
View Full Code Here

      peerAdditionForm.addChild("#", " ");
      peerAdditionForm.addChild("#", l10n("peerTrustIntroduction"));
      for(FRIEND_TRUST trust : FRIEND_TRUST.valuesBackwards()) { // FIXME reverse order
        HTMLNode input = peerAdditionForm.addChild("br").addChild("input", new String[] { "type", "name", "value" }, new String[] { "radio", "trust", trust.name() });
        if (trust.isDefaultValue()) {
          input.addAttribute("checked", "checked");
        }
        input.addChild("b", l10n("peerTrust."+trust.name())); // FIXME l10n
        input.addChild("#", ": ");
        input.addChild("#", l10n("peerTrustExplain."+trust.name()));
      }
View Full Code Here

      peerAdditionForm.addChild("#", " ");
      peerAdditionForm.addChild("#", l10n("peerVisibilityIntroduction"));
      for(FRIEND_VISIBILITY visibility : FRIEND_VISIBILITY.values()) { // FIXME reverse order
        HTMLNode input = peerAdditionForm.addChild("br").addChild("input", new String[] { "type", "name", "value" }, new String[] { "radio", "visibility", visibility.name() });
        if (visibility.isDefaultValue()) {
          input.addAttribute("checked", "checked");
        }
        input.addChild("b", l10n("peerVisibility."+visibility.name())); // FIXME l10n
        input.addChild("#", ": ");
        input.addChild("#", l10n("peerVisibilityExplain."+visibility.name()));
      }
View Full Code Here

    boolean loadFromWeb = pm.loadOfficialPluginsFromWeb();
   
    HTMLNode input = addOfficialForm.addChild("input", new String[] { "type", "name", "value" },
        new String[] { "radio", "pluginSource", "freenet" });
    if(!loadFromWeb)
      input.addAttribute("checked", "true");
    addOfficialForm.addChild("#", l10n("pluginSourceFreenet"));
    addOfficialForm.addChild("br");
    input = addOfficialForm.addChild("input", new String[] { "type", "name", "value" },
        new String[] { "radio", "pluginSource", "https" });
    if(loadFromWeb)
View Full Code Here

    addOfficialForm.addChild("#", l10n("pluginSourceFreenet"));
    addOfficialForm.addChild("br");
    input = addOfficialForm.addChild("input", new String[] { "type", "name", "value" },
        new String[] { "radio", "pluginSource", "https" });
    if(loadFromWeb)
      input.addAttribute("checked", "true");
    addOfficialForm.addChild("#", l10n("pluginSourceHTTPS"));
    addOfficialForm.addChild("#", " ");
    if(node.getOpennet() == null)
      addOfficialForm.addChild("b").addChild("font", "color", "red", l10n("pluginSourceHTTPSWarning"));
    else
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.