Package org.eclipse.compare.internal
Class CompareContentViewerSwitchingPane
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.CompareContentViewerSwitchingPane
- All Implemented Interfaces:
IAdaptable,IDoubleClickListener,IOpenListener,ISelectionChangedListener,ISelectionProvider,Drawable
-
Field Summary
FieldsFields inherited from class org.eclipse.swt.custom.ViewForm
borderInsideRGB, borderMiddleRGB, borderOutsideRGB, horizontalSpacing, marginHeight, marginWidth, verticalSpacingFields inherited from class org.eclipse.swt.widgets.Widget
nativeZoom -
Constructor Summary
ConstructorsConstructorDescriptionCompareContentViewerSwitchingPane(Splitter parent, int style, CompareEditorInput editorInput) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMouseListener(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 theMouseListenerinterface.protected Controlprotected ViewerReturns a viewer which is able to display the given input.protected booleaninputChanged(Object input) voidSet the pane's title Image.voidSets the input object of this pane.voidSet the pane's title text.Methods inherited from class org.eclipse.compare.CompareViewerSwitchingPane
getAdapter, getSelection, getTitleArgument, getViewer, isEmpty, setFocus, setSelection, setTitleArgumentMethods inherited from class org.eclipse.compare.CompareViewerPane
addDoubleClickListener, addOpenListener, addSelectionChangedListener, clearToolBar, doubleClick, getInput, getToolBarManager, open, removeDoubleClickListener, removeOpenListener, removeSelectionChangedListener, selectionChangedMethods inherited from class org.eclipse.swt.custom.ViewForm
computeTrim, getClientArea, getContent, getTopCenter, getTopLeft, getTopRight, setBorderVisible, setContent, setLayout, setTopCenter, setTopCenterSeparate, setTopLeft, setTopRightMethods 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, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsModeMethods 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, updateMethods 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, removeListener, removeTypedListener, reskin, setData, setDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.swt.graphics.Drawable
isAutoScalable
-
Field Details
-
OPTIMIZED_ALGORITHM_USED
- See Also:
-
DISABLE_CAPPING_TEMPORARILY
- See Also:
-
-
Constructor Details
-
CompareContentViewerSwitchingPane
public CompareContentViewerSwitchingPane(Splitter parent, int style, CompareEditorInput editorInput)
-
-
Method Details
-
getViewer
Description copied from class:CompareViewerSwitchingPaneReturns a viewer which is able to display the given input. If no viewer can be found,nullis returned. The additional argument oldViewer represents the viewer currently installed in the pane (ornullif 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:
getViewerin classCompareViewerSwitchingPane- Parameters:
oldViewer- the currently installed viewer ornullinput- the input object for which a viewer must be determined ornull- Returns:
- a viewer for the given input, or
nullif no viewer can be determined
-
createTopLeft
- Overrides:
createTopLeftin 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:
inputChangedin classCompareViewerSwitchingPane- Parameters:
input- the input- Returns:
- true, if the input is considered as changed
-
setInput
Description copied from class:CompareViewerSwitchingPaneSets 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 isnullthe pane is cleared, that is the current viewer is disposed.- Overrides:
setInputin classCompareViewerSwitchingPane- Parameters:
input- the new input object ornull
-
setText
Description copied from class:CompareViewerPaneSet the pane's title text. The valuenullclears it.- Overrides:
setTextin classCompareViewerPane- Parameters:
text- the text to be displayed in the pane or null
-
setImage
Description copied from class:CompareViewerPaneSet the pane's title Image. The valuenullclears it.- Overrides:
setImagein classCompareViewerPane- Parameters:
image- the image to be displayed in the pane or null
-
addMouseListener
Description copied from class:ControlAdds 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 theMouseListenerinterface.- Overrides:
addMouseListenerin classControl- Parameters:
listener- the listener which should be notified- See Also:
-