PolygonGeometry.XY (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.omGraphics.geom
Class PolygonGeometry.XY

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.geom.PolygonGeometry
              com.bbn.openmap.omGraphics.geom.PolygonGeometry.XY

All Implemented Interfaces:
  OMGeometry, OMGraphicConstants, java.io.Serializable

Direct Known Subclasses:
  PolygonGeometry.Offset, PolylineGeometry.XY

Enclosing class:
  PolygonGeometry

    public static class PolygonGeometry.XY

extends PolygonGeometry

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`PolygonGeometry.LL, PolygonGeometry.Offset, PolygonGeometry.XY`

Field Summary
`protected float[]` | `xs` The array of x pixel coordinates.
`protected float[]` | `ys` The array of y pixel coordinates.

Fields inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`doShapes, isPolygon, xpoints, ypoints`

Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`attributes, lineType, needToRegenerate, shape, visible`

Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
`ADD_GRAPHIC_MASK, APP_OBJECT, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INDEX, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, NO_ROTATE, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED`

Constructor Summary
`protected` | `PolygonGeometry.XY()` To satify the Offset constructor complaint.
`` | `PolygonGeometry.XY(float[] xypoints)` Create an OMPoly from a list of xy pairs.
`` | `PolygonGeometry.XY(float[] xPoints, float[] yPoints)` Create an x/y OMPoly.

Method Summary
`protected java.awt.geom.GeneralPath` | `createShape()` Since OMPoly has the option to not create a Shape, this method is here to create it if it is asked for.
`boolean` | `generate(Projection proj)` Prepare the geometry for rendering.
`int` | `getRenderType()` Return the render type.
`float[]` | `getXs()` Get the array of x points.
`float[]` | `getYs()` Get the array of y points.
`void` | `setLocation(float[] xypoints)` Set an OMPoly from a list of xy pixel pairs.
`void` | `setLocation(float[] xPoints, float[] yPoints)` Set an OMPoly from a x/y coordinates.
`void` | `setXs(float[] x)` Set the array of x points.
`void` | `setYs(float[] y)` Set the array of y points.

Methods inherited from class com.bbn.openmap.omGraphics.geom.PolygonGeometry
`distance, getDoShapes, getIsPolygon, getShape, setDoShapes, setIsPolygon`

Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, deselect, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, isRenderable, isRenderable, isVisible, putAttribute, regenerate, removeAttribute, render, restore, select, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry
`clearAttributes, contains, deselect, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, isRenderable, isRenderable, isVisible, putAttribute, regenerate, removeAttribute, render, restore, select, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible`

Field Detail

### xs

    protected float[] xs

  The array of x pixel coordinates.

### ys

    protected float[] ys

  The array of y pixel coordinates.

Constructor Detail

### PolygonGeometry.XY

    protected PolygonGeometry.XY()

  To satify the Offset constructor complaint.

### PolygonGeometry.XY

    public PolygonGeometry.XY(float[] xypoints)

  Create an OMPoly from a list of xy pairs. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same.

  Parameters:
    `xypoints` - array of x/y points, arranged x, y, x, y, etc.

### PolygonGeometry.XY

    public PolygonGeometry.XY(float[] xPoints,
                              float[] yPoints)

  Create an x/y OMPoly. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same.

  Parameters:
    `xPoints` - float[] of x coordinates
    `yPoints` - float[] of y coordinates

Method Detail

### setLocation

    public void setLocation(float[] xypoints)

  Set an OMPoly from a list of xy pixel pairs. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same. This is for RENDERTYPE_XY polys.

  Parameters:
    `xypoints` - array of x/y points, arranged x, y, x, y, etc.

### setLocation

    public void setLocation(float[] xPoints,
                            float[] yPoints)

  Set an OMPoly from a x/y coordinates. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same. This is for RENDERTYPE_XY polys.

  Parameters:
    `xPoints` - float[] of x coordinates
    `yPoints` - float[] of y coordinates

### setXs

    public void setXs(float[] x)

  Set the array of x points.

### getXs

    public float[] getXs()

  Get the array of x points.

### setYs

    public void setYs(float[] y)

  Set the array of y points.

### getYs

    public float[] getYs()

  Get the array of y points.

### generate

    public boolean generate(Projection proj)

  Description copied from class: `BasicGeometry`
  Prepare the geometry for rendering. This must be done before calling `render()`! If a vector graphic has lat-lon components, then we project these vertices into x-y space. For raster graphics we prepare in a different fashion.

  If the generate is unsuccessful, it's usually because of some oversight, (for instance if `proj` is null), and if debugging is enabled, a message may be output to the controlling terminal.

  Specified by:
    `generate` in interface `OMGeometry`
  Specified by:
    `generate` in class `BasicGeometry`
  Parameters:
    `proj` - Projection
  Returns:
    boolean true if successful, false if not.
  See Also:
    `BasicGeometry.regenerate(com.bbn.openmap.proj.Projection)`

### createShape

    protected java.awt.geom.GeneralPath createShape()

  Description copied from class: `PolygonGeometry`
  Since OMPoly has the option to not create a Shape, this method is here to create it if it is asked for. The OMPoly needs to be generated.

  Specified by:
    `createShape` in class `PolygonGeometry`

### getRenderType

    public int getRenderType()

  Description copied from class: `BasicGeometry`
  Return the render type.

  Specified by:
    `getRenderType` in interface `OMGeometry`
  Specified by:
    `getRenderType` in class `BasicGeometry`
  Returns:
    the rendertype of the object - RENDERTYPE_LATLON, RENDERTYPE_XY, RENDERTYPE_OFFSET and RENDERTYPE_UNKNOWN.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details