|
|||||||||||||||||||
Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
FormatTableCellViewFactory.java | - | 0% | 0% | 0% |
|
1 |
/* |
|
2 |
* Angkor Web Framework |
|
3 |
* |
|
4 |
* Distributable under LGPL license. |
|
5 |
* See terms of license at gnu.org. |
|
6 |
*/ |
|
7 |
|
|
8 |
package com.tirsen.angkor.table; |
|
9 |
|
|
10 |
import com.tirsen.angkor.View; |
|
11 |
import com.tirsen.angkor.widget.TextLabel; |
|
12 |
import com.tirsen.angkor.widget.ValueModel; |
|
13 |
|
|
14 |
import java.text.Format; |
|
15 |
|
|
16 |
/** |
|
17 |
* @author $Author: tirsen $ |
|
18 |
* @version $Revision: 1.4 $ |
|
19 |
* <BR> |
|
20 |
* $Id: FormatTableCellViewFactory.java,v 1.4 2002/10/09 21:37:37 tirsen Exp $ |
|
21 |
*/ |
|
22 |
public class FormatTableCellViewFactory extends DefaultTableCellViewFactory |
|
23 |
{ |
|
24 |
private Format format; |
|
25 |
|
|
26 | 0 |
public FormatTableCellViewFactory(Format format) |
27 |
{ |
|
28 | 0 |
this.format = format; |
29 |
} |
|
30 |
|
|
31 | 0 |
public View getTableCellView(Table table, ValueModel value, int row, int column) |
32 |
{ |
|
33 | 0 |
TextLabel label = new TextLabel(); |
34 | 0 |
label.setModel(value); |
35 | 0 |
label.setFormat(format); |
36 | 0 |
return label; |
37 |
} |
|
38 |
} |
|
39 |
|
|