Class ImageMergeViewer

All Implemented Interfaces:
IFlushable, IFlushable2, IPropertyChangeNotifier, IInputProvider, IInputSelectionProvider, ISelectionProvider

public class ImageMergeViewer extends ContentMergeViewer
  • Constructor Details

  • Method Details

    • updateContent

      protected void updateContent(Object ancestor, Object left, Object right)
      Description copied from class: ContentMergeViewer
      Initializes the controls of the three content areas with the given input objects.
      Specified by:
      updateContent in class ContentMergeViewer
      Parameters:
      ancestor - the input for the ancestor area
      left - the input for the left area
      right - the input for the right area
    • getContents

      protected byte[] getContents(boolean left)
      Description copied from class: ContentMergeViewer
      Returns the byte contents of the left or right side. If the viewer has no editable content null can be returned.
      Specified by:
      getContents in class ContentMergeViewer
      Parameters:
      left - if true, the byte contents of the left area is returned; if false, the byte contents of the right area
      Returns:
      the content as an array of bytes, or null
    • createControls

      public void createControls(Composite composite)
      Description copied from class: ContentMergeViewer
      Creates the SWT controls for the ancestor, left, and right content areas of this compare viewer. Implementations typically hold onto the controls so that they can be initialized with the input objects in method updateContent.
      Specified by:
      createControls in class ContentMergeViewer
      Parameters:
      composite - the container for the three areas
    • handleResizeAncestor

      protected void handleResizeAncestor(int x, int y, int width, int height)
      Description copied from class: ContentMergeViewer
      Lays out the ancestor area of the compare viewer. It is called whenever the viewer is resized or when the sashes between the areas are moved to adjust the size of the areas.
      Specified by:
      handleResizeAncestor in class ContentMergeViewer
      Parameters:
      x - the horizontal position of the ancestor area within its container
      y - the vertical position of the ancestor area within its container
      width - the width of the ancestor area
      height - the height of the ancestor area
    • handleResizeLeftRight

      protected void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height)
      Description copied from class: ContentMergeViewer
      Lays out the left and right areas of the compare viewer. It is called whenever the viewer is resized or when the sashes between the areas are moved to adjust the size of the areas.
      Specified by:
      handleResizeLeftRight in class ContentMergeViewer
      Parameters:
      x - the horizontal position of the left area within its container
      y - the vertical position of the left and right area within its container
      width1 - the width of the left area
      centerWidth - the width of the gap between the left and right areas
      width2 - the width of the right area
      height - the height of the left and right areas
    • copy

      protected void copy(boolean leftToRight)
      Description copied from class: ContentMergeViewer
      Copies the content of one side to the other side. Called from the (internal) actions for copying the sides of the viewer's input object.
      Specified by:
      copy in class ContentMergeViewer
      Parameters:
      leftToRight - if true, the left side is copied to the right side; if false, the right side is copied to the left side