com.ibm.jdg2e.jface.viewers.provider.content
Class LocationsContentProvider

java.lang.Object
  extended bycom.ibm.jdg2e.jface.viewers.provider.content.LocationsContentProvider
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.util.IPropertyChangeListener, org.eclipse.jface.viewers.IStructuredContentProvider

public class LocationsContentProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.util.IPropertyChangeListener


Constructor Summary
LocationsContentProvider()
           
 
Method Summary
 void dispose()
          Clean up refs.
 java.lang.Object[] getElements(java.lang.Object inputElement)
          Return an array of objects; this implementation returns the locations found in the simple input model.
 void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
          Following the pattern of removing listener from old input and adding to new input.
 void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
          Listen for and then respond to changes in the input (RoadTrip) model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationsContentProvider

public LocationsContentProvider()
Method Detail

dispose

public void dispose()
Clean up refs.

Specified by:
dispose in interface org.eclipse.jface.viewers.IContentProvider
See Also:
IContentProvider.dispose()

getElements

public java.lang.Object[] getElements(java.lang.Object inputElement)
Return an array of objects; this implementation returns the locations found in the simple input model.

Specified by:
getElements in interface org.eclipse.jface.viewers.IStructuredContentProvider
See Also:
IStructuredContentProvider.getElements(java.lang.Object)

inputChanged

public void inputChanged(org.eclipse.jface.viewers.Viewer viewer,
                         java.lang.Object oldInput,
                         java.lang.Object newInput)
Following the pattern of removing listener from old input and adding to new input. Net result is there is always a listener, which is correct. The input never changes in this example, but the pattern is followed just in case things do 'change' later.

Specified by:
inputChanged in interface org.eclipse.jface.viewers.IContentProvider
See Also:
IContentProvider.inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)

propertyChange

public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Listen for and then respond to changes in the input (RoadTrip) model.

Specified by:
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener
See Also:
IPropertyChangeListener.propertyChange(org.eclipse.jface.util.PropertyChangeEvent)