Package org.eclipse.compare.internal
Class CompareStructureViewerSwitchingPane
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.custom.ViewForm
org.eclipse.compare.CompareViewerPane
org.eclipse.compare.CompareViewerSwitchingPane
org.eclipse.compare.internal.CompareStructureViewerSwitchingPane
- All Implemented Interfaces:
IAdaptable
,IDoubleClickListener
,IOpenListener
,ISelectionChangedListener
,ISelectionProvider
,Drawable
-
Field Summary
Fields inherited from class org.eclipse.swt.custom.ViewForm
borderInsideRGB, borderMiddleRGB, borderOutsideRGB, horizontalSpacing, marginHeight, marginWidth, verticalSpacing
Fields inherited from class org.eclipse.swt.widgets.Widget
nativeZoom
-
Constructor Summary
ConstructorDescriptionCompareStructureViewerSwitchingPane
(Composite parent, int style, boolean visibility, CompareEditorInput cei) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMouseListener
(MouseListener listener) Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in theMouseListener
interface.protected Control
protected Viewer
Returns a viewer which is able to display the given input.protected boolean
inputChanged
(Object input) void
Set the pane's title Image.void
Sets the input object of this pane.void
Set the pane's title text.Methods inherited from class org.eclipse.compare.CompareViewerSwitchingPane
getAdapter, getSelection, getTitleArgument, getViewer, isEmpty, setFocus, setSelection, setTitleArgument
Methods inherited from class org.eclipse.compare.CompareViewerPane
addDoubleClickListener, addOpenListener, addSelectionChangedListener, clearToolBar, doubleClick, getInput, getToolBarManager, open, removeDoubleClickListener, removeOpenListener, removeSelectionChangedListener, selectionChanged
Methods inherited from class org.eclipse.swt.custom.ViewForm
computeTrim, getClientArea, getContent, getTopCenter, getTopLeft, getTopRight, setBorderVisible, setContent, setLayout, setTopCenter, setTopCenterSeparate, setTopLeft, setTopRight
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayoutDeferred, setTabList, toString
Methods inherited from class org.eclipse.swt.widgets.Scrollable
getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsMode
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Constructor Details
-
CompareStructureViewerSwitchingPane
public CompareStructureViewerSwitchingPane(Composite parent, int style, boolean visibility, CompareEditorInput cei)
-
-
Method Details
-
getViewer
Description copied from class:CompareViewerSwitchingPane
Returns a viewer which is able to display the given input. If no viewer can be found,null
is returned. The additional argument oldViewer represents the viewer currently installed in the pane (ornull
if no viewer is installed). It can be returned from this method if the current viewer can deal with the input (and no new viewer must be created).- Specified by:
getViewer
in classCompareViewerSwitchingPane
- Parameters:
oldViewer
- the currently installed viewer ornull
input
- the input object for which a viewer must be determined ornull
- Returns:
- a viewer for the given input, or
null
if no viewer can be determined
-
createTopLeft
- Overrides:
createTopLeft
in classCompareViewerPane
- Parameters:
p
- 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
-
inputChanged
- Overrides:
inputChanged
in classCompareViewerSwitchingPane
- Parameters:
input
- the input- Returns:
- true, if the input is considered as changed
-
setInput
Description copied from class:CompareViewerSwitchingPane
Sets the input object of this pane. For this input object a suitable viewer is determined by calling the abstract methodgetViewer(Viewer, Object)
. If the returned viewer differs from the current one, the old viewer is disposed and the new one installed. Then the input object is fed into the newly installed viewer by calling itssetInput(Object)
method. If new and old viewer don't differ no new viewer is installed but justsetInput(Object)
is called. If the input isnull
the pane is cleared, that is the current viewer is disposed.- Overrides:
setInput
in classCompareViewerSwitchingPane
- Parameters:
input
- the new input object ornull
-
setText
Description copied from class:CompareViewerPane
Set the pane's title text. The valuenull
clears it.- Overrides:
setText
in classCompareViewerPane
- Parameters:
label
- the text to be displayed in the pane or null
-
setImage
Description copied from class:CompareViewerPane
Set the pane's title Image. The valuenull
clears it.- Overrides:
setImage
in classCompareViewerPane
- Parameters:
image
- the image to be displayed in the pane or null
-
addMouseListener
Description copied from class:Control
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in theMouseListener
interface.- Overrides:
addMouseListener
in classControl
- Parameters:
listener
- the listener which should be notified- See Also:
-