19 package org.turro.zkoss.layout;
21 import org.zkoss.zk.ui.Component;
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.Caption;
26 import org.zkoss.zul.Div;
34 private Caption caption;
40 caption =
new Caption();
43 caption.appendChild(div);
44 div.setSclass(
"open-true");
45 addEventListener(Events.ON_OPEN,
new EventListener<Event>() {
47 public void onEvent(Event event) throws Exception {
48 div.setSclass(
"open-" + GroupboxArrow.this.isOpen());
49 fillContent(GroupboxArrow.this.isOpen());
55 div.appendChild(comp);
61 div.setSclass(
"open-" + open);
62 fillContent(isOpen());
65 private void fillContent(
boolean open) {
66 if(open && getChildren().size() == 1) {
abstract void doFillContent()
void setCaption(Component comp)
void setOpen(boolean open)