01: /* RowRenderer.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Thu Mar 8 10:55:50 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 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.zul;
20:
21: /**
22: * Identifies components that can be used as "rubber stamps" to paint
23: * the cells in a {@link Grid}.
24: *
25: * <p>If you need better control, your renderer can also implement
26: * {@link RowRendererExt}.
27: *
28: * <p>In addition, you could also
29: * implement {@link RendererCtrl}. For example, starts an transaction,
30: * and uses it to render all rows for the same request.
31: *
32: * @author tomyeh
33: * @see ListModel
34: * @see Listbox
35: * @see RowRendererExt
36: */
37: public interface RowRenderer {
38: /** Renders the data to the specified row.
39: *
40: * @param row the row to render the result.
41: * Note: when this method is called, the row has no child
42: * at all, unless you don't return
43: * {@link RowRendererExt#DETACH_ON_RENDER} when
44: * {@link RowRendererExt#getControls} is called.
45: *
46: * @param data that is returned from {@link ListModel#getElementAt}
47: */
48: public void render(Row row, Object data) throws Exception;
49: }
|