01: /* MultiBranch.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Oct 17 14:02:55 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.zk.ui.ext.render;
18:
19: import org.zkoss.zk.ui.Component;
20:
21: /**
22: * Implemented by the object returned by {@link org.zkoss.zk.ui.sys.ComponentCtrl#getExtraCtrl}
23: * to denote a component might have several branches of elements at the client.
24: * Then, ZK will call {@link #inDifferentBranch} to see whether a child
25: * is NOT on the main branch.
26: *
27: * @author tomyeh
28: */
29: public interface MultiBranch {
30: /** Whether the specified child is placed in different branch
31: * of the DOM tree (other than the main one).
32: * For example, you might put caption at a branch
33: * and the rest at another branch. Then, you shall return false
34: * for the caption. Thus, ZK knows how to render them correctly.
35: *
36: * <p>Note: for components, say caption, in different branch,
37: * you have to invalidate the parent when they are added or removed.
38: * Only children causing this method to return true are handled
39: * by ZK Update Engine.
40: */
41: public boolean inDifferentBranch(Component child);
42: }
|