NASA World Wind

gov.nasa.worldwind.symbology
Interface TacticalGraphicFactory

All Known Implementing Classes:
MilStd2525GraphicFactory

public interface TacticalGraphicFactory

A factory to create TacticalGraphics. Each implementation of this interface handles the graphics for a specific symbol set. Each graphic within that set is identified by a string identifier.

The factory exposes creation several methods:

See Also:
TacticalGraphic

Method Summary
 TacticalCircle createCircle(String symbolIdentifier, Position center, double radius, AVList modifiers)
          Create a circular graphic.
 TacticalGraphic createGraphic(String symbolIdentifier, Iterable<? extends Position> positions, AVList modifiers)
          Create a tactical graphic positioned by more than one control point.
 TacticalPoint createPoint(String symbolIdentifier, Position position, AVList modifiers)
          Create a tactical graphic positioned by a single control point.
 TacticalQuad createQuad(String symbolIdentifier, Iterable<? extends Position> positions, AVList modifiers)
          Create a graphic with four sides.
 TacticalRoute createRoute(String symbolIdentifier, Iterable<? extends TacticalPoint> controlPoints, AVList modifiers)
          Create a route graphic.
 boolean isSupported(String symbolIdentifier)
          Determines if this factory can create a graphic for a given symbol identifier.
 

Method Detail

createCircle

TacticalCircle createCircle(String symbolIdentifier,
                            Position center,
                            double radius,
                            AVList modifiers)
Create a circular graphic.

Parameters:
symbolIdentifier - Identifier for the symbol within its symbol set.
center - The position of the center of the circle.
radius - The radius of the circle, in meters.
modifiers - Modifiers to apply to the graphic.
Returns:
A new graphic configured to render at the position indicated, or null if no graphic can be created for the given symbol identifier.
Throws:
IllegalArgumentException - if symbolIdentifier does not describe a circular graphic.

createGraphic

TacticalGraphic createGraphic(String symbolIdentifier,
                              Iterable<? extends Position> positions,
                              AVList modifiers)
Create a tactical graphic positioned by more than one control point. This method is general purpose, and may be used to create any type of graphic. The other creation methods in the factory (for example, createCircle) are provided for convenience, and may be used to specific categories of graphics.

Parameters:
symbolIdentifier - Identifier for the symbol within its symbol set.
positions - Control points to use to place the graphic. How many points are required depends on the type of graphic.
modifiers - Modifiers to apply to the graphic.
Returns:
A new TacticalGraphic configured to render at the position indicated, or null if no graphic can be created for the given symbol identifier.

createPoint

TacticalPoint createPoint(String symbolIdentifier,
                          Position position,
                          AVList modifiers)
Create a tactical graphic positioned by a single control point.

Parameters:
symbolIdentifier - Identifier for the symbol within its symbol set.
position - Control point to use to place the graphic.
modifiers - Modifiers to apply to the graphic.
Returns:
A new TacticalGraphic configured to render at the position indicated, or null if no graphic can be created for the given symbol identifier.

createQuad

TacticalQuad createQuad(String symbolIdentifier,
                        Iterable<? extends Position> positions,
                        AVList modifiers)
Create a graphic with four sides.

Parameters:
symbolIdentifier - Identifier for the symbol within its symbol set.
positions - Control points to use to place the graphic. How many points are required depends on the type of graphic.
modifiers - Modifiers to apply to the graphic.
Returns:
A new graphic configured to render at the position indicated, or null if no graphic can be created for the given symbol identifier.
Throws:
IllegalArgumentException - if symbolIdentifier does not describe a quad graphic.

createRoute

TacticalRoute createRoute(String symbolIdentifier,
                          Iterable<? extends TacticalPoint> controlPoints,
                          AVList modifiers)
Create a route graphic. A route is composed of point graphics connected by lines.

Parameters:
symbolIdentifier - Identifier for the symbol within its symbol set.
controlPoints - Graphics to place at the points along the route.
modifiers - Modifiers to apply to the graphic.
Returns:
A new graphic configured to render at the position indicated, or null if no graphic can be created for the given symbol identifier.
Throws:
IllegalArgumentException - if symbolIdentifier does not describe a route graphic.

isSupported

boolean isSupported(String symbolIdentifier)
Determines if this factory can create a graphic for a given symbol identifier.

Parameters:
symbolIdentifier - An identifier for a symbol within the symbol set.
Returns:
True if this factory can create a graphic for the given symbol id. Returns false if the symbol identifier is not valid, or if the identifier is valid but the factory does not support the graphic.

NASA World Wind