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