d09879204e4d4f2a9a701c3aca4f6d82d6356ec7
[aaf/authz.git] / authz-gui / src / main / java / com / att / authz / gui / table / TextCell.java
1 /*******************************************************************************
2  * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
3  *******************************************************************************/
4 package com.att.authz.gui.table;
5
6 import com.att.xgen.html.HTMLGen;
7
8 /**
9  * Write Simple Text into a Cell
10  *
11  */
12 public class TextCell extends AbsCell {
13         public final String name;
14         private String[] attrs;
15         
16         public TextCell(String name, String... attributes) {
17                 attrs = new String[attributes.length];
18                 System.arraycopy(attributes, 0, attrs, 0, attributes.length);
19                 this.name = name;
20         }
21         
22         @Override
23         public void write(HTMLGen hgen) {
24                 hgen.text(name);
25         }
26         
27         @Override
28         public String[] attrs() {
29                 return attrs;
30         }
31 }