public interface ISelectionService
A listener that wants to be notified when the selection becomes
null
must implement the INullSelectionListener
interface.
This interface is not intended to be implemented by clients.
ISelectionListener
,
INullSelectionListener
Modifier and Type | Method and Description |
---|---|
void |
addPostSelectionListener(ISelectionListener listener)
Adds the given post selection listener.It is equivalent to selection
changed if the selection was triggered by the mouse but it has a
delay if the selection is triggered by the keyboard arrows.
|
void |
addPostSelectionListener(String partId,
ISelectionListener listener)
Adds a part-specific selection listener which is notified when selection changes
in the part with the given id.
|
void |
addSelectionListener(ISelectionListener listener)
Adds the given selection listener.
|
void |
addSelectionListener(String partId,
ISelectionListener listener)
Adds a part-specific selection listener which is notified when selection changes
in the part with the given id.
|
ISelection |
getSelection()
Returns the current selection in the active part.
|
ISelection |
getSelection(String partId)
Returns the current selection in the part with the given id.
|
void |
removePostSelectionListener(ISelectionListener listener)
Removes the given post selection listener.
|
void |
removePostSelectionListener(String partId,
ISelectionListener listener)
Removes the given part-specific post selection listener.
|
void |
removeSelectionListener(ISelectionListener listener)
Removes the given selection listener.
|
void |
removeSelectionListener(String partId,
ISelectionListener listener)
Removes the given part-specific selection listener.
|
void addSelectionListener(ISelectionListener listener)
listener
- a selection listenervoid addSelectionListener(String partId, ISelectionListener listener)
When the part is created, the listener is passed the part's initial selection.
When the part is disposed, the listener is passed a null
selection,
but only if the listener implements INullSelectionListener
.
partId
- the id of the part to tracklistener
- a selection listenervoid addPostSelectionListener(ISelectionListener listener)
listener
- a selection listenervoid addPostSelectionListener(String partId, ISelectionListener listener)
When the part is created, the listener is passed the part's initial selection.
When the part is disposed, the listener is passed a null
selection,
but only if the listener implements INullSelectionListener
.
partId
- the id of the part to tracklistener
- a selection listenerISelection getSelection()
null
.null
if undefinedISelection getSelection(String partId)
null
.partId
- the id of the partnull
if undefinedvoid removeSelectionListener(ISelectionListener listener)
listener
- a selection listenervoid removeSelectionListener(String partId, ISelectionListener listener)
partId
- the id of the part to tracklistener
- a selection listenervoid removePostSelectionListener(ISelectionListener listener)
listener
- a selection listenervoid removePostSelectionListener(String partId, ISelectionListener listener)
partId
- the id of the part to tracklistener
- a selection listenerGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.