001: /*
002: * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
003: * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
004: * under the terms of the GNU Lesser General Public License as published by the Free Software
005: * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
006: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
007: * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
008: */
009: package net.refractions.udig.project.internal;
010:
011: import java.awt.Color;
012: import java.io.IOException;
013: import java.net.URL;
014: import java.util.List;
015: import java.util.concurrent.CopyOnWriteArraySet;
016:
017: import net.refractions.udig.catalog.IGeoResource;
018: import net.refractions.udig.catalog.IResolveChangeEvent;
019: import net.refractions.udig.project.IBlackboard;
020: import net.refractions.udig.project.ILayer;
021: import net.refractions.udig.project.ILayerListener;
022: import net.refractions.udig.project.IMap;
023: import net.refractions.udig.project.LayerEvent;
024: import net.refractions.udig.ui.palette.ColourScheme;
025:
026: import org.eclipse.core.runtime.IProgressMonitor;
027: import org.eclipse.emf.common.notify.Notification;
028: import org.eclipse.emf.common.notify.NotificationChain;
029: import org.eclipse.emf.common.util.EList;
030: import org.eclipse.emf.common.util.TreeIterator;
031: import org.eclipse.emf.common.util.URI;
032: import org.eclipse.emf.ecore.EClass;
033: import org.eclipse.emf.ecore.EObject;
034: import org.eclipse.emf.ecore.EReference;
035: import org.eclipse.emf.ecore.EStructuralFeature;
036: import org.eclipse.emf.ecore.InternalEObject;
037: import org.eclipse.emf.ecore.EStructuralFeature.Setting;
038: import org.eclipse.emf.ecore.resource.Resource;
039: import org.eclipse.emf.ecore.resource.Resource.Internal;
040: import org.eclipse.jface.resource.ImageDescriptor;
041: import org.geotools.data.FeatureEvent;
042: import org.geotools.data.Query;
043: import org.geotools.feature.FeatureType;
044: import org.geotools.filter.Filter;
045: import org.geotools.geometry.jts.ReferencedEnvelope;
046: import org.opengis.referencing.crs.CoordinateReferenceSystem;
047: import org.opengis.referencing.operation.MathTransform;
048:
049: import com.vividsolutions.jts.geom.Envelope;
050:
051: /**
052: * Wraps a layer and delegates all the method calls to that layer. See the gang of four decorator
053: * pattern.
054: *
055: * @author Jesse
056: * @since 1.0.0
057: */
058: public class LayerDecorator implements Layer, InternalEObject {
059:
060: final protected Layer layer;
061:
062: final private InternalEObject interalObject;
063:
064: /**
065: * Listeners to this layer.
066: * <p>
067: * Note this will need to be hooked into the usual EMF adapater mechasim.
068: * </p>
069: */
070: CopyOnWriteArraySet<ILayerListener> listeners = new CopyOnWriteArraySet<ILayerListener>();
071:
072: ILayerListener watcher = new ILayerListener() {
073: public void refresh(LayerEvent event) {
074: LayerEvent myEvent = new LayerEvent(LayerDecorator.this ,
075: event.getType(), event.getOldValue(), event
076: .getNewValue());
077: fireLayerChange(myEvent);
078: }
079: };
080:
081: /**
082: * Construct <code>LayerDecorator</code>.
083: *
084: * @param layer
085: */
086: public LayerDecorator(Layer layer) {
087: this .layer = layer;
088: this .interalObject = (InternalEObject) layer;
089: }
090:
091: /*
092: * @see net.refractions.udig.project.Layer#addListener(net.refractions.udig.project.LayerListener)
093: */
094: public synchronized void addListener(final ILayerListener listener) {
095: if (listeners == null) {
096: listeners = new CopyOnWriteArraySet<ILayerListener>();
097: layer.addListener(watcher);
098: }
099: listeners.add(listener);
100: }
101:
102: /*
103: * @see net.refractions.udig.project.Layer#removeListener(net.refractions.udig.project.LayerListener)
104: */
105: public synchronized void removeListener(
106: final ILayerListener listener) {
107: listeners.remove(listener);
108: if (listeners.size() == 0) {
109: layer.removeListener(watcher);
110: listeners = null;
111: }
112: }
113:
114: protected synchronized void fireLayerChange(LayerEvent event) {
115: if (listeners.size() == 0) {
116: return; // nobody is listenting
117: }
118: for (ILayerListener listener : listeners) {
119: try {
120: listener.refresh(event);
121: } catch (Throwable t) {
122: ProjectPlugin.log("Error in listener:" + listener, t); //$NON-NLS-1$
123: }
124: }
125: }
126:
127: /*
128: * @see net.refractions.udig.project.Layer#properties()
129: */
130: public IBlackboard getProperties() {
131: return layer.getProperties();
132: }
133:
134: /*
135: * @see net.refractions.udig.project.Layer#getContextModel()
136: */
137: public ContextModel getContextModel() {
138: return layer.getContextModel();
139: }
140:
141: /*
142: * @see net.refractions.udig.project.Layer#setContextModel(net.refractions.udig.project.ContextModel)
143: */
144: public void setContextModel(ContextModel value) {
145: layer.setContextModel(value);
146: }
147:
148: /*
149: * @see net.refractions.udig.project.Layer#getFilter()
150: */
151: public Filter getFilter() {
152: return layer.getFilter();
153: }
154:
155: /*
156: * @see net.refractions.udig.project.Layer#setFilter(org.geotools.filter.Filter)
157: */
158: public void setFilter(Filter value) {
159: layer.setFilter(value);
160: }
161:
162: /*
163: * @see net.refractions.udig.project.Layer#getStyleBlackboard()
164: */
165: public StyleBlackboard getStyleBlackboard() {
166: return layer.getStyleBlackboard();
167: }
168:
169: /*
170: * @see net.refractions.udig.project.Layer#setStyleBlackboard(net.refractions.udig.project.StyleBlackboard)
171: */
172: public void setStyleBlackboard(StyleBlackboard value) {
173: layer.setStyleBlackboard(value);
174: }
175:
176: /*
177: * @see net.refractions.udig.project.Layer#getZorder()
178: */
179: public int getZorder() {
180: return layer.getZorder();
181: }
182:
183: /*
184: * @see net.refractions.udig.project.Layer#setZorder(int)
185: */
186: public void setZorder(int value) {
187: layer.setZorder(value);
188: }
189:
190: /*
191: * @see net.refractions.udig.project.Layer#getStatus()
192: */
193: public int getStatus() {
194: return layer.getStatus();
195: }
196:
197: /*
198: * @see net.refractions.udig.project.Layer#setStatus(int)
199: */
200: public void setStatus(int value) {
201: layer.setStatus(value);
202: }
203:
204: /*
205: * @see net.refractions.udig.project.Layer#isApplicable(java.lang.String)
206: */
207: public boolean isApplicable(String toolsetID) {
208: return layer.isApplicable(toolsetID);
209: }
210:
211: /*
212: * @see net.refractions.udig.project.Layer#setApplicable(java.lang.String, boolean)
213: */
214: public void setApplicable(String toolsetID, boolean isApplicable) {
215: layer.setApplicable(toolsetID, isApplicable);
216: }
217:
218: /*
219: * @see net.refractions.udig.project.Layer#isSelectable()
220: */
221: public boolean isSelectable() {
222: return layer.isSelectable();
223: }
224:
225: /*
226: * @see net.refractions.udig.project.Layer#setSelectable(boolean)
227: */
228: public void setSelectable(boolean value) {
229: layer.setSelectable(value);
230: }
231:
232: /*
233: * @see net.refractions.udig.project.Layer#getName()
234: */
235: public String getName() {
236: return layer.getName();
237: }
238:
239: /*
240: * @see net.refractions.udig.project.Layer#setName(java.lang.String)
241: */
242: public void setName(String value) {
243: layer.setName(value);
244: }
245:
246: /*
247: * @see net.refractions.udig.project.Layer#getCatalogRef()
248: */
249: public CatalogRef getCatalogRef() {
250: return layer.getCatalogRef();
251: }
252:
253: /*
254: * @see net.refractions.udig.project.Layer#setCatalogRef(net.refractions.udig.project.LayerRef)
255: */
256: public void setCatalogRef(CatalogRef value) {
257: layer.setCatalogRef(value);
258: }
259:
260: /*
261: * @see net.refractions.udig.project.Layer#getID()
262: */
263: public URL getID() {
264: return layer.getID();
265: }
266:
267: /*
268: * @see net.refractions.udig.project.Layer#setID(java.net.URL)
269: */
270: public void setID(URL value) {
271: layer.setID(value);
272: }
273:
274: /*
275: * @see net.refractions.udig.project.Layer#isVisible()
276: */
277: public boolean isVisible() {
278: return layer.isVisible();
279: }
280:
281: /*
282: * @see net.refractions.udig.project.Layer#setVisible(boolean)
283: */
284: public void setVisible(boolean value) {
285: layer.setVisible(value);
286: }
287:
288: /*
289: * @see net.refractions.udig.project.Layer#getGeoResources()
290: */
291: public List<IGeoResource> getGeoResources() {
292: return layer.getGeoResources();
293: }
294:
295: /*
296: * @see net.refractions.udig.project.Layer#getGlyph()
297: */
298: public ImageDescriptor getGlyph() {
299: return layer.getGlyph();
300: }
301:
302: /*
303: * @see net.refractions.udig.project.Layer#setGlyph(org.eclipse.jface.resource.ImageDescriptor)
304: */
305: public void setGlyph(ImageDescriptor value) {
306: layer.setGlyph(value);
307: }
308:
309: /*
310: * @see net.refractions.udig.project.Layer#getQuery(boolean)
311: */
312: public Query getQuery(boolean selection) {
313: return layer.getQuery(selection);
314: }
315:
316: /*
317: * @see net.refractions.udig.project.Layer#getSchema()
318: */
319: public FeatureType getSchema() {
320: return layer.getSchema();
321: }
322:
323: /*
324: * @see net.refractions.udig.project.Layer#getCRS(org.eclipse.core.runtime.IProgressMonitor)
325: */
326: public CoordinateReferenceSystem getCRS(IProgressMonitor monitor) {
327: return layer.getCRS();
328: }
329:
330: /*
331: * @see net.refractions.udig.project.Layer#getCRS()
332: */
333: public CoordinateReferenceSystem getCRS() {
334: return layer.getCRS();
335: }
336:
337: /*
338: * @see net.refractions.udig.project.Layer#setCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)
339: */
340: public void setCRS(CoordinateReferenceSystem value) {
341: layer.setCRS(value);
342: }
343:
344: /*
345: * @see net.refractions.udig.project.Layer#refresh(com.vividsolutions.jts.geom.Envelope)
346: */
347: public void refresh(Envelope bounds) {
348: layer.refresh(bounds);
349: }
350:
351: /*
352: * @see net.refractions.udig.project.Layer#getMathTransform()
353: */
354: public MathTransform layerToMapTransform() throws IOException {
355: return layer.layerToMapTransform();
356: }
357:
358: /*
359: * @see net.refractions.udig.project.Layer#getBounds(org.eclipse.core.runtime.IProgressMonitor,
360: * org.opengis.referencing.crs.CoordinateReferenceSystem)
361: */
362: public ReferencedEnvelope getBounds(IProgressMonitor monitor,
363: CoordinateReferenceSystem crs) throws IOException {
364: return layer.getBounds(monitor, crs);
365: }
366:
367: /*
368: * @see net.refractions.udig.project.Layer#createBBoxFilter(com.vividsolutions.jts.geom.Envelope)
369: */
370: public Filter createBBoxFilter(Envelope boundingBox,
371: IProgressMonitor monitor) {
372: return layer.createBBoxFilter(boundingBox, monitor);
373: }
374:
375: /*
376: * @see org.eclipse.emf.ecore.EObject#eClass()
377: */
378: public EClass eClass() {
379: return layer.eClass();
380: }
381:
382: /*
383: * @see org.eclipse.emf.ecore.EObject#eResource()
384: */
385: public Resource eResource() {
386: return layer.eResource();
387: }
388:
389: /*
390: * @see org.eclipse.emf.ecore.EObject#eContainer()
391: */
392: public EObject eContainer() {
393: return layer.eContainer();
394: }
395:
396: /*
397: * @see org.eclipse.emf.ecore.EObject#eContainingFeature()
398: */
399: public EStructuralFeature eContainingFeature() {
400: return layer.eContainingFeature();
401: }
402:
403: /*
404: * @see org.eclipse.emf.ecore.EObject#eContainmentFeature()
405: */
406: public EReference eContainmentFeature() {
407: return layer.eContainmentFeature();
408: }
409:
410: /*
411: * @see org.eclipse.emf.ecore.EObject#eContents()
412: */
413: public EList eContents() {
414: return layer.eContents();
415: }
416:
417: /*
418: * @see org.eclipse.emf.ecore.EObject#eAllContents()
419: */
420: public TreeIterator eAllContents() {
421: return layer.eAllContents();
422: }
423:
424: /*
425: * @see org.eclipse.emf.ecore.EObject#eIsProxy()
426: */
427: public boolean eIsProxy() {
428: return layer.eIsProxy();
429: }
430:
431: /*
432: * @see org.eclipse.emf.ecore.EObject#eCrossReferences()
433: */
434: public EList eCrossReferences() {
435: return layer.eCrossReferences();
436: }
437:
438: /*
439: * @see org.eclipse.emf.ecore.EObject#eGet(org.eclipse.emf.ecore.EStructuralFeature)
440: */
441: public Object eGet(EStructuralFeature feature) {
442: return layer.eGet(feature);
443: }
444:
445: /*
446: * @see org.eclipse.emf.ecore.EObject#eGet(org.eclipse.emf.ecore.EStructuralFeature, boolean)
447: */
448: public Object eGet(EStructuralFeature feature, boolean resolve) {
449: return layer.eGet(feature, resolve);
450: }
451:
452: /*
453: * @see org.eclipse.emf.ecore.EObject#eSet(org.eclipse.emf.ecore.EStructuralFeature,
454: * java.lang.Object)
455: */
456: public void eSet(EStructuralFeature feature, Object newValue) {
457: layer.eSet(feature, newValue);
458: }
459:
460: /*
461: * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature)
462: */
463: public boolean eIsSet(EStructuralFeature feature) {
464: return layer.eIsSet(feature);
465: }
466:
467: /*
468: * @see org.eclipse.emf.ecore.EObject#eUnset(org.eclipse.emf.ecore.EStructuralFeature)
469: */
470: public void eUnset(EStructuralFeature feature) {
471: layer.eUnset(feature);
472: }
473:
474: /*
475: * @see org.eclipse.emf.common.notify.Notifier#eAdapters()
476: */
477: public EList eAdapters() {
478: return layer.eAdapters();
479: }
480:
481: /*
482: * @see org.eclipse.emf.common.notify.Notifier#eDeliver()
483: */
484: public boolean eDeliver() {
485: return layer.eDeliver();
486: }
487:
488: /*
489: * @see org.eclipse.emf.common.notify.Notifier#eSetDeliver(boolean)
490: */
491: public void eSetDeliver(boolean deliver) {
492: layer.eSetDeliver(deliver);
493: }
494:
495: /*
496: * @see org.eclipse.emf.common.notify.Notifier#eNotify(org.eclipse.emf.common.notify.Notification)
497: */
498: public void eNotify(Notification notification) {
499: layer.eNotify(notification);
500: }
501:
502: /*
503: * @see java.lang.Comparable#compareTo(java.lang.Object)
504: */
505: public int compareTo(ILayer other) {
506: return layer.compareTo(other);
507: }
508:
509: /**
510: * @see net.refractions.udig.project.internal.Layer#getMap()
511: */
512: public Map getMapInternal() {
513: return layer.getMapInternal();
514: }
515:
516: /**
517: * @see org.eclipse.emf.ecore.InternalEObject#eNotificationRequired()
518: */
519: public boolean eNotificationRequired() {
520: return interalObject.eNotificationRequired();
521: }
522:
523: /**
524: * @see org.eclipse.emf.ecore.InternalEObject#eURIFragmentSegment(org.eclipse.emf.ecore.EStructuralFeature,
525: * org.eclipse.emf.ecore.EObject)
526: */
527: public String eURIFragmentSegment(EStructuralFeature eFeature,
528: EObject eObject) {
529: return interalObject.eURIFragmentSegment(eFeature, eObject);
530: }
531:
532: /**
533: * @see org.eclipse.emf.ecore.InternalEObject#eObjectForURIFragmentSegment(java.lang.String)
534: */
535: public EObject eObjectForURIFragmentSegment(
536: String uriFragmentSegment) {
537: return interalObject
538: .eObjectForURIFragmentSegment(uriFragmentSegment);
539: }
540:
541: /**
542: * @see org.eclipse.emf.ecore.InternalEObject#eSetClass(org.eclipse.emf.ecore.EClass)
543: */
544: public void eSetClass(EClass eClass) {
545: interalObject.eSetClass(eClass);
546: }
547:
548: /**
549: * @see org.eclipse.emf.ecore.InternalEObject#eSetting(org.eclipse.emf.ecore.EStructuralFeature)
550: */
551: public Setting eSetting(EStructuralFeature feature) {
552: return interalObject.eSetting(feature);
553: }
554:
555: /**
556: * @see org.eclipse.emf.ecore.InternalEObject#eBaseStructuralFeatureID(int, java.lang.Class)
557: */
558: public int eBaseStructuralFeatureID(int derivedFeatureID,
559: Class baseClass) {
560: return interalObject.eBaseStructuralFeatureID(derivedFeatureID,
561: baseClass);
562: }
563:
564: /**
565: * @see org.eclipse.emf.ecore.InternalEObject#eContainerFeatureID()
566: */
567: public int eContainerFeatureID() {
568: return interalObject.eContainerFeatureID();
569: }
570:
571: /**
572: * @see org.eclipse.emf.ecore.InternalEObject#eDerivedStructuralFeatureID(int, java.lang.Class)
573: */
574: public int eDerivedStructuralFeatureID(int baseFeatureID,
575: Class baseClass) {
576: return interalObject.eDerivedStructuralFeatureID(baseFeatureID,
577: baseClass);
578: }
579:
580: /**
581: * @see org.eclipse.emf.ecore.InternalEObject#eSetResource(org.eclipse.emf.ecore.resource.Resource.Internal,
582: * org.eclipse.emf.common.notify.NotificationChain)
583: */
584: public NotificationChain eSetResource(Internal resource,
585: NotificationChain notifications) {
586: return interalObject.eSetResource(resource, notifications);
587: }
588:
589: /**
590: * @see org.eclipse.emf.ecore.InternalEObject#eInverseAdd(org.eclipse.emf.ecore.InternalEObject,
591: * int, java.lang.Class, org.eclipse.emf.common.notify.NotificationChain)
592: */
593: public NotificationChain eInverseAdd(InternalEObject otherEnd,
594: int featureID, Class baseClass,
595: NotificationChain notifications) {
596: return interalObject.eInverseAdd(otherEnd, featureID,
597: baseClass, notifications);
598: }
599:
600: /**
601: * @see org.eclipse.emf.ecore.InternalEObject#eInverseRemove(org.eclipse.emf.ecore.InternalEObject,
602: * int, java.lang.Class, org.eclipse.emf.common.notify.NotificationChain)
603: */
604: public NotificationChain eInverseRemove(InternalEObject otherEnd,
605: int featureID, Class baseClass,
606: NotificationChain notifications) {
607: return interalObject.eInverseRemove(otherEnd, featureID,
608: baseClass, notifications);
609: }
610:
611: /**
612: * @see org.eclipse.emf.ecore.InternalEObject#eBasicSetContainer(org.eclipse.emf.ecore.InternalEObject,
613: * int, org.eclipse.emf.common.notify.NotificationChain)
614: */
615: public NotificationChain eBasicSetContainer(
616: InternalEObject newContainer, int newContainerFeatureID,
617: NotificationChain notifications) {
618: return interalObject.eBasicSetContainer(newContainer,
619: newContainerFeatureID, notifications);
620: }
621:
622: /**
623: * @see org.eclipse.emf.ecore.InternalEObject#eBasicRemoveFromContainer(org.eclipse.emf.common.notify.NotificationChain)
624: */
625: public NotificationChain eBasicRemoveFromContainer(
626: NotificationChain notifications) {
627: return interalObject.eBasicRemoveFromContainer(notifications);
628: }
629:
630: /**
631: * @see org.eclipse.emf.ecore.InternalEObject#eProxyURI()
632: */
633: public URI eProxyURI() {
634: return interalObject.eProxyURI();
635: }
636:
637: /**
638: * @see org.eclipse.emf.ecore.InternalEObject#eSetProxyURI(org.eclipse.emf.common.util.URI)
639: */
640: public void eSetProxyURI(URI uri) {
641: interalObject.eSetProxyURI(uri);
642: }
643:
644: /**
645: * @see org.eclipse.emf.ecore.InternalEObject#eResolveProxy(org.eclipse.emf.ecore.InternalEObject)
646: */
647: public EObject eResolveProxy(InternalEObject proxy) {
648: return interalObject.eResolveProxy(proxy);
649: }
650:
651: /**
652: * @see org.eclipse.emf.ecore.InternalEObject#eInternalResource()
653: */
654: public Internal eInternalResource() {
655: return interalObject.eInternalResource();
656: }
657:
658: /**
659: * @see org.eclipse.emf.ecore.InternalEObject#eStore()
660: */
661: public EStore eStore() {
662: return interalObject.eStore();
663: }
664:
665: /**
666: * @see org.eclipse.emf.ecore.InternalEObject#eSetStore(org.eclipse.emf.ecore.InternalEObject.EStore)
667: */
668: public void eSetStore(EStore store) {
669: interalObject.eSetStore(store);
670: }
671:
672: /**
673: * @see net.refractions.udig.project.ILayer#getGeoResource()
674: * @deprecated
675: */
676: public IGeoResource getGeoResource() {
677: return layer.getGeoResource();
678: }
679:
680: /**
681: * @see net.refractions.udig.project.internal.Layer#setGeoResource(net.refractions.udig.catalog.IGeoResource)
682: * @deprecated
683: */
684: public void setGeoResource(IGeoResource value) {
685: layer.setGeoResource(value);
686: }
687:
688: /**
689: * @see net.refractions.udig.project.ILayer#getGeoResource(java.lang.Class)
690: */
691: public <E> E getResource(Class<E> resourceType,
692: IProgressMonitor monitor) throws IOException {
693: return layer.getResource(resourceType, monitor);
694: }
695:
696: /**
697: * The decorated layer
698: *
699: * @return the decorated layer
700: */
701: public Layer getWrappedLayer() {
702: return layer;
703: }
704:
705: /**
706: * @see net.refractions.udig.project.ILayer#getGeoResource(java.lang.Class)
707: * @deprecated
708: */
709: public <T> IGeoResource getGeoResource(Class<T> clazz) {
710: return layer.getGeoResource(clazz);
711: }
712:
713: /**
714: * @see net.refractions.udig.project.ILayer#getMap()
715: */
716: public IMap getMap() {
717: return layer.getMap();
718: }
719:
720: /**
721: * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
722: */
723: public Object getAdapter(Class adapter) {
724: return layer.getAdapter(adapter);
725: }
726:
727: /**
728: * @see net.refractions.udig.core.IBlockingAdaptable#getAdapter(java.lang.Class,
729: * org.eclipse.core.runtime.IProgressMonitor)
730: */
731: public <T> T getAdapter(Class<T> adapter, IProgressMonitor monitor)
732: throws IOException {
733: return layer.getAdapter(adapter, monitor);
734: }
735:
736: /**
737: * @see net.refractions.udig.core.IBlockingAdaptable#canAdaptTo(java.lang.Class)
738: */
739: public <T> boolean canAdaptTo(Class<T> adapter) {
740: return layer.canAdaptTo(adapter);
741: }
742:
743: /**
744: * @see net.refractions.udig.project.internal.Layer#getColourScheme()
745: */
746: public ColourScheme getColourScheme() {
747: return layer.getColourScheme();
748: }
749:
750: /**
751: * @see net.refractions.udig.project.internal.Layer#setColourScheme(net.refractions.udig.ui.palette.ColourScheme)
752: */
753: public void setColourScheme(ColourScheme value) {
754: layer.setColourScheme(value);
755: }
756:
757: /**
758: * @see net.refractions.udig.project.internal.Layer#getDefaultColor()
759: */
760: public Color getDefaultColor() {
761: return layer.getDefaultColor();
762: }
763:
764: /**
765: * @see net.refractions.udig.project.internal.Layer#setDefaultColor(java.awt.Color)
766: */
767: public void setDefaultColor(Color value) {
768: layer.setDefaultColor(value);
769: }
770:
771: /**
772: * @see net.refractions.udig.project.ILayer#mapToLayerTransform()
773: */
774: public MathTransform mapToLayerTransform() throws IOException {
775: return layer.mapToLayerTransform();
776: }
777:
778: /**
779: * @see net.refractions.udig.project.internal.Layer#setStatusMessage(java.lang.String)
780: */
781: public void setStatusMessage(String message) {
782: layer.setStatusMessage(message);
783: }
784:
785: /**
786: * @see net.refractions.udig.project.ILayer#getStatusMessage()
787: */
788: public String getStatusMessage() {
789: return layer.getStatusMessage();
790: }
791:
792: public void changed(IResolveChangeEvent event) {
793: // do nothing. We don't want to give the layer the same event twice.
794: }
795:
796: public List<FeatureEvent> getFeatureChanges() {
797: return layer.getFeatureChanges();
798: }
799:
800: public double getMinScaleDenominator() {
801: return layer.getMinScaleDenominator();
802: }
803:
804: public double getMaxScaleDenominator() {
805: return layer.getMaxScaleDenominator();
806: }
807:
808: public void setMinScaleDenominator(double value) {
809: layer.setMinScaleDenominator(value);
810: }
811:
812: public void setMaxScaleDenominator(double value) {
813: layer.setMaxScaleDenominator(value);
814: }
815:
816: /**
817: * @deprecated
818: */
819: public <T> boolean isType(Class<T> resourceType) {
820: return layer.hasResource(resourceType);
821: }
822:
823: public <T> boolean hasResource(Class<T> resourceType) {
824: return layer.hasResource(resourceType);
825: }
826:
827: public Internal eDirectResource() {
828: return interalObject.eDirectResource();
829: }
830:
831: public Object eGet(EStructuralFeature arg0, boolean arg1,
832: boolean arg2) {
833: return interalObject.eGet(arg0, arg1, arg2);
834: }
835:
836: public Object eGet(int arg0, boolean arg1, boolean arg2) {
837: return interalObject.eGet(arg0, arg1, arg2);
838: }
839:
840: public InternalEObject eInternalContainer() {
841: return interalObject.eInternalContainer();
842: }
843:
844: public boolean eIsSet(int arg0) {
845: return interalObject.eIsSet(arg0);
846: }
847:
848: public void eSet(int arg0, Object arg1) {
849: interalObject.eSet(arg0, arg1);
850: }
851:
852: public void eUnset(int arg0) {
853: interalObject.eUnset(arg0);
854: }
855:
856: public <T> IGeoResource findGeoResource(Class<T> clazz) {
857: return layer.findGeoResource(clazz);
858: }
859:
860: public IBlackboard getBlackboard() {
861: return layer.getBlackboard();
862: }
863:
864: public void setBounds(ReferencedEnvelope bounds) {
865: layer.setBounds(bounds);
866: }
867:
868: }
|