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
Class OMEllipse

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.OMGraphic
              com.bbn.openmap.omGraphics.OMArc
                  com.bbn.openmap.omGraphics.OMCircle
                      com.bbn.openmap.omGraphics.OMEllipse

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

public class OMEllipse
extends OMCircle

The OMEllipse is a lat/lon ellipse, made up of a center lat/lon point, and some length described for the x and y axis. If you want to create ellipses in X/Y space, use OMCircle. Ellipse arcs are not available yet, and this class doesn't really work with the EditableOMCircle. You can use EditableOMCircles to move and delete OMEllipses, but you can't change the axis dimensions.

See Also:
  Serialized Form

Field Summary
`protected double` | `majorAxisSpan`
`protected double` | `minorAxisSpan`
`protected float[]` | `rawllpts`

Fields inherited from class com.bbn.openmap.omGraphics.OMArc
`arcType, center, extent, height, nverts, off_x, off_y, radius, rotationAngle, start, width, x1, y1`

Fields inherited from class com.bbn.openmap.omGraphics.OMGraphic
`declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask`

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

Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
`ADD_GRAPHIC_MASK, 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, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, 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`

Constructor Summary
`OMEllipse(int x1, int y1, int majorAxisSpan, int minorAxisSpan, double rotateAngle)` Create a OMEllipse, positioned with a x-y center with x-y axis.
`OMEllipse(LatLonPoint centerPoint, double majorAxisSpan, double minorAxisSpan, Length units, double rotateAngle)` Create a OMEllipse, positioned with a lat-lon center and a lat-lon axis.
`OMEllipse(LatLonPoint centerPoint, int w, int h, double rotateAngle)` Create a OMEllipse, positioned with a lat-lon center and x-y axis.
`OMEllipse(LatLonPoint centerPoint, int offset_x1, int offset_y1, int w, int h, double rotateAngle)` Create a OMEllipse, positioned at a Lat-lon location, x-y offset, x-y axis.

Method Summary
`float[]` | `createLatLonPoints()` Given that the center point and the axis are set, calculate the new lat/lon points all around the ellipse from the center.
`boolean` | `generate(Projection proj)` Prepare the arc for rendering.
`float[]` | `getLatLonPoints()` Get the float[] of points that make up the ellipse.
`double` | `getMajorAxis()` Get the x axis value.
`double` | `getMinorAxis()` Get the y axis value.
`void` | `setAxis(double majorAxis, double minorAxis, Length units)` Set the axis lengths of the ellipse.
`void` | `setCenter(LatLonPoint llp)` Set the latitude and longitude of the center point.

Methods inherited from class com.bbn.openmap.omGraphics.OMCircle
`createArcShape, getCoordLists, hasLineTypeChoice, shouldCenterBeInShape`

Methods inherited from class com.bbn.openmap.omGraphics.OMArc
`getArcType, getCenter, getExtentAngle, getHeight, getLatLon, getNumVerts, getOffX, getOffY, getPolarCorrection, getPolarShapeLine, getRadius, getRotationAngle, getStartAngle, getWidth, getX, getY, render, setArcType, setExtent, setHeight, setLatLon, setNeedToRegenerate, setNumVerts, setOffX, setOffY, setPolarCorrection, setRadius, setRadius, setRotationAngle, setStart, setWidth, setX, setY`

Methods inherited from class com.bbn.openmap.omGraphics.OMGraphic
`clone, deselect, distance, getDeclutterType, getDescription, getDescription, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, select, setDeclutterType, setEdgeMatchesFill, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShape, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill`

Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setVisible`

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

Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry
`clearAttributes, contains, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setVisible`

Field Detail

### majorAxisSpan

    protected double majorAxisSpan

### minorAxisSpan

    protected double minorAxisSpan

### rawllpts

    protected float[] rawllpts

Constructor Detail

### OMEllipse

    public OMEllipse(LatLonPoint centerPoint,
                     double majorAxisSpan,
                     double minorAxisSpan,
                     Length units,
                     double rotateAngle)

  Create a OMEllipse, positioned with a lat-lon center and a lat-lon axis. Rendertype is RENDERTYPE_LATLON.

Parameters:
  `centerPoint` - latitude/longitude of center point, decimal degrees
  `majorAxisSpan` - horizontal diameter of circle/ellipse, pixels
  `minorAxisSpan` - vertical diameter of circle/ellipse, in given units
  `units` - com.bbn.openmap.proj.Length object.
  `rotateAngle` - angle of rotation in Radians

### OMEllipse

    public OMEllipse(int x1,
                     int y1,
                     int majorAxisSpan,
                     int minorAxisSpan,
                     double rotateAngle)

  Create a OMEllipse, positioned with a x-y center with x-y axis. Rendertype is RENDERTYPE_XY.

Parameters:
  `x1` - window position of center point from left of window, in pixels
  `y1` - window position of center point from top of window, in pixels
  `majorAxisSpan` - horizontal diameter of circle/ellipse, pixels
  `minorAxisSpan` - vertical diameter of circle/ellipse, pixels
  `rotateAngle` - angle of rotation in Radians

### OMEllipse

    public OMEllipse(LatLonPoint centerPoint,
                     int w,
                     int h,
                     double rotateAngle)

  Create a OMEllipse, positioned with a lat-lon center and x-y axis. Rendertype is RENDERTYPE_OFFSET.

Parameters:
  `centerPoint` - latitude/longitude of center point, decimal degrees
  `w` - horizontal diameter of circle/ellipse, pixels
  `h` - vertical diameter of circle/ellipse, pixels
  `rotateAngle` - angle of rotation in Radians

### OMEllipse

    public OMEllipse(LatLonPoint centerPoint,
                     int offset_x1,
                     int offset_y1,
                     int w,
                     int h,
                     double rotateAngle)

  Create a OMEllipse, positioned at a Lat-lon location, x-y offset, x-y axis. Rendertype is RENDERTYPE_OFFSET.

Parameters:
  `centerPoint` - latitude/longitude of center point, decimal degrees
  `offset_x1` - # pixels to the right the center will be moved from lonPoint.
  `offset_y1` - # pixels down that the center will be moved from latPoint.
  `w` - horizontal diameter of circle/ellipse, pixels.
  `h` - vertical diameter of circle/ellipse, pixels.

Method Detail

### setAxis

    public void setAxis(double majorAxis,
                        double minorAxis,
                        Length units)

  Set the axis lengths of the ellipse.

  Parameters:
    `majorAxis` - x direction of ellipse.
    `minorAxis` - y direction of ellipse.
    `units` - com.bbn.openmap.proj.Length object describing units of axis values.

### setCenter

    public void setCenter(LatLonPoint llp)

  Description copied from class: `OMArc`
  Set the latitude and longitude of the center point. This is meaningful only if the rendertype is RENDERTYPE_LATLON or RENDERTYPE_OFFSET.

  Overrides:
    `setCenter` in class `OMArc`
  Parameters:
    `llp` - LatLonPoint of center.

### getMajorAxis

    public double getMajorAxis()

  Get the x axis value.

### getMinorAxis

    public double getMinorAxis()

  Get the y axis value.

### getLatLonPoints

    public float[] getLatLonPoints()

  Get the float[] of points that make up the ellipse. In radians, lat, lon, lat, lon, etc. May be null if generate hasn't been called.

### createLatLonPoints

    public float[] createLatLonPoints()

  Given that the center point and the axis are set, calculate the new lat/lon points all around the ellipse from the center.

### generate

    public boolean generate(Projection proj)

  Description copied from class: `OMArc`
  Prepare the arc for rendering.

  Specified by:
    `generate` in interface `OMGeometry`
  Overrides:
    `generate` in class `OMArc`
  Parameters:
    `proj` - Projection
  Returns:
    true if generate was successful

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