2 * $Id: TableElementLabelProvider.java,v 1.3 2006-10-21 23:18:43 pombredanne Exp $
3 * Copyright Narushima Hironori. All rights reserved.
5 package net.sourceforge.phpeclipse.wizards.html;
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;
15 public class TableElementLabelProvider implements ITableLabelProvider {
17 public Image getColumnImage(Object element, int columnIndex) {
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();
28 throw new IllegalArgumentException("Invalid element:" + element);
32 public boolean isLabelProperty(Object element, String property) {
33 return TableElementModel.toNumeric(property) != -1;
36 public void addListener(ILabelProviderListener listener) {
39 public void removeListener(ILabelProviderListener listener) {
42 public void dispose() {