g-Eclipse
Release 1.0.0

eu.geclipse.ui.providers
Class ArrayTableLabelProvider

java.lang.Object
  extended by LabelProvider
      extended by eu.geclipse.ui.providers.ArrayTableLabelProvider

public class ArrayTableLabelProvider
extends LabelProvider

This implementation of the ITableLabelProvider handles the case where the row input of a org.eclipse.jface.viewers.TableViewer is either an array or a Collection. It may be used for table viewers in conjunction with Eclipse's org.eclipse.jface.viewers.ArrayContentProvider in order to display 2-dimensional arrays.


Constructor Summary
ArrayTableLabelProvider()
           
 
Method Summary
 Image getColumnImage(java.lang.Object element, int columnIndex)
          This implementation tries to cast the specified element either to an array or to a Collection and uses afterwards the #getImage(Object) method to retrieve an image for the specified index.
 java.lang.String getColumnText(java.lang.Object element, int columnIndex)
          This implementation tries to cast the specified element either to an array or to a Collection and uses afterwards the #getText(Object) method to retrieve a text for the specified index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayTableLabelProvider

public ArrayTableLabelProvider()
Method Detail

getColumnImage

public Image getColumnImage(java.lang.Object element,
                            int columnIndex)
This implementation tries to cast the specified element either to an array or to a Collection and uses afterwards the #getImage(Object) method to retrieve an image for the specified index. Subclasses may therefore overwrite #getImage(Object).

See Also:
#getImage(Object)

getColumnText

public java.lang.String getColumnText(java.lang.Object element,
                                      int columnIndex)
This implementation tries to cast the specified element either to an array or to a Collection and uses afterwards the #getText(Object) method to retrieve a text for the specified index. Subclasses may therefore overwrite #getText(Object).

See Also:
#getText(Object)

g-Eclipse
Release 1.0.0