|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.services.elementselection.ElementSelectionComposite
public abstract class ElementSelectionComposite
The element selection composite. The composite functional similar to the JDT select type dialog. There is a filter field and a table containing a list of elements to select from.
The element selection composite requires an IElementSelectionInput as input for the element selection service.
Subclasses must override the isValidSelection(java.util.List)
and
handleSelection(boolean)
to provide custom validation.
Constructor Summary | |
---|---|
ElementSelectionComposite(java.lang.String title,
AbstractElementSelectionInput input)
Constructs a new instance that will create the new composite. |
|
ElementSelectionComposite(java.lang.String title,
AbstractElementSelectionInput input,
ElementSelectionService elementSelectionService)
Constructs a new instance that will create the new composite. |
Method Summary | |
---|---|
void |
cancel()
Cancel the job running the element selection service. |
Composite |
createComposite(Composite parent)
Creates the composite. |
protected void |
createCompositeAdditions(Composite parent)
The method is provided so that clients can add additional fields to the bottom of the selection composite. |
Text |
getFilterText()
Retreive the filter text field. |
java.util.List |
getSelectedElements()
Gets the user selected elements. |
ElementSelectionServiceJob |
getSelectionServiceJob()
Retreive the element selection service job. |
void |
handleFilterChange()
Handles a filter change. |
protected abstract void |
handleSelection(boolean isValid)
Handle a selection change, where the validity of the new selection is encoded in isValid . |
protected void |
handleWidgetDefaultSelected()
Handle the double click of a selection in the table viewer. |
protected abstract boolean |
isValidSelection(java.util.List currentSelectedElements)
Determines if the selected elements are a valid selection. |
void |
matchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
A matching object event has been sent. |
protected void |
setSelection()
If there is no selection in the composite, set the selection to the provided MatchingObject. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElementSelectionComposite(java.lang.String title, AbstractElementSelectionInput input)
title
- the dialog titleinput
- the element selection input.public ElementSelectionComposite(java.lang.String title, AbstractElementSelectionInput input, ElementSelectionService elementSelectionService)
title
- the dialog titleinput
- the element selection inputelementSelectionService
- the selection service to use to process the
inputMethod Detail |
---|
protected abstract boolean isValidSelection(java.util.List currentSelectedElements)
currentSelectedElements
- the selected list of Elements
true
if the selected elements are a valid
selectionprotected abstract void handleSelection(boolean isValid)
isValid
.
isValid
- true
if the new selection is valid,
false
otherwise.public Composite createComposite(Composite parent)
parent
- the parent composite
protected void createCompositeAdditions(Composite parent)
parent
- the parent compositepublic void handleFilterChange()
public java.util.List getSelectedElements()
public void matchingObjectEvent(IMatchingObjectEvent matchingObjectEvent)
IElementSelectionListener
matchingObjectEvent
in interface IElementSelectionListener
public void cancel()
protected void setSelection()
matchingObject
- the MatchingObject to select.public Text getFilterText()
public ElementSelectionServiceJob getSelectionServiceJob()
protected void handleWidgetDefaultSelected()
|
Runtime | |||||||||
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., Borland Software Corp., and others 2005,2006. All rights reserved.