1
2
3
4
5
6
7
8
9
10
11 package de.jaret.util.ui.table.renderer;
12
13 import de.jaret.util.ui.table.model.IColumn;
14 import de.jaret.util.ui.table.model.IRow;
15
16 /***
17 * Interface for a strategy that can be added to a cell style provider to determine styles on the fly based on the
18 * content of the element (such as coloring the background of even rows).
19 *
20 * @author kliem
21 * @version $Id: IStyleStrategy.java 347 2007-04-07 15:01:10Z olk $
22 */
23 public interface IStyleStrategy {
24 /***
25 * This method is called before a cell style is delivered to the jaret table (by getCellStyle(row, col) in the cell
26 * style provider). It gets the cell style regulary determined by the provider and the default cell style. It can
27 * then replace that style according to the strategy. The strategy should not alter the incoming style since this
28 * alters all cells using that style.
29 *
30 * @param row row
31 * @param column column
32 * @param incomingStyle the determined cell style
33 * @param defaultCellStyle the defalt cell style used by the provider
34 * @return cellstyle to be used by the table
35 */
36 ICellStyle getCellStyle(IRow row, IColumn column, ICellStyle incomingStyle, ICellStyle defaultCellStyle);
37 }