Eclipse Platform
Release 3.3

org.eclipse.jface.viewers
Class TreeViewerRow

java.lang.Object
  extended byorg.eclipse.jface.viewers.ViewerRow
      extended byorg.eclipse.jface.viewers.TreeViewerRow
All Implemented Interfaces:
Cloneable

public class TreeViewerRow
extends ViewerRow

TreeViewerRow is the Tree implementation of ViewerRow.

Since:
3.3

Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerRow
ABOVE, BELOW
 
Method Summary
 Object clone()
           
 Color getBackground(int columnIndex)
          Get the background at the columnIndex,
 Rectangle getBounds()
          Return the bounds for the whole item.
 Rectangle getBounds(int columnIndex)
          Get the bounds of the entry at the columnIndex,
 int getColumnCount()
          Return the number of columns for the receiver.
 Control getControl()
          Get the Control for the receiver.
 Object getElement()
           
 Font getFont(int columnIndex)
          Get the font at the columnIndex.
 Color getForeground(int columnIndex)
          Get the foreground at the columnIndex.
 Image getImage(int columnIndex)
          Return the image at the columnIndex.
 Widget getItem()
          Return the item for the receiver.
 ViewerRow getNeighbor(int direction, boolean sameLevel)
          Returns a neighboring row, or null if no neighbor exists in the given direction.
 String getText(int columnIndex)
          Get the text at the columnIndex.
 TreePath getTreePath()
          The tree path used to identify an element by the unique path
 void setBackground(int columnIndex, Color color)
          Set the background at the columnIndex.
 void setFont(int columnIndex, Font font)
          Set the Font at the columnIndex.
 void setForeground(int columnIndex, Color color)
          Set the foreground at the columnIndex.
 void setImage(int columnIndex, Image image)
          Set the image at the columnIndex
 void setText(int columnIndex, String text)
          Set the text at the columnIndex
 
Methods inherited from class org.eclipse.jface.viewers.ViewerRow
equals, getCell, getCell, getColumnIndex, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBounds

public Rectangle getBounds(int columnIndex)
Description copied from class: ViewerRow
Get the bounds of the entry at the columnIndex,

Specified by:
getBounds in class ViewerRow
Parameters:
columnIndex -
Returns:
Rectangle

getBounds

public Rectangle getBounds()
Description copied from class: ViewerRow
Return the bounds for the whole item.

Specified by:
getBounds in class ViewerRow
Returns:
Rectangle

getColumnCount

public int getColumnCount()
Description copied from class: ViewerRow
Return the number of columns for the receiver.

Specified by:
getColumnCount in class ViewerRow
Returns:
the number of columns

getItem

public Widget getItem()
Description copied from class: ViewerRow
Return the item for the receiver.

Specified by:
getItem in class ViewerRow
Returns:
Widget

getBackground

public Color getBackground(int columnIndex)
Description copied from class: ViewerRow
Get the background at the columnIndex,

Specified by:
getBackground in class ViewerRow
Parameters:
columnIndex -
Returns:
Color or null

getFont

public Font getFont(int columnIndex)
Description copied from class: ViewerRow
Get the font at the columnIndex.

Specified by:
getFont in class ViewerRow
Parameters:
columnIndex -
Returns:
Font or null

getForeground

public Color getForeground(int columnIndex)
Description copied from class: ViewerRow
Get the foreground at the columnIndex.

Specified by:
getForeground in class ViewerRow
Parameters:
columnIndex -
Returns:
Color or null

getImage

public Image getImage(int columnIndex)
Description copied from class: ViewerRow
Return the image at the columnIndex.

Specified by:
getImage in class ViewerRow
Parameters:
columnIndex -
Returns:
Image or null

getText

public String getText(int columnIndex)
Description copied from class: ViewerRow
Get the text at the columnIndex.

Specified by:
getText in class ViewerRow
Parameters:
columnIndex -
Returns:
String

setBackground

public void setBackground(int columnIndex,
                          Color color)
Description copied from class: ViewerRow
Set the background at the columnIndex.

Specified by:
setBackground in class ViewerRow
Parameters:
columnIndex -
color -

setFont

public void setFont(int columnIndex,
                    Font font)
Description copied from class: ViewerRow
Set the Font at the columnIndex.

Specified by:
setFont in class ViewerRow
Parameters:
columnIndex -
font -

setForeground

public void setForeground(int columnIndex,
                          Color color)
Description copied from class: ViewerRow
Set the foreground at the columnIndex.

Specified by:
setForeground in class ViewerRow
Parameters:
columnIndex -
color -

setImage

public void setImage(int columnIndex,
                     Image image)
Description copied from class: ViewerRow
Set the image at the columnIndex

Specified by:
setImage in class ViewerRow
Parameters:
columnIndex -
image -

setText

public void setText(int columnIndex,
                    String text)
Description copied from class: ViewerRow
Set the text at the columnIndex

Specified by:
setText in class ViewerRow
Parameters:
columnIndex -
text -

getControl

public Control getControl()
Description copied from class: ViewerRow
Get the Control for the receiver.

Specified by:
getControl in class ViewerRow
Returns:
Control

getNeighbor

public ViewerRow getNeighbor(int direction,
                             boolean sameLevel)
Description copied from class: ViewerRow
Returns a neighboring row, or null if no neighbor exists in the given direction. If sameLevel is true, only sibling rows (under the same parent) will be considered.

Specified by:
getNeighbor in class ViewerRow
Parameters:
direction - the direction ViewerRow.BELOW or ViewerRow.ABOVE
sameLevel - if true, search only within sibling rows
Returns:
the row above/below, or null if not found

getTreePath

public TreePath getTreePath()
Description copied from class: ViewerRow
The tree path used to identify an element by the unique path

Specified by:
getTreePath in class ViewerRow
Returns:
the path

clone

public Object clone()
Specified by:
clone in class ViewerRow

getElement

public Object getElement()
Specified by:
getElement in class ViewerRow
Returns:
the model element

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.