0001: /**
0002: * <copyright></copyright> $Id: RenderPackageImpl.java 22389 2006-10-25 22:10:46Z chorner $
0003: */package net.refractions.udig.project.internal.render.impl;
0004:
0005: import java.awt.Graphics2D;
0006: import java.awt.Point;
0007: import java.awt.Rectangle;
0008: import java.awt.geom.AffineTransform;
0009: import java.awt.image.BufferedImage;
0010: import java.util.List;
0011:
0012: import net.refractions.udig.catalog.IGeoResource;
0013: import net.refractions.udig.project.ILayer;
0014: import net.refractions.udig.project.internal.ProjectPackage;
0015: import net.refractions.udig.project.internal.impl.ProjectPackageImpl;
0016: import net.refractions.udig.project.internal.render.MultiLayerRenderer;
0017: import net.refractions.udig.project.internal.render.RenderExecutor;
0018: import net.refractions.udig.project.internal.render.RenderFactory;
0019: import net.refractions.udig.project.internal.render.RenderManager;
0020: import net.refractions.udig.project.internal.render.RenderPackage;
0021: import net.refractions.udig.project.internal.render.Renderer;
0022: import net.refractions.udig.project.internal.render.ViewportModel;
0023: import net.refractions.udig.project.render.IMultiLayerRenderer;
0024: import net.refractions.udig.project.render.IRenderManager;
0025: import net.refractions.udig.project.render.IRenderer;
0026: import net.refractions.udig.project.render.IViewportModel;
0027: import net.refractions.udig.project.render.displayAdapter.IMapDisplay;
0028: import net.refractions.udig.project.render.displayAdapter.IMapDisplayListener;
0029:
0030: import org.eclipse.core.runtime.IProgressMonitor;
0031: import org.eclipse.emf.ecore.EAttribute;
0032: import org.eclipse.emf.ecore.EClass;
0033: import org.eclipse.emf.ecore.EDataType;
0034: import org.eclipse.emf.ecore.EOperation;
0035: import org.eclipse.emf.ecore.EPackage;
0036: import org.eclipse.emf.ecore.EReference;
0037: import org.eclipse.emf.ecore.impl.EPackageImpl;
0038: import org.geotools.data.Query;
0039: import org.opengis.referencing.crs.CoordinateReferenceSystem;
0040:
0041: import com.vividsolutions.jts.geom.Coordinate;
0042: import com.vividsolutions.jts.geom.Envelope;
0043:
0044: /**
0045: * <!-- begin-user-doc --> An implementation of the model <b>Package </b>. <!-- end-user-doc -->
0046: *
0047: * @generated
0048: */
0049: public class RenderPackageImpl extends EPackageImpl implements
0050: RenderPackage {
0051:
0052: /**
0053: * <!-- begin-user-doc --> <!-- end-user-doc -->
0054: *
0055: * @generated
0056: */
0057: 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$
0058:
0059: /**
0060: * <!-- begin-user-doc --> <!-- end-user-doc -->
0061: *
0062: * @generated
0063: */
0064: private EClass iRenderManagerEClass = null;
0065:
0066: /**
0067: * <!-- begin-user-doc --> <!-- end-user-doc -->
0068: *
0069: * @generated
0070: */
0071: private EClass iViewportModelEClass = null;
0072:
0073: /**
0074: * <!-- begin-user-doc --> <!-- end-user-doc -->
0075: *
0076: * @generated
0077: */
0078: private EClass iMultiLayerRendererEClass = null;
0079:
0080: /**
0081: * <!-- begin-user-doc --> <!-- end-user-doc -->
0082: *
0083: * @generated
0084: */
0085: private EClass iRendererEClass = null;
0086:
0087: /**
0088: * <!-- begin-user-doc --> <!-- end-user-doc -->
0089: *
0090: * @generated
0091: */
0092: private EClass iLayerEClass = null;
0093:
0094: /**
0095: * <!-- begin-user-doc --> <!-- end-user-doc -->
0096: *
0097: * @generated
0098: */
0099: private EClass multiLayerRendererEClass = null;
0100:
0101: /**
0102: * <!-- begin-user-doc --> <!-- end-user-doc -->
0103: *
0104: * @generated
0105: */
0106: private EClass renderExecutorEClass = null;
0107:
0108: /**
0109: * <!-- begin-user-doc --> <!-- end-user-doc -->
0110: *
0111: * @generated
0112: */
0113: private EClass renderManagerEClass = null;
0114:
0115: /**
0116: * <!-- begin-user-doc --> <!-- end-user-doc -->
0117: *
0118: * @generated
0119: */
0120: private EClass rendererEClass = null;
0121:
0122: /**
0123: * <!-- begin-user-doc --> <!-- end-user-doc -->
0124: *
0125: * @generated
0126: */
0127: private EClass iMapDisplayListenerEClass = null;
0128:
0129: /**
0130: * <!-- begin-user-doc --> <!-- end-user-doc -->
0131: *
0132: * @generated
0133: */
0134: private EClass viewportModelEClass = null;
0135:
0136: /**
0137: * <!-- begin-user-doc --> <!-- end-user-doc -->
0138: *
0139: * @generated
0140: */
0141: private EClass comparableEClass = null;
0142:
0143: /**
0144: * <!-- begin-user-doc --> <!-- end-user-doc -->
0145: *
0146: * @generated
0147: */
0148: private EDataType coordinateReferenceSystemEDataType = null;
0149:
0150: /**
0151: * <!-- begin-user-doc --> <!-- end-user-doc -->
0152: *
0153: * @generated
0154: */
0155: private EDataType envelopeEDataType = null;
0156:
0157: /**
0158: * <!-- begin-user-doc --> <!-- end-user-doc -->
0159: *
0160: * @generated
0161: */
0162: private EDataType iGeoResourceEDataType = null;
0163:
0164: /**
0165: * <!-- begin-user-doc --> <!-- end-user-doc -->
0166: *
0167: * @generated
0168: */
0169: private EDataType bufferedImageEDataType = null;
0170:
0171: /**
0172: * <!-- begin-user-doc --> <!-- end-user-doc -->
0173: *
0174: * @generated
0175: */
0176: private EDataType rectangleEDataType = null;
0177:
0178: /**
0179: * <!-- begin-user-doc --> <!-- end-user-doc -->
0180: *
0181: * @generated
0182: */
0183: private EDataType queryEDataType = null;
0184:
0185: /**
0186: * <!-- begin-user-doc --> <!-- end-user-doc -->
0187: *
0188: * @generated
0189: */
0190: private EDataType graphics2DEDataType = null;
0191:
0192: /**
0193: * <!-- begin-user-doc --> <!-- end-user-doc -->
0194: *
0195: * @generated
0196: */
0197: private EDataType listEDataType = null;
0198:
0199: /**
0200: * <!-- begin-user-doc --> <!-- end-user-doc -->
0201: *
0202: * @generated
0203: */
0204: private EDataType coordinateEDataType = null;
0205:
0206: /**
0207: * <!-- begin-user-doc --> <!-- end-user-doc -->
0208: *
0209: * @generated
0210: */
0211: private EDataType pointEDataType = null;
0212:
0213: /**
0214: * <!-- begin-user-doc --> <!-- end-user-doc -->
0215: *
0216: * @generated
0217: */
0218: private EDataType affineTransformEDataType = null;
0219:
0220: /**
0221: * <!-- begin-user-doc --> <!-- end-user-doc -->
0222: *
0223: * @generated
0224: */
0225: private EDataType mapDisplayEDataType = null;
0226:
0227: /**
0228: * <!-- begin-user-doc --> <!-- end-user-doc -->
0229: *
0230: * @generated
0231: */
0232: private EDataType iProgressMonitorEDataType = null;
0233:
0234: /**
0235: * Creates an instance of the model <b>Package</b>, registered with
0236: * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI
0237: * value.
0238: * <p>
0239: * Note: the correct way to create the package is via the static factory method
0240: * {@link #init init()}, which also performs initialization of the package, or returns the
0241: * registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
0242: *
0243: * @see org.eclipse.emf.ecore.EPackage.Registry
0244: * @see net.refractions.udig.project.internal.render.RenderPackage#eNS_URI
0245: * @see #init()
0246: * @generated
0247: */
0248: private RenderPackageImpl() {
0249: super (eNS_URI, RenderFactory.eINSTANCE);
0250: }
0251:
0252: /**
0253: * <!-- begin-user-doc --> <!-- end-user-doc -->
0254: *
0255: * @generated
0256: */
0257: private static boolean isInited = false;
0258:
0259: /**
0260: * Creates, registers, and initializes the <b>Package</b> for this model, and for any others
0261: * upon which it depends. Simple dependencies are satisfied by calling this method on all
0262: * dependent packages before doing anything else. This method drives initialization for
0263: * interdependent packages directly, in parallel with this package, itself.
0264: * <p>
0265: * Of this package and its interdependencies, all packages which have not yet been registered by
0266: * their URI values are first created and registered. The packages are then initialized in two
0267: * steps: meta-model objects for all of the packages are created before any are initialized,
0268: * since one package's meta-model objects may refer to those of another.
0269: * <p>
0270: * Invocation of this method will not affect any packages that have already been initialized.
0271: * <!-- begin-user-doc --> <!-- end-user-doc -->
0272: *
0273: * @see #eNS_URI
0274: * @see #createPackageContents()
0275: * @see #initializePackageContents()
0276: * @generated
0277: */
0278: public static RenderPackage init() {
0279: if (isInited)
0280: return (RenderPackage) EPackage.Registry.INSTANCE
0281: .getEPackage(RenderPackage.eNS_URI);
0282:
0283: // Obtain or create and register package
0284: RenderPackageImpl theRenderPackage = (RenderPackageImpl) (EPackage.Registry.INSTANCE
0285: .getEPackage(eNS_URI) instanceof RenderPackageImpl ? EPackage.Registry.INSTANCE
0286: .getEPackage(eNS_URI)
0287: : new RenderPackageImpl());
0288:
0289: isInited = true;
0290:
0291: // Obtain or create and register interdependencies
0292: ProjectPackageImpl theProjectPackage = (ProjectPackageImpl) (EPackage.Registry.INSTANCE
0293: .getEPackage(ProjectPackage.eNS_URI) instanceof ProjectPackageImpl ? EPackage.Registry.INSTANCE
0294: .getEPackage(ProjectPackage.eNS_URI)
0295: : ProjectPackage.eINSTANCE);
0296:
0297: // Create package meta-data objects
0298: theRenderPackage.createPackageContents();
0299: theProjectPackage.createPackageContents();
0300:
0301: // Initialize created meta-data
0302: theRenderPackage.initializePackageContents();
0303: theProjectPackage.initializePackageContents();
0304:
0305: // Mark meta-data to indicate it can't be changed
0306: theRenderPackage.freeze();
0307:
0308: return theRenderPackage;
0309: }
0310:
0311: /**
0312: * <!-- begin-user-doc --> <!-- end-user-doc -->
0313: *
0314: * @generated
0315: */
0316: public EClass getIRenderManager() {
0317: return iRenderManagerEClass;
0318: }
0319:
0320: /**
0321: * <!-- begin-user-doc --> <!-- end-user-doc -->
0322: *
0323: * @generated
0324: */
0325: public EClass getIViewportModel() {
0326: return iViewportModelEClass;
0327: }
0328:
0329: /**
0330: * <!-- begin-user-doc --> <!-- end-user-doc -->
0331: *
0332: * @generated
0333: */
0334: public EClass getIMultiLayerRenderer() {
0335: return iMultiLayerRendererEClass;
0336: }
0337:
0338: /**
0339: * <!-- begin-user-doc --> <!-- end-user-doc -->
0340: *
0341: * @generated
0342: */
0343: public EClass getIRenderer() {
0344: return iRendererEClass;
0345: }
0346:
0347: /**
0348: * <!-- begin-user-doc --> <!-- end-user-doc -->
0349: *
0350: * @generated
0351: */
0352: public EClass getILayer() {
0353: return iLayerEClass;
0354: }
0355:
0356: /**
0357: * <!-- begin-user-doc --> <!-- end-user-doc -->
0358: *
0359: * @generated
0360: */
0361: public EClass getMultiLayerRenderer() {
0362: return multiLayerRendererEClass;
0363: }
0364:
0365: /**
0366: * <!-- begin-user-doc --> <!-- end-user-doc -->
0367: *
0368: * @generated
0369: */
0370: public EClass getRenderExecutor() {
0371: return renderExecutorEClass;
0372: }
0373:
0374: /**
0375: * <!-- begin-user-doc --> <!-- end-user-doc -->
0376: *
0377: * @generated
0378: */
0379: public EReference getRenderExecutor_Renderer() {
0380: return (EReference) renderExecutorEClass
0381: .getEStructuralFeatures().get(0);
0382: }
0383:
0384: /**
0385: * <!-- begin-user-doc --> <!-- end-user-doc -->
0386: *
0387: * @generated
0388: */
0389: public EClass getRenderManager() {
0390: return renderManagerEClass;
0391: }
0392:
0393: /**
0394: * <!-- begin-user-doc --> <!-- end-user-doc -->
0395: *
0396: * @generated
0397: */
0398: public EReference getRenderManager_RenderExecutor() {
0399: return (EReference) renderManagerEClass
0400: .getEStructuralFeatures().get(0);
0401: }
0402:
0403: /**
0404: * <!-- begin-user-doc --> <!-- end-user-doc -->
0405: *
0406: * @generated
0407: */
0408: public EAttribute getRenderManager_MapDisplay() {
0409: return (EAttribute) renderManagerEClass
0410: .getEStructuralFeatures().get(1);
0411: }
0412:
0413: /**
0414: * <!-- begin-user-doc --> <!-- end-user-doc -->
0415: *
0416: * @generated
0417: */
0418: public EReference getRenderManager_MapInternal() {
0419: return (EReference) renderManagerEClass
0420: .getEStructuralFeatures().get(2);
0421: }
0422:
0423: /**
0424: * <!-- begin-user-doc --> <!-- end-user-doc -->
0425: *
0426: * @generated
0427: */
0428: public EReference getRenderManager_ViewportModelInternal() {
0429: return (EReference) renderManagerEClass
0430: .getEStructuralFeatures().get(3);
0431: }
0432:
0433: /**
0434: * <!-- begin-user-doc --> <!-- end-user-doc -->
0435: *
0436: * @generated
0437: */
0438: public EClass getRenderer() {
0439: return rendererEClass;
0440: }
0441:
0442: /**
0443: * <!-- begin-user-doc --> <!-- end-user-doc -->
0444: *
0445: * @generated
0446: */
0447: public EAttribute getRenderer_State() {
0448: return (EAttribute) rendererEClass.getEStructuralFeatures()
0449: .get(0);
0450: }
0451:
0452: /**
0453: * <!-- begin-user-doc --> <!-- end-user-doc -->
0454: *
0455: * @generated
0456: */
0457: public EAttribute getRenderer_Name() {
0458: return (EAttribute) rendererEClass.getEStructuralFeatures()
0459: .get(1);
0460: }
0461:
0462: /**
0463: * <!-- begin-user-doc --> <!-- end-user-doc -->
0464: *
0465: * @generated
0466: */
0467: public EReference getRenderer_Context() {
0468: return (EReference) rendererEClass.getEStructuralFeatures()
0469: .get(2);
0470: }
0471:
0472: /**
0473: * <!-- begin-user-doc --> <!-- end-user-doc -->
0474: *
0475: * @generated
0476: */
0477: public EClass getIMapDisplayListener() {
0478: return iMapDisplayListenerEClass;
0479: }
0480:
0481: /**
0482: * <!-- begin-user-doc --> <!-- end-user-doc -->
0483: *
0484: * @generated
0485: */
0486: public EClass getViewportModel() {
0487: return viewportModelEClass;
0488: }
0489:
0490: /**
0491: * <!-- begin-user-doc --> <!-- end-user-doc -->
0492: *
0493: * @generated
0494: */
0495: public EAttribute getViewportModel_CRS() {
0496: return (EAttribute) viewportModelEClass
0497: .getEStructuralFeatures().get(0);
0498: }
0499:
0500: /**
0501: * <!-- begin-user-doc --> <!-- end-user-doc -->
0502: *
0503: * @generated
0504: */
0505: public EAttribute getViewportModel_Bounds() {
0506: return (EAttribute) viewportModelEClass
0507: .getEStructuralFeatures().get(1);
0508: }
0509:
0510: /**
0511: * <!-- begin-user-doc --> <!-- end-user-doc -->
0512: *
0513: * @generated
0514: */
0515: public EAttribute getViewportModel_Center() {
0516: return (EAttribute) viewportModelEClass
0517: .getEStructuralFeatures().get(2);
0518: }
0519:
0520: /**
0521: * <!-- begin-user-doc --> <!-- end-user-doc -->
0522: *
0523: * @generated
0524: */
0525: public EAttribute getViewportModel_Height() {
0526: return (EAttribute) viewportModelEClass
0527: .getEStructuralFeatures().get(3);
0528: }
0529:
0530: /**
0531: * <!-- begin-user-doc --> <!-- end-user-doc -->
0532: *
0533: * @generated
0534: */
0535: public EAttribute getViewportModel_Width() {
0536: return (EAttribute) viewportModelEClass
0537: .getEStructuralFeatures().get(4);
0538: }
0539:
0540: /**
0541: * <!-- begin-user-doc --> <!-- end-user-doc -->
0542: *
0543: * @generated
0544: */
0545: public EAttribute getViewportModel_AspectRatio() {
0546: return (EAttribute) viewportModelEClass
0547: .getEStructuralFeatures().get(5);
0548: }
0549:
0550: /**
0551: * <!-- begin-user-doc --> <!-- end-user-doc -->
0552: *
0553: * @generated
0554: */
0555: public EAttribute getViewportModel_PixelSize() {
0556: return (EAttribute) viewportModelEClass
0557: .getEStructuralFeatures().get(6);
0558: }
0559:
0560: /**
0561: * <!-- begin-user-doc --> <!-- end-user-doc -->
0562: *
0563: * @generated
0564: */
0565: public EReference getViewportModel_MapInternal() {
0566: return (EReference) viewportModelEClass
0567: .getEStructuralFeatures().get(7);
0568: }
0569:
0570: /**
0571: * <!-- begin-user-doc --> <!-- end-user-doc -->
0572: *
0573: * @generated
0574: */
0575: public EReference getViewportModel_RenderManagerInternal() {
0576: return (EReference) viewportModelEClass
0577: .getEStructuralFeatures().get(8);
0578: }
0579:
0580: /**
0581: * <!-- begin-user-doc --> <!-- end-user-doc -->
0582: *
0583: * @generated
0584: */
0585: public EClass getComparable() {
0586: return comparableEClass;
0587: }
0588:
0589: /**
0590: * <!-- begin-user-doc --> <!-- end-user-doc -->
0591: *
0592: * @generated
0593: */
0594: public EDataType getCoordinateReferenceSystem() {
0595: return coordinateReferenceSystemEDataType;
0596: }
0597:
0598: /**
0599: * <!-- begin-user-doc --> <!-- end-user-doc -->
0600: *
0601: * @generated
0602: */
0603: public EDataType getEnvelope() {
0604: return envelopeEDataType;
0605: }
0606:
0607: /**
0608: * <!-- begin-user-doc --> <!-- end-user-doc -->
0609: *
0610: * @generated
0611: */
0612: public EDataType getIGeoResource() {
0613: return iGeoResourceEDataType;
0614: }
0615:
0616: /**
0617: * <!-- begin-user-doc --> <!-- end-user-doc -->
0618: *
0619: * @generated
0620: */
0621: public EDataType getBufferedImage() {
0622: return bufferedImageEDataType;
0623: }
0624:
0625: /**
0626: * <!-- begin-user-doc --> <!-- end-user-doc -->
0627: *
0628: * @generated
0629: */
0630: public EDataType getRectangle() {
0631: return rectangleEDataType;
0632: }
0633:
0634: /**
0635: * <!-- begin-user-doc --> <!-- end-user-doc -->
0636: *
0637: * @generated
0638: */
0639: public EDataType getQuery() {
0640: return queryEDataType;
0641: }
0642:
0643: /**
0644: * <!-- begin-user-doc --> <!-- end-user-doc -->
0645: *
0646: * @generated
0647: */
0648: public EDataType getGraphics2D() {
0649: return graphics2DEDataType;
0650: }
0651:
0652: /**
0653: * <!-- begin-user-doc --> <!-- end-user-doc -->
0654: *
0655: * @generated
0656: */
0657: public EDataType getList() {
0658: return listEDataType;
0659: }
0660:
0661: /**
0662: * <!-- begin-user-doc --> <!-- end-user-doc -->
0663: *
0664: * @generated
0665: */
0666: public EDataType getCoordinate() {
0667: return coordinateEDataType;
0668: }
0669:
0670: /**
0671: * <!-- begin-user-doc --> <!-- end-user-doc -->
0672: *
0673: * @generated
0674: */
0675: public EDataType getPoint() {
0676: return pointEDataType;
0677: }
0678:
0679: /**
0680: * <!-- begin-user-doc --> <!-- end-user-doc -->
0681: *
0682: * @generated
0683: */
0684: public EDataType getAffineTransform() {
0685: return affineTransformEDataType;
0686: }
0687:
0688: /**
0689: * <!-- begin-user-doc --> <!-- end-user-doc -->
0690: *
0691: * @generated
0692: */
0693: public EDataType getMapDisplay() {
0694: return mapDisplayEDataType;
0695: }
0696:
0697: /**
0698: * <!-- begin-user-doc --> <!-- end-user-doc -->
0699: *
0700: * @generated
0701: */
0702: public EDataType getIProgressMonitor() {
0703: return iProgressMonitorEDataType;
0704: }
0705:
0706: /**
0707: * <!-- begin-user-doc --> <!-- end-user-doc -->
0708: *
0709: * @generated public EDataType getInfoList() { return infoListEDataType; }
0710: */
0711:
0712: /**
0713: * <!-- begin-user-doc --> <!-- end-user-doc -->
0714: *
0715: * @generated
0716: */
0717: public RenderFactory getRenderFactory() {
0718: return (RenderFactory) getEFactoryInstance();
0719: }
0720:
0721: /**
0722: * <!-- begin-user-doc --> <!-- end-user-doc -->
0723: *
0724: * @generated
0725: */
0726: private boolean isCreated = false;
0727:
0728: /**
0729: * Creates the meta-model objects for the package. This method is guarded to have no affect on
0730: * any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
0731: *
0732: * @generated
0733: */
0734: public void createPackageContents() {
0735: if (isCreated)
0736: return;
0737: isCreated = true;
0738:
0739: // Create classes and their features
0740: iRenderManagerEClass = createEClass(IRENDER_MANAGER);
0741:
0742: iViewportModelEClass = createEClass(IVIEWPORT_MODEL);
0743:
0744: iMultiLayerRendererEClass = createEClass(IMULTI_LAYER_RENDERER);
0745:
0746: iRendererEClass = createEClass(IRENDERER);
0747:
0748: iLayerEClass = createEClass(ILAYER);
0749:
0750: multiLayerRendererEClass = createEClass(MULTI_LAYER_RENDERER);
0751:
0752: renderExecutorEClass = createEClass(RENDER_EXECUTOR);
0753: createEReference(renderExecutorEClass,
0754: RENDER_EXECUTOR__RENDERER);
0755:
0756: renderManagerEClass = createEClass(RENDER_MANAGER);
0757: createEReference(renderManagerEClass,
0758: RENDER_MANAGER__RENDER_EXECUTOR);
0759: createEAttribute(renderManagerEClass,
0760: RENDER_MANAGER__MAP_DISPLAY);
0761: createEReference(renderManagerEClass,
0762: RENDER_MANAGER__MAP_INTERNAL);
0763: createEReference(renderManagerEClass,
0764: RENDER_MANAGER__VIEWPORT_MODEL_INTERNAL);
0765:
0766: viewportModelEClass = createEClass(VIEWPORT_MODEL);
0767: createEAttribute(viewportModelEClass, VIEWPORT_MODEL__CRS);
0768: createEAttribute(viewportModelEClass, VIEWPORT_MODEL__BOUNDS);
0769: createEAttribute(viewportModelEClass, VIEWPORT_MODEL__CENTER);
0770: createEAttribute(viewportModelEClass, VIEWPORT_MODEL__HEIGHT);
0771: createEAttribute(viewportModelEClass, VIEWPORT_MODEL__WIDTH);
0772: createEAttribute(viewportModelEClass,
0773: VIEWPORT_MODEL__ASPECT_RATIO);
0774: createEAttribute(viewportModelEClass,
0775: VIEWPORT_MODEL__PIXEL_SIZE);
0776: createEReference(viewportModelEClass,
0777: VIEWPORT_MODEL__MAP_INTERNAL);
0778: createEReference(viewportModelEClass,
0779: VIEWPORT_MODEL__RENDER_MANAGER_INTERNAL);
0780:
0781: comparableEClass = createEClass(COMPARABLE);
0782:
0783: rendererEClass = createEClass(RENDERER);
0784: createEAttribute(rendererEClass, RENDERER__STATE);
0785: createEAttribute(rendererEClass, RENDERER__NAME);
0786: createEReference(rendererEClass, RENDERER__CONTEXT);
0787:
0788: iMapDisplayListenerEClass = createEClass(IMAP_DISPLAY_LISTENER);
0789:
0790: // Create data types
0791: coordinateReferenceSystemEDataType = createEDataType(COORDINATE_REFERENCE_SYSTEM);
0792: envelopeEDataType = createEDataType(ENVELOPE);
0793: iGeoResourceEDataType = createEDataType(IGEO_RESOURCE);
0794: bufferedImageEDataType = createEDataType(BUFFERED_IMAGE);
0795: rectangleEDataType = createEDataType(RECTANGLE);
0796: queryEDataType = createEDataType(QUERY);
0797: graphics2DEDataType = createEDataType(GRAPHICS2_D);
0798: listEDataType = createEDataType(LIST);
0799: coordinateEDataType = createEDataType(COORDINATE);
0800: pointEDataType = createEDataType(POINT);
0801: affineTransformEDataType = createEDataType(AFFINE_TRANSFORM);
0802: mapDisplayEDataType = createEDataType(MAP_DISPLAY);
0803: iProgressMonitorEDataType = createEDataType(IPROGRESS_MONITOR);
0804: }
0805:
0806: /**
0807: * <!-- begin-user-doc --> <!-- end-user-doc -->
0808: *
0809: * @generated
0810: */
0811: private boolean isInitialized = false;
0812:
0813: /**
0814: * Complete the initialization of the package and its meta-model. This method is guarded to have
0815: * no affect on any invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
0816: *
0817: * @generated
0818: */
0819: @SuppressWarnings("unchecked")
0820: public void initializePackageContents() {
0821: if (isInitialized)
0822: return;
0823: isInitialized = true;
0824:
0825: // Initialize package
0826: setName(eNAME);
0827: setNsPrefix(eNS_PREFIX);
0828: setNsURI(eNS_URI);
0829:
0830: // Obtain other dependent packages
0831: ProjectPackageImpl theProjectPackage = (ProjectPackageImpl) EPackage.Registry.INSTANCE
0832: .getEPackage(ProjectPackage.eNS_URI);
0833:
0834: // Add supertypes to classes
0835: multiLayerRendererEClass.getESuperTypes().add(
0836: this .getRenderer());
0837: multiLayerRendererEClass.getESuperTypes().add(
0838: this .getIMultiLayerRenderer());
0839: renderExecutorEClass.getESuperTypes().add(this .getRenderer());
0840: renderManagerEClass.getESuperTypes().add(
0841: this .getIRenderManager());
0842: viewportModelEClass.getESuperTypes().add(
0843: this .getIMapDisplayListener());
0844: viewportModelEClass.getESuperTypes().add(
0845: this .getIViewportModel());
0846: rendererEClass.getESuperTypes().add(this .getIRenderer());
0847:
0848: // Initialize classes and features; add operations and parameters
0849: initEClass(
0850: iRenderManagerEClass,
0851: IRenderManager.class,
0852: "IRenderManager", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0853:
0854: initEClass(
0855: iViewportModelEClass,
0856: IViewportModel.class,
0857: "IViewportModel", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0858:
0859: initEClass(
0860: iMultiLayerRendererEClass,
0861: IMultiLayerRenderer.class,
0862: "IMultiLayerRenderer", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0863:
0864: initEClass(
0865: iRendererEClass,
0866: IRenderer.class,
0867: "IRenderer", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0868:
0869: initEClass(
0870: iLayerEClass,
0871: ILayer.class,
0872: "ILayer", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0873:
0874: initEClass(
0875: multiLayerRendererEClass,
0876: MultiLayerRenderer.class,
0877: "MultiLayerRenderer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0878:
0879: addEOperation(multiLayerRendererEClass, null, "refreshImage"); //$NON-NLS-1$
0880:
0881: initEClass(
0882: renderExecutorEClass,
0883: RenderExecutor.class,
0884: "RenderExecutor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0885: initEReference(
0886: getRenderExecutor_Renderer(),
0887: this .getRenderer(),
0888: null,
0889: "renderer", null, 1, 1, RenderExecutor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0890:
0891: initEClass(
0892: renderManagerEClass,
0893: RenderManager.class,
0894: "RenderManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0895: initEReference(
0896: getRenderManager_RenderExecutor(),
0897: this .getRenderExecutor(),
0898: null,
0899: "renderExecutor", null, 0, 1, RenderManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0900: initEAttribute(
0901: getRenderManager_MapDisplay(),
0902: this .getMapDisplay(),
0903: "mapDisplay", null, 0, 1, RenderManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0904: initEReference(
0905: getRenderManager_MapInternal(),
0906: theProjectPackage.getMap(),
0907: theProjectPackage.getMap_RenderManagerInternal(),
0908: "mapInternal", null, 0, 1, RenderManager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0909: initEReference(
0910: getRenderManager_ViewportModelInternal(),
0911: this .getViewportModel(),
0912: this .getViewportModel_RenderManagerInternal(),
0913: "viewportModelInternal", null, 0, 1, RenderManager.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0914:
0915: EOperation op = addEOperation(renderManagerEClass, null,
0916: "refresh"); //$NON-NLS-1$
0917: addEParameter(op, this .getEnvelope(), "bounds"); //$NON-NLS-1$
0918:
0919: addEOperation(renderManagerEClass, null, "dispose"); //$NON-NLS-1$
0920:
0921: initEClass(
0922: viewportModelEClass,
0923: ViewportModel.class,
0924: "ViewportModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
0925: initEAttribute(
0926: getViewportModel_CRS(),
0927: this .getCoordinateReferenceSystem(),
0928: "cRS", null, 0, 1, ViewportModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0929: initEAttribute(
0930: getViewportModel_Bounds(),
0931: this .getEnvelope(),
0932: "bounds", "", 0, 1, ViewportModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
0933: initEAttribute(
0934: getViewportModel_Center(),
0935: this .getCoordinate(),
0936: "center", null, 0, 1, ViewportModel.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0937: initEAttribute(
0938: getViewportModel_Height(),
0939: ecorePackage.getEDouble(),
0940: "height", null, 0, 1, ViewportModel.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0941: initEAttribute(
0942: getViewportModel_Width(),
0943: ecorePackage.getEDouble(),
0944: "width", null, 0, 1, ViewportModel.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0945: initEAttribute(
0946: getViewportModel_AspectRatio(),
0947: ecorePackage.getEDouble(),
0948: "aspectRatio", null, 0, 1, ViewportModel.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0949: initEAttribute(
0950: getViewportModel_PixelSize(),
0951: this .getCoordinate(),
0952: "pixelSize", null, 0, 1, ViewportModel.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0953: initEReference(
0954: getViewportModel_MapInternal(),
0955: theProjectPackage.getMap(),
0956: theProjectPackage.getMap_ViewportModelInternal(),
0957: "mapInternal", null, 0, 1, ViewportModel.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0958: initEReference(
0959: getViewportModel_RenderManagerInternal(),
0960: this .getRenderManager(),
0961: this .getRenderManager_ViewportModelInternal(),
0962: "renderManagerInternal", null, 0, 1, ViewportModel.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
0963:
0964: op = addEOperation(viewportModelEClass, null, "setBounds"); //$NON-NLS-1$
0965: addEParameter(op, ecorePackage.getEDouble(), "minx"); //$NON-NLS-1$
0966: addEParameter(op, ecorePackage.getEDouble(), "maxx"); //$NON-NLS-1$
0967: addEParameter(op, ecorePackage.getEDouble(), "miny"); //$NON-NLS-1$
0968: addEParameter(op, ecorePackage.getEDouble(), "maxy"); //$NON-NLS-1$
0969:
0970: addEOperation(viewportModelEClass, this .getAffineTransform(),
0971: "worldToScreenTransform"); //$NON-NLS-1$
0972:
0973: op = addEOperation(viewportModelEClass, this .getPoint(),
0974: "worldToPixel"); //$NON-NLS-1$
0975: addEParameter(op, this .getCoordinate(), "coord"); //$NON-NLS-1$
0976:
0977: op = addEOperation(viewportModelEClass, this .getCoordinate(),
0978: "pixelToWorld"); //$NON-NLS-1$
0979: addEParameter(op, ecorePackage.getEInt(), "x"); //$NON-NLS-1$
0980: addEParameter(op, ecorePackage.getEInt(), "y"); //$NON-NLS-1$
0981:
0982: op = addEOperation(viewportModelEClass,
0983: this .getViewportModel(), "panUsingScreenCoords"); //$NON-NLS-1$
0984: addEParameter(op, ecorePackage.getEInt(), "xpixels"); //$NON-NLS-1$
0985: addEParameter(op, ecorePackage.getEInt(), "ypixels"); //$NON-NLS-1$
0986:
0987: op = addEOperation(viewportModelEClass,
0988: this .getViewportModel(), "panUsingWorldCoords"); //$NON-NLS-1$
0989: addEParameter(op, ecorePackage.getEDouble(), "x"); //$NON-NLS-1$
0990: addEParameter(op, ecorePackage.getEDouble(), "y"); //$NON-NLS-1$
0991:
0992: op = addEOperation(viewportModelEClass,
0993: this .getViewportModel(), "setZoom"); //$NON-NLS-1$
0994: addEParameter(op, ecorePackage.getEDouble(), "zoom"); //$NON-NLS-1$
0995:
0996: addEOperation(viewportModelEClass, null, "zoomToExtent"); //$NON-NLS-1$
0997:
0998: op = addEOperation(viewportModelEClass, null, "zoomToBox"); //$NON-NLS-1$
0999: addEParameter(op, this .getEnvelope(), "box"); //$NON-NLS-1$
1000:
1001: initEClass(
1002: comparableEClass,
1003: Comparable.class,
1004: "Comparable", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1005:
1006: initEClass(
1007: rendererEClass,
1008: Renderer.class,
1009: "Renderer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1010: initEAttribute(
1011: getRenderer_State(),
1012: ecorePackage.getEInt(),
1013: "state", "0", 0, 1, Renderer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
1014: initEAttribute(
1015: getRenderer_Name(),
1016: ecorePackage.getEString(),
1017: "name", null, 0, 1, Renderer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
1018:
1019: op = addEOperation(rendererEClass, null, "render"); //$NON-NLS-1$
1020: addEParameter(op, this .getGraphics2D(), "destination"); //$NON-NLS-1$
1021: addEParameter(op, this .getIProgressMonitor(), "monitor"); //$NON-NLS-1$
1022:
1023: op = addEOperation(rendererEClass, null, "render"); //$NON-NLS-1$
1024: addEParameter(op, this .getEnvelope(), "bounds"); //$NON-NLS-1$
1025: addEParameter(op, this .getIProgressMonitor(), "monitor"); //$NON-NLS-1$
1026:
1027: addEOperation(rendererEClass, null, "dispose"); //$NON-NLS-1$
1028:
1029: addEParameter(op, theProjectPackage.getLayer(), "layer"); //$NON-NLS-1$
1030:
1031: initEClass(
1032: iMapDisplayListenerEClass,
1033: IMapDisplayListener.class,
1034: "IMapDisplayListener", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1035:
1036: // Initialize data types
1037: initEDataType(
1038: coordinateReferenceSystemEDataType,
1039: CoordinateReferenceSystem.class,
1040: "CoordinateReferenceSystem", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1041: initEDataType(
1042: envelopeEDataType,
1043: Envelope.class,
1044: "Envelope", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1045: initEDataType(
1046: iGeoResourceEDataType,
1047: IGeoResource.class,
1048: "IGeoResource", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1049: initEDataType(
1050: bufferedImageEDataType,
1051: BufferedImage.class,
1052: "BufferedImage", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1053: initEDataType(
1054: rectangleEDataType,
1055: Rectangle.class,
1056: "Rectangle", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1057: initEDataType(queryEDataType, Query.class,
1058: "Query", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1059: initEDataType(
1060: graphics2DEDataType,
1061: Graphics2D.class,
1062: "Graphics2D", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1063: initEDataType(listEDataType, List.class,
1064: "List", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1065: initEDataType(
1066: coordinateEDataType,
1067: Coordinate.class,
1068: "Coordinate", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1069: initEDataType(pointEDataType, Point.class,
1070: "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1071: initEDataType(
1072: affineTransformEDataType,
1073: AffineTransform.class,
1074: "AffineTransform", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1075: initEDataType(
1076: mapDisplayEDataType,
1077: IMapDisplay.class,
1078: "MapDisplay", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1079: initEDataType(
1080: iProgressMonitorEDataType,
1081: IProgressMonitor.class,
1082: "IProgressMonitor", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1083:
1084: // Create resource
1085: createResource(eNS_URI);
1086: }
1087:
1088: } // RenderPackageImpl
|