Package com.bbn.openmap.omGraphics

Examples of com.bbn.openmap.omGraphics.OMGraphic


        // Put a flag in here to force the file to be read until EOF
        boolean ignoreFileLength = logger.isLoggable(Level.FINE);

        EsriGraphicFactory.ReadByteTracker byteTracker = new EsriGraphicFactory.ReadByteTracker();
        try {
            OMGraphic eg = makeEsriGraphicFromRecord(offset,
                    shp,
                    drawingAttributes,
                    pointRepresentation,
                    byteTracker);
            // 8 for shape type and record length
View Full Code Here


        // Put a flag in here to force the file to be read until EOF
        boolean ignoreFileLength = logger.isLoggable(Level.FINE);

        EsriGraphicFactory.ReadByteTracker byteTracker = new EsriGraphicFactory.ReadByteTracker();
        try {
            OMGraphic eg = makeEsriGraphicFromRecord(offset,
                    iStream,
                    drawingAttributes,
                    pointRepresentation,
                    byteTracker);
            // 8 for shape type and record length
View Full Code Here

        int recordNumber = shp.readInteger();
        int recordContentLength = shp.readInteger() * 2;
        byteTracker.reset(recordContentLength);

        OMGraphic omg = makeEsriGraphic(shp,
                drawingAttributes,
                pointRepresentation,
                byteTracker);
        if (omg != null) {
            omg.putAttribute(SHAPE_INDEX_ATTRIBUTE, new Integer(recordNumber));
        }

        return omg;
    }
View Full Code Here

        int recordNumber = iStream.readInt();
        int recordContentLength = iStream.readInt() * 2;
        byteTracker.reset(recordContentLength);

        OMGraphic omg = makeEsriGraphic(iStream,
                drawingAttributes,
                pointRepresentation,
                byteTracker);
        if (omg != null) {
            omg.putAttribute(SHAPE_INDEX_ATTRIBUTE, new Integer(recordNumber));
        }

        return omg;
    }
View Full Code Here

        double[] zs = new double[numPoints];
        for (int i = 0; i < numPoints; i++) {
            zs[i] = shpFile.readDouble();
        }

        OMGraphic omg = (OMGraphic) ret;
        omg.putAttribute(ShapeConstants.SHAPE_MIN_Z_ATTRIBUTE, new Double(minZ));
        omg.putAttribute(ShapeConstants.SHAPE_MAX_Z_ATTRIBUTE, new Double(maxZ));
        omg.putAttribute(ShapeConstants.SHAPE_Z_ATTRIBUTE, zs);
        byteTracker.addRead((2 + numPoints) * 8);

        if (byteTracker.numLeft() > 0) {
            double minM = shpFile.readDouble();
            double maxM = shpFile.readDouble();
            double[] ms = new double[numPoints];
            for (int i = 0; i < numPoints; i++) {
                ms[i] = shpFile.readDouble();
            }

            omg.putAttribute(ShapeConstants.SHAPE_MIN_MEASURE_ATTRIBUTE,
                    new Double(minM));
            omg.putAttribute(ShapeConstants.SHAPE_MAX_MEASURE_ATTRIBUTE,
                    new Double(maxM));
            omg.putAttribute(ShapeConstants.SHAPE_MEASURE_ATTRIBUTE, ms);
            byteTracker.addRead((2 + numPoints) * 8);
        }

        return ret;
    }
View Full Code Here

        double[] zs = new double[numPoints];
        for (int i = 0; i < numPoints; i++) {
            zs[i] = iStream.readLEDouble();
        }

        OMGraphic omg = (OMGraphic) ret;
        omg.putAttribute(ShapeConstants.SHAPE_MIN_Z_ATTRIBUTE, new Double(minZ));
        omg.putAttribute(ShapeConstants.SHAPE_MAX_Z_ATTRIBUTE, new Double(maxZ));
        omg.putAttribute(ShapeConstants.SHAPE_Z_ATTRIBUTE, zs);
        byteTracker.addRead((2 + numPoints) * 8);

        if (byteTracker.numLeft() > 0) {
            double minM = iStream.readLEDouble();
            double maxM = iStream.readLEDouble();
            double[] ms = new double[numPoints];
            for (int i = 0; i < numPoints; i++) {
                ms[i] = iStream.readLEDouble();
            }

            omg.putAttribute(ShapeConstants.SHAPE_MIN_MEASURE_ATTRIBUTE,
                    new Double(minM));
            omg.putAttribute(ShapeConstants.SHAPE_MAX_MEASURE_ATTRIBUTE,
                    new Double(maxM));
            omg.putAttribute(ShapeConstants.SHAPE_MEASURE_ATTRIBUTE, ms);
            byteTracker.addRead((2 + numPoints) * 8);
        }

        return ret;
    }
View Full Code Here

            double[] ms = new double[numPoints];
            for (int i = 0; i < numPoints; i++) {
                ms[i] = shpFile.readDouble();
            }

            OMGraphic omg = (OMGraphic) ret;
            omg.putAttribute(ShapeConstants.SHAPE_MIN_MEASURE_ATTRIBUTE,
                    new Double(minM));
            omg.putAttribute(ShapeConstants.SHAPE_MAX_MEASURE_ATTRIBUTE,
                    new Double(maxM));
            omg.putAttribute(ShapeConstants.SHAPE_MEASURE_ATTRIBUTE, ms);
            byteTracker.addRead((2 + numPoints) * 8);
        }
        return ret;
    }
View Full Code Here

            double[] ms = new double[numPoints];
            for (int i = 0; i < numPoints; i++) {
                ms[i] = iStream.readLEDouble();
            }

            OMGraphic omg = (OMGraphic) ret;
            omg.putAttribute(ShapeConstants.SHAPE_MIN_MEASURE_ATTRIBUTE,
                    new Double(minM));
            omg.putAttribute(ShapeConstants.SHAPE_MAX_MEASURE_ATTRIBUTE,
                    new Double(maxM));
            omg.putAttribute(ShapeConstants.SHAPE_MEASURE_ATTRIBUTE, ms);
            byteTracker.addRead((2 + numPoints) * 8);
        }
        return ret;
    }
View Full Code Here

            throw new IllegalArgumentException("not instanceof SimpleBeanObject "
                    + bean);

        SimpleBeanObject obj = (SimpleBeanObject) bean;

        OMGraphic graphic = layer.getGraphic(obj.getId());

        if (graphic instanceof OMRasterObject) {
            return ((OMRasterObject) graphic).getImage();
        } else
            return super.getDragImage(bean);
View Full Code Here

            while (it.hasNext()) {
                if (selectedList == null) {
                    selectedList = new OMGraphicList();
                }

                OMGraphic omg = (OMGraphic) it.next();
                if (omg instanceof OMGraphicList
                        && !((OMGraphicList) omg).isVague()) {
                    select((OMGraphicList) omg);
                } else {
                    selectedList.add(omg);
View Full Code Here

TOP

Related Classes of com.bbn.openmap.omGraphics.OMGraphic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.