18 package org.turro.financials.model;
20 import org.turro.financials.entity.ContractDefinition;
21 import org.turro.financials.menu.FinancialsMenu;
22 import org.zkoss.zk.ui.event.Event;
23 import org.zkoss.zk.ui.event.EventListener;
24 import org.zkoss.zk.ui.event.Events;
25 import org.zkoss.zul.Detail;
26 import org.zkoss.zul.Hlayout;
27 import org.zkoss.zul.Image;
28 import org.zkoss.zul.Label;
29 import org.zkoss.zul.Row;
30 import org.zkoss.zul.Vlayout;
41 this.contractDefinition = contractDefinition;
45 private void addCells() {
47 Hlayout hbox =
new Hlayout();
48 hbox.setSpacing(
"20px");
50 l.setStyle(
"cursor:pointer");
51 l.addEventListener(Events.ON_CLICK,
new EventListener() {
53 public void onEvent(Event event)
throws Exception {
58 if(contractDefinition.
isStock()) {
59 hbox.appendChild(
new Image(
"/_zul/images/store.png"));
61 if(contractDefinition.
isCash()) {
62 hbox.appendChild(
new Image(
"/_zul/images/cash.png"));
67 private void addDetail() {
68 Detail detail =
new Detail();
71 detail.addEventListener(Events.ON_OPEN,
new EventListener() {
73 public void onEvent(Event event)
throws Exception {
74 if(event.getTarget().getChildren().isEmpty()) {
75 Vlayout vbox =
new Vlayout();
78 event.getTarget().appendChild(vbox);
Set< RelatedDocument > getRelatedDocuments()
Set< DocumentWorkflow > getDocumentWorkflows()
ContractDefRow(ContractDefinition contractDefinition)