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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(org.eclipse.swt.widgets.Item item)
    Create an ItemWrapper from an Item.
    abstract org.eclipse.swt.graphics.Rectangle
    returns the bounds (as Rectangle) of the Item.
    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
    Returns the wrapped Item.
    abstract org.eclipse.swt.widgets.Scrollable
    Returns the parent of the Item.
    abstract int
    Returns the number of columns contained in the receiver.
    Returns the parent Item of the receiver.
    abstract int
    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
    Returns whether the receiver can be expanded to show children.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractTableOrTreeItemWrapper

      public AbstractTableOrTreeItemWrapper()
  • Method Details

    • 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.