18 package org.turro.financials.model;
21 import org.turro.financials.entity.RelatedStoreDefinition;
22 import org.turro.financials.menu.FinancialsMenu;
23 import org.turro.zkoss.grid.PagingGrid;
24 import org.zkoss.zk.ui.event.Event;
25 import org.zkoss.zk.ui.event.EventListener;
26 import org.zkoss.zk.ui.event.Events;
27 import org.zkoss.zul.Hlayout;
28 import org.zkoss.zul.Image;
29 import org.zkoss.zul.Label;
30 import org.zkoss.zul.Row;
31 import org.zkoss.zul.Rows;
39 private Set<RelatedStoreDefinition> relatedStoreDefinitions;
42 this.relatedStoreDefinitions = relatedStoreDefinitions;
43 setSizedByContent(
true);
48 private void addRows() {
49 Rows rows =
new Rows();
54 rows.appendChild(row);
56 Hlayout hbox =
new Hlayout();
57 hbox.setSpacing(
"20px");
58 Label l =
new Label(rsd.getRelatedStore().getName());
59 l.setStyle(
"cursor:pointer");
60 l.addEventListener(Events.ON_CLICK,
new EventListener() {
62 public void onEvent(Event event)
throws Exception {
67 if(rsd.getRelatedStore().isStock()) {
68 hbox.appendChild(
new Image(
"/_zul/images/store.png"));
70 if(rsd.getRelatedStore().isCash()) {
71 hbox.appendChild(
new Image(
"/_zul/images/cash.png"));
74 hbox.appendChild(
new Image(
"/_zul/images/ok.png"));
76 hbox.appendChild(
new Image(
"/_zul/images/cancel.png"));
78 row.appendChild(hbox);
void setRowCount(int rows)
void setDefaultBehavior(boolean defaultBehavior)