BrightSide Workbench Full Report + Source Code
MailReport.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.mail.impl;
19 
20 import org.turro.html.HTMLGenerator;
21 
26 public class MailReport extends HTMLGenerator {
27 
29  return startTag("div", "style='font-size:12px;font-family:verdana'");
30  }
31 
33  return endAllTags();
34  }
35 
37  return startTag("span")
38  .write("&nbsp;")
39  .endTag();
40  }
41 
43  return startTag("div", "style='background-color:#0c4f7d;color:#fff;font-weight:bold;font-size:18px;padding:10px'");
44  }
45 
47  return startTag("span", "style='font-size:14px;padding:3px'");
48  }
49 
50  public HTMLGenerator addMenuItem(String value, String ref) {
51  return startTag("a", "style='color:inherit' href='#" + ref + "'")
52  .write(value)
53  .endTag();
54  }
55 
56  public HTMLGenerator addItemRef(String value, String ref) {
57  return startTag("a", "style='color:inherit' name='" + ref + "'")
58  .write(value)
59  .endTag();
60  }
61 
63  return startTag("div", "style='background-color:#2e8dcf;color:#fff;font-weight:bold;font-size:14px;padding:10px'");
64  }
65 
67  return startTag("div", "style='background-color:#2e8dcf;color:#eee;font-weight:bold;font-size:12px;padding:10px'");
68  }
69 
71  return startTag("div", "style='border:solid 1px silver;margin:2px'");
72  }
73 
75  return startTag("div", "style='background-color:#fff;color:#444;font-weight:bold;font-size:12px;padding:10px'");
76  }
77 
79  return startTag("div", "style='color:#666;font-size:11px;padding:2px'");
80  }
81 
83  return startTag("div", "style='background-color:#fff;color:#333;font-weight:normal;font-size:12px;padding:10px'");
84  }
85 
86  public HTMLGenerator addValueLabel(String label) {
87  return startTag("span", "style='font-size:11px;font-weight:bold'")
88  .write(label)
89  .endTag();
90  }
91 
92  public HTMLGenerator addValue(String value) {
93  return startTag("span", "style='font-size:11px;font-weight:normal'")
94  .write(" " + value)
95  .endTag();
96  }
97 
98 }
HTMLGenerator write(String value)
HTMLGenerator startTag(String tag)
HTMLGenerator addItemRef(String value, String ref)
Definition: MailReport.java:56
HTMLGenerator addMenuItem(String value, String ref)
Definition: MailReport.java:50
HTMLGenerator startDetailContent()
Definition: MailReport.java:82
HTMLGenerator startDetailHeading()
Definition: MailReport.java:74
HTMLGenerator startDetailSubHeading()
Definition: MailReport.java:78
HTMLGenerator startDetailGroup()
Definition: MailReport.java:70
HTMLGenerator addValue(String value)
Definition: MailReport.java:92
HTMLGenerator addValueLabel(String label)
Definition: MailReport.java:86
HTMLGenerator startTitleMenu()
Definition: MailReport.java:46