Removed unuse builder from project
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / html / TableElementLabelProvider.java
1 /*
2  * $Id: TableElementLabelProvider.java,v 1.3 2006-10-21 23:18:43 pombredanne Exp $
3  * Copyright Narushima Hironori. All rights reserved.
4  */
5 package net.sourceforge.phpeclipse.wizards.html;
6
7 import org.eclipse.jface.viewers.ILabelProviderListener;
8 import org.eclipse.jface.viewers.ITableLabelProvider;
9 import org.eclipse.swt.graphics.Image;
10 import org.w3c.dom.Element;
11
12 /**
13  * 
14  */
15 public class TableElementLabelProvider implements ITableLabelProvider {
16
17         public Image getColumnImage(Object element, int columnIndex) {
18                 return null;
19         }
20
21         public String getColumnText(Object element, int columnIndex) {
22                 Element[] cells = TableElementModel
23                                 .chooseCellElements((Element) element);
24                 if (columnIndex < cells.length) {
25                         Element elem = cells[columnIndex];
26                         return elem.toString();
27                 } else {
28                         throw new IllegalArgumentException("Invalid element:" + element);
29                 }
30         }
31
32         public boolean isLabelProperty(Object element, String property) {
33                 return TableElementModel.toNumeric(property) != -1;
34         }
35
36         public void addListener(ILabelProviderListener listener) {
37         }
38
39         public void removeListener(ILabelProviderListener listener) {
40         }
41
42         public void dispose() {
43         }
44
45 }