2 * $Id: TableElementLabelProvider.java,v 1.2 2005-05-06 00:57:33 stefanbjarni 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.chooseCellElements((Element)element);
23 if(columnIndex < cells.length){
24 Element elem = cells[columnIndex];
25 return elem.toString();
27 throw new IllegalArgumentException("Invalid element:" + element);
31 public boolean isLabelProperty(Object element, String property) {
32 return TableElementModel.toNumeric(property) != -1;
35 public void addListener(ILabelProviderListener listener) {
38 public void removeListener(ILabelProviderListener listener) {
41 public void dispose() {