[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[ews.eclipse.technology.rap] Re: Selection Listener Problem
|
- From: kathir@xxxxxxxxx (Kathiravan )
- Date: Mon, 31 Aug 2009 07:20:46 +0000 (UTC)
- Newsgroups: eclipse.technology.rap
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I dont think i understand it clearly. I have the
ControlLCAUtil.processSelection(widget, null, false); in the readData
method.
The Design widget implements ISelectionProvider and
designWidget.setSelectedPart basically calls the setSelection on the
design widget.
DesignWidget designWidget = (DesignWidget) widget;
String location = WidgetLCAUtil.readPropertyValue(designWidget,
PARAM_SELECTED);
designWidget.setSelectedPart(location);
Am i doing it right?. or the way i implemented the ISelectionProvider is
wrong?
public void addSelectionChangedListener(ISelectionChangedListener
listener) {
listeners.add(listener);
}
public ISelection getSelection() {
return _selection;
}
public void removeSelectionChangedListener(
ISelectionChangedListener listener) {
listeners.remove(listener);
}
public void setSelection(ISelection selection) {
_selection = selection;
Object[] list = listeners.getListeners();
for (int i = 0; i < list.length; i++) {
((ISelectionChangedListener) list[i])
.selectionChanged(new SelectionChangedEvent(this,
_selection));
}
}
Is there anything special i should do on the DesignWidget.js to get the
selection stuff work right?