01: /* Cropper.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Aug 22 16:43:40 2006, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.ext.render;
20:
21: import java.util.Set;
22:
23: /**
24: * Implemented by the object returned by {@link org.zkoss.zk.ui.sys.ComponentCtrl#getExtraCtrl}
25: * if not all of the children of a component are available at the client.
26: * In other word, the component support 'cropping'.
27: * Example: only children of the active page of ZUL's grid are available
28: * at the client, if it is in the paging mold.
29: *
30: * <p>ZK Update Engine detects this interface and then ignores any update to
31: * components that don't have counterpart at the client.
32: *
33: * @author tomyeh
34: */
35: public interface Cropper {
36: /** Returns whether it is a cropper, i.e., cropping is applied.
37: *
38: * <p>If {@link #isCropper} returns false, {@link #getAvailableAtClient} must return null.
39: * In other words, the result of returning false is the same as not declaring
40: * with {@link Cropper}.
41: */
42: public boolean isCropper();
43:
44: /** Returns a set of child components that are available at the client,
45: * or null if ALL available.
46: *
47: * <p>Note: for better performance, it is better to return null if
48: * all children are available at the client.
49: */
50: public Set getAvailableAtClient();
51: }
|