19 package org.turro.zul.log;
21 import java.util.TreeMap;
22 import org.turro.string.ObjectString;
23 import org.turro.contacts.log.CrossTabRegisterByUser;
24 import org.turro.elephant.util.DateFormats;
25 import org.turro.i18n.I_;
26 import org.turro.plugin.log.ILogRegister;
27 import org.turro.zkoss.layout.GridLayout;
38 this.
register =
register;
47 private void addColumns() {
48 setColumns(
"1,min,right-min,right-min,right-min,right-min,right-min,right-min,right-min,right-min");
59 I_.
get(
"Unsubscribed")
63 private void addRows() {
64 for(String name :
register.keySet()) {
66 TreeMap<String, ILogRegister> comment =
register.get(name);
67 if(comment.containsKey(
"/log/in")) {
68 ILogRegister lr = comment.get(
"/log/in");
69 addValue(DateFormats.format(lr.getDateLog(),
false));
70 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
75 if(comment.containsKey(
"saved")) {
76 ILogRegister lr = comment.get(
"saved");
77 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
81 if(comment.containsKey(
"sent")) {
82 ILogRegister lr = comment.get(
"sent");
83 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
87 if(comment.containsKey(
"deleted")) {
88 ILogRegister lr = comment.get(
"deleted");
89 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
93 if(comment.containsKey(
"uploaded")) {
94 ILogRegister lr = comment.get(
"uploaded");
95 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
99 if(comment.containsKey(
"downloaded")) {
100 ILogRegister lr = comment.get(
"downloaded");
101 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
105 if(comment.containsKey(
"subscribed")) {
106 ILogRegister lr = comment.get(
"subscribed");
107 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
111 if(comment.containsKey(
"unsubscribed")) {
112 ILogRegister lr = comment.get(
"unsubscribed");
113 addValue(ObjectString.formatObject(lr.getCount(),
null,
true));
static String get(String msg)
void setColCaptions(String captions)
void setColumns(int columns)
GridLayout addCaption(String label)
GridLayout addValue(String value)
CrossTabRegisterByUserGrid(CrossTabRegisterByUser register)
CrossTabRegisterByUser getRegister()