OMAbstractLine (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
Class OMAbstractLine

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.OMGraphicAdapter
              com.bbn.openmap.omGraphics.OMAbstractLine

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

Direct Known Subclasses:
  OMLine, OMPoly

    public abstract class OMAbstractLine

extends OMGraphicAdapter
implements OMGraphic

The abstract base class of OMPoly and OMLine.

Author:
  Sebastien Rosset
See Also:
  `OMLine`, `OMPoly`, Serialized Form

Field Summary
`protected OMArrowHead` | `arrowhead` The awt object representing the arrowhead.
`protected int` | `nsegs` Number of segments to draw (used only for LINETYPE_GREATCIRCLE or LINETYPE_RHUMB lines).
`protected float[][]` | `xpoints` X coordinate arrays of the projected points.
`protected float[][]` | `ypoints` Y coordinate arrays of the projected points.

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

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
`OMAbstractLine()` Construct a default OMAbstractLine.
`OMAbstractLine(int rType, int lType, int dcType)` Construct an OMAbstractLine.
`OMAbstractLine(int rType, int lType, int dcType, java.awt.Color lc, java.awt.Color fc, java.awt.Color sc)` Construct an OMAbstractLine.

Method Summary
`void` | `addArrowHead(boolean value)` Turn the ArrowHead on/off.
`void` | `addArrowHead(int directionType)` Turn the ArrowHead on.
`void` | `addArrowHead(int directionType, int location)` Turn the ArrowHead on.
`void` | `addArrowHead(int directionType, int location, int tipWidth, int arrowLength)` Turn the ArrowHead on.
`java.awt.geom.GeneralPath` | `createArrowHeads()` Deprecated. Create an OMArrowHead and set it on the OMAbstractLine instead.
`int` | `getArrowDirectionType()` Arrowhead function, to find out the arrowhead direction.
`OMArrowHead` | `getArrowHead()`
`int` | `getArrowLocation()` Arrowhead function, to find out the arrowhead location.
`int` | `getWingLength()` Arrowhead function, to find out the arrowhead length.
`int` | `getWingTip()` Arrowhead function, to find out the wing tip width.
`boolean` | `hasArrowHead()`
`void` | `restore(OMGraphic source)`
`void` | `setArrowHead(OMArrowHead omah)` Set the OMArrowHead object on the OMAbstractLine.

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

Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry
`_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, 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.OMGraphic
`clone, deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, select, setDeclutterType, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill`

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

Field Detail

### xpoints

    protected float[][] xpoints

  X coordinate arrays of the projected points.

### ypoints

    protected float[][] ypoints

  Y coordinate arrays of the projected points.

### nsegs

    protected int nsegs

  Number of segments to draw (used only for LINETYPE_GREATCIRCLE or LINETYPE_RHUMB lines).

### arrowhead

    protected OMArrowHead arrowhead

  The awt object representing the arrowhead.

Constructor Detail

### OMAbstractLine

    public OMAbstractLine()

  Construct a default OMAbstractLine.

### OMAbstractLine

    public OMAbstractLine(int rType,
                          int lType,
                          int dcType)

  Construct an OMAbstractLine. Standard simple constructor that the child OMAbstractLine usually call. All of the other parameters get set to their default values.

  Parameters:
    `rType` - render type
    `lType` - line type
    `dcType` - declutter type

### OMAbstractLine

    public OMAbstractLine(int rType,
                          int lType,
                          int dcType,
                          java.awt.Color lc,
                          java.awt.Color fc,
                          java.awt.Color sc)

  Construct an OMAbstractLine. More complex constructor that lets you set the rest of the parameters.

  Parameters:
    `rType` - render type
    `lType` - line type
    `dcType` - declutter type
    `lc` - line color
    `fc` - fill color
    `sc` - select color

Method Detail

### addArrowHead

    public void addArrowHead(boolean value)

  Turn the ArrowHead on/off. The ArrowHead is placed on the finishing end.

  Parameters:
    `value` - on/off

### setArrowHead

    public void setArrowHead(OMArrowHead omah)

  Set the OMArrowHead object on the OMAbstractLine.

  Parameters:
    `omah` -

### getArrowHead

    public OMArrowHead getArrowHead()

### hasArrowHead

    public boolean hasArrowHead()

### addArrowHead

    public void addArrowHead(int directionType)

  Turn the ArrowHead on. The ArrowHead is placed on the finishing end (OMArrowHead.ARROWHEAD_DIRECTION_FORWARD), beginning end (OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD), or both ends(OMArrowHead.ARROWHEAD_DIRECTION_BOTH).

  Parameters:
    `directionType` - which way to point the arrow head.

### addArrowHead

    public void addArrowHead(int directionType,
                             int location)

  Turn the ArrowHead on. The ArrowHead is placed on the finishing end (OMArrowHead.ARROWHEAD_DIRECTION_FORWARD), beginning end (OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD), or both ends(OMArrowHead.ARROWHEAD_DIRECTION_BOTH).

  Parameters:
    `directionType` - which way to point the arrow head.
    `location` - where on the line to put the arrow head - 0 for the starting point, 100 for the end.

### addArrowHead

    public void addArrowHead(int directionType,
                             int location,
                             int tipWidth,
                             int arrowLength)

  Turn the ArrowHead on. The ArrowHead is placed on the finishing end (OMArrowHead.ARROWHEAD_DIRECTION_FORWARD), beginning end (OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD), or both ends(OMArrowHead.ARROWHEAD_DIRECTION_BOTH).

  Parameters:
    `directionType` - which way to point the arrow head.
    `location` - where on the line to put the arrow head - 0 for the starting point, 100 for the end.
    `tipWidth` - the width factor for the base of the arrowhead, on one side of the line. (Default is 5)
    `arrowLength` - the length factor of the arrowhead, from the tip of the line to the base of the arrowhead. (Default is 20)

### getWingTip

    public int getWingTip()

  Arrowhead function, to find out the wing tip width.

### getWingLength

    public int getWingLength()

  Arrowhead function, to find out the arrowhead length.

### getArrowLocation

    public int getArrowLocation()

  Arrowhead function, to find out the arrowhead location.

### getArrowDirectionType

    public int getArrowDirectionType()

  Arrowhead function, to find out the arrowhead direction.

### createArrowHeads

    public java.awt.geom.GeneralPath createArrowHeads()

  Deprecated. Create an OMArrowHead and set it on the OMAbstractLine instead.

  This is a method that you can extend to create the GeneralPath for the arrowheads, if you want a different way of doing it. By default, it calls OMArrowHead.createArrowHeads(), using the different arrowhead variables set in the OMLine.

### restore

    public void restore(OMGraphic source)

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