001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: MultiLayerRendererItemProvider.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: import net.refractions.udig.project.internal.render.MultiLayerRenderer;
013:
014: import org.eclipse.emf.common.notify.AdapterFactory;
015: import org.eclipse.emf.common.notify.Notification;
016: import org.eclipse.emf.common.util.ResourceLocator;
017: import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
018: import org.eclipse.emf.edit.provider.IItemLabelProvider;
019: import org.eclipse.emf.edit.provider.IItemPropertySource;
020: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
021: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
022:
023: /**
024: * This is the item provider adapter for a
025: * {@link net.refractions.udig.project.internal.render.MultiLayerRenderer} object. <!--
026: * begin-user-doc --> <!-- end-user-doc -->
027: *
028: * @generated
029: */
030: public class MultiLayerRendererItemProvider extends
031: RendererItemProvider implements IEditingDomainItemProvider,
032: IStructuredItemContentProvider, ITreeItemContentProvider,
033: IItemLabelProvider, IItemPropertySource {
034: /**
035: * <!-- begin-user-doc --> <!-- end-user-doc -->
036: *
037: * @generated
038: */
039: public static final String copyright = "uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004, Refractions Research Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details."; //$NON-NLS-1$
040:
041: /**
042: * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
043: * end-user-doc -->
044: *
045: * @generated
046: */
047: public MultiLayerRendererItemProvider(AdapterFactory adapterFactory) {
048: super (adapterFactory);
049: }
050:
051: /**
052: * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
053: * end-user-doc -->
054: *
055: * @generated
056: */
057: public List getPropertyDescriptors(Object object) {
058: if (itemPropertyDescriptors == null) {
059: super .getPropertyDescriptors(object);
060:
061: }
062: return itemPropertyDescriptors;
063: }
064:
065: /**
066: * This returns MultiLayerRenderer.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
067: *
068: * @generated
069: */
070: public Object getImage(Object object) {
071: return getResourceLocator().getImage(
072: "full/obj16/MultiLayerRenderer"); //$NON-NLS-1$
073: }
074:
075: /**
076: * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
077: * -->
078: *
079: * @generated NOT
080: */
081: public String getText(Object object) {
082: String label = ((MultiLayerRenderer) object).getName();
083: return label == null || label.length() == 0 ? "MultiLayerRenderer"
084: : label;
085: }
086:
087: /**
088: * This handles model notifications by calling {@link #updateChildren} to update any cached
089: * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
090: * <!-- begin-user-doc --> <!-- end-user-doc -->
091: *
092: * @generated
093: */
094: public void notifyChanged(Notification notification) {
095: updateChildren(notification);
096: super .notifyChanged(notification);
097: }
098:
099: /**
100: * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
101: * describing all of the children that can be created under this object. <!-- begin-user-doc -->
102: * <!-- end-user-doc -->
103: *
104: * @generated
105: */
106: protected void collectNewChildDescriptors(
107: Collection newChildDescriptors, Object object) {
108: super .collectNewChildDescriptors(newChildDescriptors, object);
109: }
110:
111: /**
112: * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
113: * end-user-doc -->
114: *
115: * @generated
116: */
117: public ResourceLocator getResourceLocator() {
118: return ProjectEditPlugin.INSTANCE;
119: }
120:
121: }
|