## org.eclipse.emf.compare.ui.viewer.content.part
Class ModelContentMergeTabItem

    java.lang.Object
      org.eclipse.emf.compare.ui.viewer.content.part.ModelContentMergeTabItem

    public final class ModelContentMergeTabItem

extends java.lang.Object

This class will be used to wrap `Item` subclasses such as `TreeItem` and `TableItem` to allow us to call methods such as `getBounds` without explicitely casting each time we do so.

This wrapper will allow us to maintain a logical structure of the tree : which TreeItem corresponds to which difference or visible parent ...

Constructor Summary
`ModelContentMergeTabItem(DiffElement diff, org.eclipse.swt.widgets.Item actual, org.eclipse.swt.widgets.Item visible, java.lang.String drawingColor)` Constructs a wrapper around the given item.
`ModelContentMergeTabItem(DiffElement diff, org.eclipse.swt.widgets.Item actual, org.eclipse.swt.widgets.Item visible, java.lang.String drawingColor, int curveExpectedY, int curveExpectedSize)` Constructs a wrapper around the given item.
`ModelContentMergeTabItem(DiffElement diff, org.eclipse.swt.widgets.Item actual, java.lang.String drawingColor)` Constructs a wrapper around the given item.

Method Summary
`org.eclipse.swt.widgets.Item` `getActualItem()` Returns the actual item this instance has been created for.
`java.lang.String` `getCurveColor()` Returns the color which should be used when drawing the center curve and other UI colored components using this item.
`int` `getCurveSize()` Returns the size of the center connecting curve.
`int` `getCurveY()` Returns the Y coordinate at which the center connecting curve should be drawn on this item.
`DiffElement` `getDiff()` Returns the represented difference.
`int` `getVerticalOffset()` Returns the offset needed to compensate scroll effects and table headers when painting curve.
`org.eclipse.swt.widgets.Item` `getVisibleItem()` Returns the visible item on which UI marquees should be drawn.
`void` `setCurveSize(int newCurveSize)` Sets a new value for this item's center curve size.
`void` `setCurveY(int newCurveY)` Sets a new value for this item's center curve Y ccordinate.
`void` `setVerticalOffset(int offset)` Specifies offset to compensate scroll effects or table headers when painting curve.
`void` `setVisibleItem(org.eclipse.swt.widgets.Item newVisibleItem)` Sets the visible item for this instance.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ModelContentMergeTabItem

    public ModelContentMergeTabItem(DiffElement diff,
                                    org.eclipse.swt.widgets.Item actual,
                                    org.eclipse.swt.widgets.Item visible,
                                    java.lang.String drawingColor)

  Constructs a wrapper around the given item. This constructor specifies the color to use when drawing UI components with this item.

  Parameters:
    `diff` - Difference represented by this item.
    `actual` - The effective item this instance describes.
    `visible` - The visible item this instance holds UI information for. Defaults as `actual` if `null`.
    `drawingColor` - Key of the color to use when drawing UI components for this item.

### ModelContentMergeTabItem

    public ModelContentMergeTabItem(DiffElement diff,
                                    org.eclipse.swt.widgets.Item actual,
                                    org.eclipse.swt.widgets.Item visible,
                                    java.lang.String drawingColor,
                                    int curveExpectedY,
                                    int curveExpectedSize)

  Constructs a wrapper around the given item. This constructor specifies the color to use when drawing UI components with this item as well as the Y coordinate and size of the center curve connected to this item.

  Parameters:
    `diff` - Difference represented by this item.
    `actual` - The effective item this instance describes.
    `visible` - The visible item this instance holds UI information for. Defaults as `actual` if `null`.
    `drawingColor` - Key of the color to use when drawing UI components for this item.
    `curveExpectedY` - Y coordinate of the center curve for this item.
    `curveExpectedSize` - Size of the center curve for this item.

### ModelContentMergeTabItem

    public ModelContentMergeTabItem(DiffElement diff,
                                    org.eclipse.swt.widgets.Item actual,
                                    java.lang.String drawingColor)

  Constructs a wrapper around the given item. This constructor specifies the color to use when drawing UI components with this item.

  Parameters:
    `diff` - Difference represented by this item.
    `actual` - The effective item this instance describes.
    `drawingColor` - Key of the color to use when drawing UI components for this item.

Method Detail

### getActualItem

    public org.eclipse.swt.widgets.Item getActualItem()

  Returns the actual item this instance has been created for.

  Returns:
    The actual item this instance has been created for.

### getCurveColor

    public java.lang.String getCurveColor()

  Returns the color which should be used when drawing the center curve and other UI colored components using this item.

  If no colors are specified for this item, `org.eclipse.emf.compare.ui.viewer.content.ModelContentMergeViewer#getChangedColor()` will be used as default.

  Returns:
    The color which should be used when drawing UI components.

### getCurveSize

    public int getCurveSize()

  Returns the size of the center connecting curve.

  If it is not specified or is negative, no curve will be drawn.

  Returns:
    The size of the center connecting curve.

### getCurveY

    public int getCurveY()

  Returns the Y coordinate at which the center connecting curve should be drawn on this item.

  If it is not specified or is negative, no curve will be drawn.

  Returns:
    The Y coordinate of the center curve connected to this item.

### getDiff

    public DiffElement getDiff()

  Returns the represented difference.

  Returns:
    The represented difference.

### getVerticalOffset

    public int getVerticalOffset()

  Returns the offset needed to compensate scroll effects and table headers when painting curve.

  Returns:
    the vertical scrollbar offset
  Since:
    1.1

### getVisibleItem

    public org.eclipse.swt.widgets.Item getVisibleItem()

  Returns the visible item on which UI marquees should be drawn.

  Returns:
    The visible item on which UI marquees should be drawn.

### setCurveSize

    public void setCurveSize(int newCurveSize)

  Sets a new value for this item's center curve size.

  Parameters:
    `newCurveSize` - New size to affect to the curve.

### setCurveY

    public void setCurveY(int newCurveY)

  Sets a new value for this item's center curve Y ccordinate.

  Parameters:
    `newCurveY` - New Y coordinate of the center curve for this point.

### setVerticalOffset

    public void setVerticalOffset(int offset)

  Specifies offset to compensate scroll effects or table headers when painting curve.

  Parameters:
    `offset` - the vertical offset
  Since:
    1.1

### setVisibleItem

    public void setVisibleItem(org.eclipse.swt.widgets.Item newVisibleItem)

  Sets the visible item for this instance.

  Parameters:
    `newVisibleItem` - New value of the visible Item reference.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  See Also:
    `Object.toString()`

Copyright 2006 IBM Corporation and others. All Rights Reserved.