2 * $Id: TableElementLabelProvider.java,v 1.1 2004-10-05 20:51:57 jsurfer Exp $
3 * Copyright Narushima Hironori. All rights reserved.
5 package net.sourceforge.phpeclipse.wizards.html;
7 import org.eclipse.jface.viewers.*;
8 import org.eclipse.swt.graphics.Image;
9 import org.w3c.dom.Element;
14 public class TableElementLabelProvider implements ITableLabelProvider {
16 public Image getColumnImage(Object element, int columnIndex) {
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();
26 throw new IllegalArgumentException("Invalid element:" + element);
30 public boolean isLabelProperty(Object element, String property) {
31 return TableElementModel.toNumeric(property) != -1;
34 public void addListener(ILabelProviderListener listener) {
37 public void removeListener(ILabelProviderListener listener) {
40 public void dispose() {