Package org.eclipse.jface.viewers
Class TreeViewerRow
java.lang.Object
org.eclipse.jface.viewers.ViewerRow
org.eclipse.jface.viewers.TreeViewerRow
- All Implemented Interfaces:
- Cloneable
TreeViewerRow is the Tree implementation of ViewerRow.
- Since:
- 3.3
- 
Field Summary
- 
Method SummaryModifier and TypeMethodDescriptionclone()getBackground(int columnIndex) Get the background at the columnIndex,Return the bounds for the whole item.getBounds(int columnIndex) Get the bounds of the entry at the columnIndex,intReturn the number of columns for the receiver.Get the Control for the receiver.intgetCreationIndex(int visualIndex) Translate the current column index (as shown in the UI) to the original one.getFont(int columnIndex) Get the font at the columnIndex.getForeground(int columnIndex) Get the foreground at the columnIndex.getImage(int columnIndex) Return the image at the columnIndex.getImageBounds(int index) Returns the location and bounds of the area where the image is drawn.getItem()Return the item for the receiver.getNeighbor(int direction, boolean sameLevel) Returns a neighboring row, ornullif no neighbor exists in the given direction.getText(int columnIndex) Get the text at the columnIndex.getTextBounds(int index) The location and bounds of the area where the text is drawn depends on various things (image displayed, control with SWT.CHECK)The tree path used to identify an element by the unique pathintgetVisualIndex(int creationIndex) Translate the original column index to the actual one.protected booleanscrollCellIntoView(int columnIndex) Scrolls the cell at this index into viewvoidsetBackground(int columnIndex, Color color) Set the background at the columnIndex.voidSet theFontat the columnIndex.voidsetForeground(int columnIndex, Color color) Set the foreground at the columnIndex.voidSet the image at the columnIndexvoidSet the text at the columnIndexMethods inherited from class org.eclipse.jface.viewers.ViewerRowequals, getCell, getCell, getColumnIndex, getStyleRanges, hashCode, isColumnVisible, setStyleRanges
- 
Method Details- 
getBoundsDescription copied from class:ViewerRowGet the bounds of the entry at the columnIndex,
- 
getBoundsDescription copied from class:ViewerRowReturn the bounds for the whole item.
- 
getColumnCountpublic int getColumnCount()Description copied from class:ViewerRowReturn the number of columns for the receiver.- Specified by:
- getColumnCountin class- ViewerRow
- Returns:
- the number of columns
 
- 
getItemDescription copied from class:ViewerRowReturn the item for the receiver.
- 
getBackgroundDescription copied from class:ViewerRowGet the background at the columnIndex,- Specified by:
- getBackgroundin class- ViewerRow
- Parameters:
- columnIndex- column index of interest
- Returns:
- Coloror- null
 
- 
getFontDescription copied from class:ViewerRowGet the font at the columnIndex.
- 
getForegroundDescription copied from class:ViewerRowGet the foreground at the columnIndex.- Specified by:
- getForegroundin class- ViewerRow
- Parameters:
- columnIndex- column index of interest
- Returns:
- Coloror- null
 
- 
getImageDescription copied from class:ViewerRowReturn the image at the columnIndex.
- 
getTextDescription copied from class:ViewerRowGet the text at the columnIndex.
- 
setBackgroundDescription copied from class:ViewerRowSet the background at the columnIndex.- Specified by:
- setBackgroundin class- ViewerRow
- Parameters:
- columnIndex- column index to set color for
- color- color to set
 
- 
setFontDescription copied from class:ViewerRowSet theFontat the columnIndex.
- 
setForegroundDescription copied from class:ViewerRowSet the foreground at the columnIndex.- Specified by:
- setForegroundin class- ViewerRow
- Parameters:
- columnIndex- column index to set color for
- color- color to set
 
- 
setImageDescription copied from class:ViewerRowSet the image at the columnIndex
- 
setTextDescription copied from class:ViewerRowSet the text at the columnIndex
- 
getControlDescription copied from class:ViewerRowGet the Control for the receiver.- Specified by:
- getControlin class- ViewerRow
- Returns:
- Control
 
- 
getNeighborDescription copied from class:ViewerRowReturns a neighboring row, ornullif no neighbor exists in the given direction. IfsameLevelistrue, only sibling rows (under the same parent) will be considered.- Specified by:
- getNeighborin class- ViewerRow
- Parameters:
- direction- the direction- ViewerRow.BELOWor- ViewerRow.ABOVE
- sameLevel- if- true, search only within sibling rows
- Returns:
- the row above/below, or nullif not found
 
- 
getTreePathDescription copied from class:ViewerRowThe tree path used to identify an element by the unique path- Specified by:
- getTreePathin class- ViewerRow
- Returns:
- the path
 
- 
clone
- 
getElement- Specified by:
- getElementin class- ViewerRow
- Returns:
- the model element
 
- 
getVisualIndexpublic int getVisualIndex(int creationIndex) Description copied from class:ViewerRowTranslate the original column index to the actual one.Because of backwards API compatibility the default implementation returns the original index. Implementators of ColumnViewershould overwrite this method if their widget supports reordered columns- Overrides:
- getVisualIndexin class- ViewerRow
- Parameters:
- creationIndex- the original index
- Returns:
- the current index (as shown in the UI)
 
- 
getCreationIndexpublic int getCreationIndex(int visualIndex) Description copied from class:ViewerRowTranslate the current column index (as shown in the UI) to the original one.Because of backwards API compatibility the default implementation returns the original index. Implementators of ColumnViewershould overwrite this method if their widget supports reordered columns- Overrides:
- getCreationIndexin class- ViewerRow
- Parameters:
- visualIndex- the current index (as shown in the UI)
- Returns:
- the original index
 
- 
getTextBoundsDescription copied from class:ViewerRowThe location and bounds of the area where the text is drawn depends on various things (image displayed, control with SWT.CHECK)- Overrides:
- getTextBoundsin class- ViewerRow
- Parameters:
- index- the column index
- Returns:
- the bounds of the of the text area. May return nullif the underlying widget implementation doesn't provide this information
 
- 
getImageBoundsDescription copied from class:ViewerRowReturns the location and bounds of the area where the image is drawn.- Overrides:
- getImageBoundsin class- ViewerRow
- Parameters:
- index- the column index
- Returns:
- the bounds of the of the image area. May return nullif the underlying widget implementation doesn't provide this information
 
- 
scrollCellIntoViewprotected boolean scrollCellIntoView(int columnIndex) Description copied from class:ViewerRowScrolls the cell at this index into viewBecause of backwards API compatibility the default implementation is a no-op. Implementators of ColumnViewershould overwrite this method if their widget supports reordered columns- Overrides:
- scrollCellIntoViewin class- ViewerRow
- Parameters:
- columnIndex- the column index
- Returns:
- return truewhen the cell is scrolled into view
 
 
-