Author: batosai
Date: 2008-10-02 18:45:40 +0000 (Thu, 02 Oct 2008)
New Revision: 22913
Modified:
trunk/plugins/WoT/ui/web/HomePage.java
trunk/plugins/WoT/ui/web/WebPageImpl.java
Log:
Give the contentBox' HTMLNode to the Page so it adds content by itself.
Modified: trunk/plugins/WoT/ui/web/HomePage.java
===================================================================
--- trunk/plugins/WoT/ui/web/HomePage.java 2008-10-02 14:28:05 UTC (rev
22912)
+++ trunk/plugins/WoT/ui/web/HomePage.java 2008-10-02 18:45:40 UTC (rev
22913)
@@ -32,6 +32,7 @@
private void makeSummary() {
ObjectContainer db = wot.getDB();
+ HTMLNode box = getContentBox("Summary");
HTMLNode list = new HTMLNode("ul");
list.addChild(new HTMLNode("li", "Own Identities : " +
OwnIdentity.getNbOwnIdentities(db)));
@@ -39,7 +40,7 @@
list.addChild(new HTMLNode("li", "Trust relationships : " +
Trust.getNb(db)));
list.addChild(new HTMLNode("li", "Scores : " +
Score.getNb(db)));
- addContentBox("Summary", list);
+ box.addChild(list);
}
}
Modified: trunk/plugins/WoT/ui/web/WebPageImpl.java
===================================================================
--- trunk/plugins/WoT/ui/web/WebPageImpl.java 2008-10-02 14:28:05 UTC (rev
22912)
+++ trunk/plugins/WoT/ui/web/WebPageImpl.java 2008-10-02 18:45:40 UTC (rev
22913)
@@ -86,12 +86,12 @@
* Adds a new InfoBox to the WebPage.
*
* @param title The title of the desired InfoBox
- * @param content The content of the InfoBox
+ * @return the contentNode of the newly created InfoBox
*/
- protected void addContentBox(String title, HTMLNode content) {
+ protected HTMLNode getContentBox(String title) {
HTMLNode box = pm.getInfobox(title);
- box.addChild(content);
contentBoxes.add(box);
+ return pm.getContentNode(box);
}
}