|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.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
A CompareViewerPane is a convenience class which installs a
CLabel and a Toolbar in a ViewForm.
Double clicking onto the CompareViewerPane's title bar maximizes
the CompareViewerPane to the size of an enclosing Splitter
(if there is one).
If more Splitters are nested maximizing walks up and
maximizes to the outermost Splitter.
| 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.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
CompareViewerPane(Composite container,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
|
| Method Summary | |
|---|---|
void |
addDoubleClickListener(IDoubleClickListener listener)
Add a double-click listener to the pane. |
void |
addOpenListener(IOpenListener listener)
Add an open listener to the pane. |
void |
addSelectionChangedListener(ISelectionChangedListener l)
Adds a listener for selection changes in this selection provider. |
static void |
clearToolBar(Composite parent)
Clears tool items in the CompareViewerPane's control bar. |
void |
doubleClick(DoubleClickEvent event)
Notifies of a double click. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
Object |
getInput()
Returns the current input of this pane or null if the pane has no input. |
ISelection |
getSelection()
Returns the current selection for this provider. |
static ToolBarManager |
getToolBarManager(Composite parent)
Returns a ToolBarManager if the given parent is a
CompareViewerPane or null otherwise. |
void |
open(OpenEvent event)
Notifies of an open event. |
void |
removeDoubleClickListener(IDoubleClickListener listener)
Remove a double-click listener. |
void |
removeOpenListener(IOpenListener listener)
Remove an open listener. |
void |
removeSelectionChangedListener(ISelectionChangedListener l)
Removes the given selection change listener from this selection provider. |
void |
selectionChanged(SelectionChangedEvent ev)
Notifies that the selection has changed. |
void |
setImage(Image image)
Set the pane's title Image. |
void |
setInput(Object input)
Sets the input object of this pane. |
void |
setSelection(ISelection s)
Sets the current selection for this selection provider. |
void |
setText(String label)
Set the pane's title text. |
| 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, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CompareViewerPane(Composite container,
int style)
container - a widget which will be the container of the new instance (cannot be null)style - the style of widget to construct
IllegalArgumentException - SWTException - | Method Detail |
public void setText(String label)
null clears it.
label - the text to be displayed in the pane or nullpublic void setImage(Image image)
null clears it.
image - the image to be displayed in the pane or nullpublic static ToolBarManager getToolBarManager(Composite parent)
ToolBarManager if the given parent is a
CompareViewerPane or null otherwise.
parent - a Composite or null
ToolBarManager if the given parent is a CompareViewerPane otherwise nullpublic static void clearToolBar(Composite parent)
CompareViewerPane's control bar.
parent - a Composite or nullpublic Object getInput()
Object that is the input to this pane or null if the pane has no input.public void setInput(Object input)
input - the new input object or nullpublic void addSelectionChangedListener(ISelectionChangedListener l)
ISelectionProvider
addSelectionChangedListener in interface ISelectionProviderl - a selection changed listenerpublic void removeSelectionChangedListener(ISelectionChangedListener l)
ISelectionProvider
removeSelectionChangedListener in interface ISelectionProviderl - a selection changed listenerpublic ISelection getSelection()
ISelectionProvider
getSelection in interface ISelectionProviderpublic void setSelection(ISelection s)
ISelectionProvider
setSelection in interface ISelectionProviders - the new selectionpublic void selectionChanged(SelectionChangedEvent ev)
ISelectionChangedListener
selectionChanged in interface ISelectionChangedListenerev - event object describing the changepublic void doubleClick(DoubleClickEvent event)
IDoubleClickListener
doubleClick in interface IDoubleClickListenerevent - event object describing the double-clickpublic void addDoubleClickListener(IDoubleClickListener listener)
listener - the listenerpublic void removeDoubleClickListener(IDoubleClickListener listener)
listener - the listenerpublic void addOpenListener(IOpenListener listener)
listener - the listenerpublic void removeOpenListener(IOpenListener listener)
listener - the listenerpublic void open(OpenEvent event)
IOpenListener
open in interface IOpenListenerevent - event object describing the open eventpublic Object getAdapter(Class adapter)
IAdaptablenull if
no such object can be found.
getAdapter in interface IAdaptableadapter - the adapter class to look up
null if this object does not
have an adapter for the given class
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.