Class CompareViewerPane

    • Constructor Detail

      • CompareViewerPane

        public CompareViewerPane​(Composite container,
                                 int style)
        Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
        Parameters:
        container - a widget which will be the container of the new instance (cannot be null)
        style - the style of widget to construct
        Throws:
        IllegalArgumentException -
        • ERROR_NULL_ARGUMENT - if the parent is null
        SWTException -
        • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
    • Method Detail

      • createTopLeft

        protected Control createTopLeft​(Composite parent)
        Parameters:
        parent - a widget which will be the parent of the control (cannot be null)
        Returns:
        the control to be placed in the top left corner of the pane
        Restriction:
        This method is not intended to be referenced by clients.
        Restriction:
        This method is not intended to be re-implemented or extended by clients.
      • setText

        public void setText​(String label)
        Set the pane's title text. The value null clears it.
        Parameters:
        label - the text to be displayed in the pane or null
      • setImage

        public void setImage​(Image image)
        Set the pane's title Image. The value null clears it.
        Parameters:
        image - the image to be displayed in the pane or null
      • getToolBarManager

        public static ToolBarManager getToolBarManager​(Composite parent)
        Returns a ToolBarManager if the given parent is a CompareViewerPane or null otherwise.
        Parameters:
        parent - a Composite or null
        Returns:
        a ToolBarManager if the given parent is a CompareViewerPane otherwise null
      • clearToolBar

        public static void clearToolBar​(Composite parent)
        Clears tool items in the CompareViewerPane's control bar.
        Parameters:
        parent - a Composite or null
      • getInput

        public Object getInput()
        Returns the current input of this pane or null if the pane has no input.
        Returns:
        an Object that is the input to this pane or null if the pane has no input.
        Since:
        3.3
      • setInput

        public void setInput​(Object input)
        Sets the input object of this pane.
        Parameters:
        input - the new input object or null
        Since:
        3.3
      • addDoubleClickListener

        public void addDoubleClickListener​(IDoubleClickListener listener)
        Add a double-click listener to the pane. The listener will get invoked when the contents of the pane are double-clicked. Adding a listener that is already registered has no effect.
        Parameters:
        listener - the listener
        Since:
        3.3
      • removeDoubleClickListener

        public void removeDoubleClickListener​(IDoubleClickListener listener)
        Remove a double-click listener. Removing a listener that is not registered has no effect.
        Parameters:
        listener - the listener
        Since:
        3.3
      • addOpenListener

        public void addOpenListener​(IOpenListener listener)
        Add an open listener to the pane. The listener will get invoked when the contents of the pane are double-clicked. Adding a listener that is already registered has no effect.
        Parameters:
        listener - the listener
        Since:
        3.3
      • removeOpenListener

        public void removeOpenListener​(IOpenListener listener)
        Remove an open listener. Removing a listener that is not registered has no effect.
        Parameters:
        listener - the listener
        Since:
        3.3
      • open

        public void open​(OpenEvent event)
        Description copied from interface: IOpenListener
        Notifies of an open event.
        Specified by:
        open in interface IOpenListener
        Parameters:
        event - event object describing the open event
      • getAdapter

        public <T> T getAdapter​(Class<T> adapter)
        Description copied from interface: IAdaptable
        Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

        Clients may implement this method but should generally call Adapters.adapt(Object, Class, boolean) rather than invoking it directly.

        Specified by:
        getAdapter in interface IAdaptable
        Type Parameters:
        T - the class type
        Parameters:
        adapter - the adapter class to look up
        Returns:
        a object of the given class, or null if this object does not have an adapter for the given class