18 package org.turro.financials.register;
20 import java.util.logging.Level;
21 import java.util.logging.Logger;
22 import org.turro.elephant.context.ElephantContext;
23 import org.turro.financials.menu.FinancialsMenu;
24 import org.turro.financials.model.register.EntryWrapper;
25 import org.turro.financials.model.register.RegisterWrapper;
26 import org.turro.i18n.I_;
27 import org.turro.zkoss.grid.CollectionGrid;
28 import org.turro.zkoss.grid.EditableCell;
29 import org.zkoss.zk.ui.HtmlBasedComponent;
30 import org.zkoss.zk.ui.event.Event;
31 import org.zkoss.zk.ui.event.EventListener;
32 import org.zkoss.zk.ui.event.Events;
33 import org.zkoss.zul.A;
34 import org.zkoss.zul.Row;
58 this.wrapper = wrapper;
69 throw new UnsupportedOperationException(
"Not supported yet.");
82 b.setImage(
"/_zul/images/statement.png");
83 b.addEventListener(Events.ON_CLICK,
new EventListener() {
85 public void onEvent(Event event)
throws Exception {
91 return super.createRenderer(editableCell);
100 }
catch (ClassNotFoundException ex) {
104 super.afterCompose();
107 private void addColumns() throws ClassNotFoundException {
110 "entry.account.id",
null, 0,
false,
false).setWidth(
"100px");
112 "entry.account.description",
null, 0,
false,
false);
114 "entry.concept",
null, 0,
false,
false).setWidth(
"200px");
116 "entry.debit",
null, fractionDigits,
false,
false).setWidth(
"120px");
118 "entry.credit",
null, fractionDigits,
false,
false).setWidth(
"120px");
120 "balance",
null, fractionDigits,
false,
false).setWidth(
"120px");
static String logMsg(String msg)
DocumentDefinition getDocumentDefinition()
void initiateRow(Row row, EntryWrapper value)
RegisterWrapper getWrapper()
EntriesGrid(RegisterWrapper wrapper)
void setWrapper(RegisterWrapper wrapper)
HtmlBasedComponent createRenderer(EditableCell editableCell)
boolean isValid(EntryWrapper v)
boolean deleteRow(Row row)
static String get(String msg)
void setCollection(Collection< V > collection)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
void setReadOnly(boolean readOnly)