Class AbstractTableOrTreeItemWrapper
- java.lang.Object
-
- org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractTableOrTreeItemWrapper
-
public abstract class AbstractTableOrTreeItemWrapper extends Object
A wrapper of Table Item or Tree Item.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description AbstractTableOrTreeItemWrapper()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AbstractTableOrTreeItemWrapper
create(org.eclipse.swt.widgets.Item item)
Create an ItemWrapper from an Item.abstract org.eclipse.swt.graphics.Rectangle
getBounds()
returns the bounds (as Rectangle) of the Item.Object
getData()
Returns the data associated to the Item.abstract org.eclipse.swt.graphics.Image
getImage(int index)
Returns the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist.abstract org.eclipse.swt.graphics.Rectangle
getImageBounds(int index)
Returns a rectangle describing the size and location relative to its parent of an image at a column in the tree or the table.protected abstract org.eclipse.swt.widgets.Item
getItem()
Returns the wrapped Item.abstract org.eclipse.swt.widgets.Scrollable
getParent()
Returns the parent of the Item.abstract int
getParentColumnCount()
Returns the number of columns contained in the receiver.abstract AbstractTableOrTreeItemWrapper
getParentItem()
Returns the parent Item of the receiver.abstract int
getParentItemHeight()
Returns the height of the area which would be used to display the parent item of an Item of the tree or the table.abstract String
getText(int index)
Returns the text stored at the given column index in the receiver, or empty string if the text has not been set.abstract org.eclipse.swt.graphics.Rectangle
getTextBounds(int index)
Returns a rectangle describing the size and location relative to its parent of the text at a column in the tree or the table.boolean
isExpandable()
Returns whether the receiver can be expanded to show children.
-
-
-
Method Detail
-
create
public static AbstractTableOrTreeItemWrapper create(org.eclipse.swt.widgets.Item item)
Create an ItemWrapper from an Item.- Parameters:
item
- the given Item.- Returns:
- the wrapped Item.
-
getItem
protected abstract org.eclipse.swt.widgets.Item getItem()
Returns the wrapped Item.- Returns:
- the wrapped Item.
-
getBounds
public abstract org.eclipse.swt.graphics.Rectangle getBounds()
returns the bounds (as Rectangle) of the Item.- Returns:
- the bounds (as Rectangle) of the Item.
-
getParent
public abstract org.eclipse.swt.widgets.Scrollable getParent()
Returns the parent of the Item.- Returns:
- the parent of the Item.
-
getParentColumnCount
public abstract int getParentColumnCount()
Returns the number of columns contained in the receiver.- Returns:
- the number of columns contained in the receiver.
-
getImageBounds
public abstract org.eclipse.swt.graphics.Rectangle getImageBounds(int index)
Returns a rectangle describing the size and location relative to its parent of an image at a column in the tree or the table.- Parameters:
index
- the index that specifies the column.- Returns:
- a rectangle describing the size and location relative to its parent of an image at a column in the tree or the table.
-
getTextBounds
public abstract org.eclipse.swt.graphics.Rectangle getTextBounds(int index)
Returns a rectangle describing the size and location relative to its parent of the text at a column in the tree or the table.- Parameters:
index
- the index that specifies the column.- Returns:
- a rectangle describing the size and location relative to its parent of the text at a column in the tree or the table.
-
getText
public abstract String getText(int index)
Returns the text stored at the given column index in the receiver, or empty string if the text has not been set.- Parameters:
index
- the index that specifies the column.- Returns:
- the text stored at the given column index in the receiver, or empty string if the text has not been set.
-
getImage
public abstract org.eclipse.swt.graphics.Image getImage(int index)
Returns the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist.- Parameters:
index
- the index that specifies the column.- Returns:
- the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist.
-
getParentItem
public abstract AbstractTableOrTreeItemWrapper getParentItem()
Returns the parent Item of the receiver.- Returns:
- the parent Item of the receiver.
-
getParentItemHeight
public abstract int getParentItemHeight()
Returns the height of the area which would be used to display the parent item of an Item of the tree or the table.- Returns:
- the height of the area which would be used to display the parent item of an Item of the tree or the table.
-
isExpandable
public boolean isExpandable()
Returns whether the receiver can be expanded to show children.- Returns:
- whether the receiver can be expanded to show children.
-
getData
public Object getData()
Returns the data associated to the Item.- Returns:
- the data associated to the Item.
-
-