01: /* Bandpopup.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Mon Mar 20 12:31:44 2006, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: }}IS_RIGHT
16: */
17: package org.zkoss.zul;
18:
19: import org.zkoss.zk.ui.Component;
20: import org.zkoss.zk.ui.UiException;
21: import org.zkoss.zul.impl.XulElement;
22:
23: /**
24: * The popup that belongs to a {@link Bandbox} instance.
25: *
26: * <p>Developer usually listen to the onOpen event that is sent to
27: * {@link Bandbox} and then creates proper components as children
28: * of this component.
29: *
30: * @author tomyeh
31: */
32: public class Bandpopup extends XulElement {
33: public Bandpopup() {
34: }
35:
36: //-- super --//
37: public boolean setVisible(boolean visible) {
38: if (!visible)
39: throw new UnsupportedOperationException(
40: "Use Bandbox.setOpen(false) instead");
41: return true;
42: }
43:
44: public void setParent(Component parent) {
45: if (parent != null && !(parent instanceof Bandbox))
46: throw new UiException("Bandpopup's parent must be Bandbox");
47: super.setParent(parent);
48: }
49: }
|