oracle.ide.addin
Class ViewSelectionEvent
java.lang.Object
|
+--java.util.EventObject
|
+--oracle.ide.addin.ViewSelectionEvent
- All Implemented Interfaces:
- java.io.Serializable
- public final class ViewSelectionEvent
- extends java.util.EventObject
The ViewSelectionEvent is used to indicate that the selection held by the
a View has been modified. Interested parties are granted access to: the
View upon which the event occured, the complete selection held by the View
at the time of the event and optionally the delta Elements which were added
or removed from the selection (as indicated by the result of getID()).
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Method Summary |
Element[] |
getDelta()
Get the delta to the selection of the View as it was at the time of the
creation of this event. |
int |
getID()
Determine what type of change occurred. |
Element[] |
getSelection()
Get the selection of the View as it was at the time of the creation of
this event. |
View |
getView()
Get the View whose selection has changed. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EMPTY_SELECTION
public static final Element[] EMPTY_SELECTION
SELECTION_ADDED
public static final int SELECTION_ADDED
SELECTION_REMOVED
public static final int SELECTION_REMOVED
SELECTION_CHANGED
public static final int SELECTION_CHANGED
ViewSelectionEvent
public ViewSelectionEvent(View view)
- Constructor. By default sets the type of change as SELECTION_CHANGED.
- Parameters:
view
- the View whose selection has changed.
ViewSelectionEvent
public ViewSelectionEvent(View view,
int id)
- Constructor.
- Parameters:
view
- the View whose selection has changed.id
- indication of what type of change has occured.
ViewSelectionEvent
public ViewSelectionEvent(View view,
int id,
Element[] delta)
- Constructor.
- Parameters:
view
- the View whose selection has changed.id
- indication of what type of change has occured.delta
- the actual Elements that were added/removed.
getID
public int getID()
- Determine what type of change occurred.
- Returns:
- one of SELECTION_ADDED, SELECTION_REMOVED or SELECTION_CHANGED.
getView
public View getView()
- Get the View whose selection has changed. This is functionally equivalent
to casting the result of getSource() to a View object.
- Returns:
- the View whose selection has changed.
getSelection
public Element[] getSelection()
- Get the selection of the View as it was at the time of the creation of
this event.
- Returns:
- an array of selected Elements.
getDelta
public Element[] getDelta()
- Get the delta to the selection of the View as it was at the time of the
creation of this event.
- Returns:
- an array of Elements that were added or removed as indicated by
the result of getID().