001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: ViewportGraphicsItemProvider.java 24145 2007-02-01 18:03:34Z jeichar $
006: */package net.refractions.udig.project.internal.render.provider;
007:
008: import java.util.Collection;
009: import java.util.List;
010:
011: import net.refractions.udig.project.internal.provider.ProjectEditPlugin;
012:
013: import org.eclipse.emf.common.notify.AdapterFactory;
014: import org.eclipse.emf.common.notify.Notification;
015: import org.eclipse.emf.common.util.ResourceLocator;
016: import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
017: import org.eclipse.emf.edit.provider.IItemLabelProvider;
018: import org.eclipse.emf.edit.provider.IItemPropertySource;
019: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
020: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
021: import org.eclipse.emf.edit.provider.ItemProviderAdapter;
022:
023: /**
024: * This is the item provider adpater for a
025: * {@link net.refractions.udig.ui.GraphicsAdapters.ViewportGraphics} object. <!-- begin-user-doc -->
026: * <!-- end-user-doc -->
027: *
028: * @generated
029: */
030: public class ViewportGraphicsItemProvider extends ItemProviderAdapter
031: implements IEditingDomainItemProvider,
032: IStructuredItemContentProvider, ITreeItemContentProvider,
033: IItemLabelProvider, IItemPropertySource {
034: /**
035: * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
036: * end-user-doc -->
037: *
038: * @generated
039: */
040: public ViewportGraphicsItemProvider(AdapterFactory adapterFactory) {
041: super (adapterFactory);
042: }
043:
044: /**
045: * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
046: * end-user-doc -->
047: *
048: * @generated
049: */
050: public List getPropertyDescriptors(Object object) {
051: if (itemPropertyDescriptors == null) {
052: super .getPropertyDescriptors(object);
053:
054: }
055: return itemPropertyDescriptors;
056: }
057:
058: /**
059: * This returns ViewportGraphics.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
060: *
061: * @generated
062: */
063: public Object getImage(Object object) {
064: return getResourceLocator().getImage(
065: "full/obj16/ViewportGraphics"); //$NON-NLS-1$
066: }
067:
068: /**
069: * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
070: * -->
071: *
072: * @generated NOT
073: */
074: public String getText(Object object) {
075: return "ViewportGraphics";
076: }
077:
078: /**
079: * This handles model notifications by calling {@link #updateChildren} to update any cached
080: * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
081: * <!-- begin-user-doc --> <!-- end-user-doc -->
082: *
083: * @generated
084: */
085: public void notifyChanged(Notification notification) {
086: updateChildren(notification);
087: super .notifyChanged(notification);
088: }
089:
090: /**
091: * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
092: * describing all of the children that can be created under this object. <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: *
095: * @generated
096: */
097: protected void collectNewChildDescriptors(
098: Collection newChildDescriptors, Object object) {
099: super .collectNewChildDescriptors(newChildDescriptors, object);
100: }
101:
102: /**
103: * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
104: * end-user-doc -->
105: *
106: * @generated
107: */
108: public ResourceLocator getResourceLocator() {
109: return ProjectEditPlugin.INSTANCE;
110: }
111:
112: }
|