public class OMArrowHead
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
arrowDirectionType |
static int |
ARROWHEAD_DIRECTION_BACKWARD |
static int |
ARROWHEAD_DIRECTION_BOTH |
static int |
ARROWHEAD_DIRECTION_FORWARD |
protected static int |
DEFAULT_WINGLENGTH |
protected static int |
DEFAULT_WINGTIP |
protected int |
location |
protected java.awt.Shape |
shape |
protected int |
wingLength |
protected int |
wingTip |
Constructor and Description |
---|
OMArrowHead(int arrowDirectionType,
int location) |
OMArrowHead(int arrowDirectionType,
int location,
int wingtip,
int winglength) |
Modifier and Type | Method and Description |
---|---|
static void |
addArrowHeads(int arrowDirectionType,
int location,
OMAbstractLine line) |
protected static java.awt.geom.GeneralPath |
createArrowHead(java.awt.geom.Point2D from,
java.awt.geom.Point2D to,
int wingTip,
int wingLength) |
static java.awt.geom.GeneralPath |
createArrowHeads(int arrowDirectionType,
int location,
OMAbstractLine line)
Create an arrowhead for the provided line
|
static java.awt.geom.GeneralPath |
createArrowHeads(int arrowDirectionType,
int location,
OMAbstractLine line,
int wingTip,
int wingLength)
Create an arrowhead for the provided line
|
void |
generate(OMAbstractLine omal) |
int |
getArrowDirectionType() |
int |
getLocation() |
java.awt.Shape |
getShape() |
int |
getWingLength() |
int |
getWingTip() |
protected static java.awt.geom.Point2D[] |
locateArrowHeads(int arrowDirection,
int arrowLocation,
OMAbstractLine line)
Create the ArrowHead objects for the lines, based on the settings.
|
void |
render(java.awt.Graphics g) |
void |
setArrowDirectionType(int arrowDirectionType) |
void |
setLocation(int location) |
void |
setShape(java.awt.Shape shape) |
void |
setWingLength(int wingLength) |
void |
setWingTip(int wingTip) |
public static final int ARROWHEAD_DIRECTION_FORWARD
public static final int ARROWHEAD_DIRECTION_BACKWARD
public static final int ARROWHEAD_DIRECTION_BOTH
protected static int DEFAULT_WINGTIP
protected static int DEFAULT_WINGLENGTH
protected transient java.awt.Shape shape
protected int arrowDirectionType
protected int location
protected int wingTip
protected int wingLength
public OMArrowHead(int arrowDirectionType, int location)
public OMArrowHead(int arrowDirectionType, int location, int wingtip, int winglength)
public void generate(OMAbstractLine omal)
public void render(java.awt.Graphics g)
public static java.awt.geom.GeneralPath createArrowHeads(int arrowDirectionType, int location, OMAbstractLine line)
arrowDirectionType
- ARROWHEAD_DIRECTION_FORWARD for the arrowhead
pointing to the last coordinate of the OMLine,
ARROWHEAD_DIRECTION_BACKWARD for the arrowhead pointing to the
first coordinate in the OMLine, and ARROWHEAD_DIRECTION_BOTH for
the arrowhead on both ends.location
- A number between 0-100, reflecting the percentage of the
line traversed before placing the arrowhead. For
ARROWHEAD_DIRECTION_FORWARD and a location of 100, the arrowhead
will be placed all the way at the end of the line. For a location
of 50, the arrowhead will be placed in the middle of the line.line
- OMLine to use to place arrowhead.public static java.awt.geom.GeneralPath createArrowHeads(int arrowDirectionType, int location, OMAbstractLine line, int wingTip, int wingLength)
arrowDirectionType
- ARROWHEAD_DIRECTION_FORWARD for the arrowhead
pointing to the last coordinate of the OMLine,
ARROWHEAD_DIRECTION_BACKWARD for the arrowhead pointing to the
first coordinate in the OMLine, and ARROWHEAD_DIRECTION_BOTH for
the arrowhead on both ends.location
- A number between 0-100, reflecting the percentage of the
line traversed before placing the arrowhead. For
ARROWHEAD_DIRECTION_FORWARD and a location of 100, the arrowhead
will be placed all the way at the end of the line. For a location
of 50, the arrowhead will be placed in the middle of the line.line
- OMLine to use to place arrowhead.wingTip
- Number of pixels to push the side of the arrowhead away
from the line.wingLength
- Number of pixels reflecting the arrowhead length.public static void addArrowHeads(int arrowDirectionType, int location, OMAbstractLine line)
protected static java.awt.geom.GeneralPath createArrowHead(java.awt.geom.Point2D from, java.awt.geom.Point2D to, int wingTip, int wingLength)
protected static java.awt.geom.Point2D[] locateArrowHeads(int arrowDirection, int arrowLocation, OMAbstractLine line)
public int getArrowDirectionType()
public void setArrowDirectionType(int arrowDirectionType)
public int getLocation()
public void setLocation(int location)
public java.awt.Shape getShape()
public void setShape(java.awt.Shape shape)
public int getWingLength()
public void setWingLength(int wingLength)
public int getWingTip()
public void setWingTip(int wingTip)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details