Class AbstractTableOrTreeItemWrapper
java.lang.Object
org.eclipse.emf.compare.rcp.ui.internal.mergeviewer.impl.AbstractTableOrTreeItemWrapper
A wrapper of Table Item or Tree Item.
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(org.eclipse.swt.widgets.Item item) Create an ItemWrapper from an Item.abstract org.eclipse.swt.graphics.Rectanglereturns the bounds (as Rectangle) of the Item.getData()Returns the data associated to the Item.abstract org.eclipse.swt.graphics.ImagegetImage(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.RectanglegetImageBounds(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.ItemgetItem()Returns the wrapped Item.abstract org.eclipse.swt.widgets.ScrollableReturns the parent of the Item.abstract intReturns the number of columns contained in the receiver.abstract AbstractTableOrTreeItemWrapperReturns the parent Item of the receiver.abstract intReturns the height of the area which would be used to display the parent item of an Item of the tree or the table.abstract StringgetText(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.RectanglegetTextBounds(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.booleanReturns whether the receiver can be expanded to show children.
-
Constructor Details
-
AbstractTableOrTreeItemWrapper
public AbstractTableOrTreeItemWrapper()
-
-
Method Details
-
create
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
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
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
Returns the data associated to the Item.- Returns:
- the data associated to the Item.
-