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:

    • createGraphic - Creates a graphic from a list of positions and modifiers. This method is the most general, and can create any type of graphic. The other creation methods are provided for convenience.
    • createPoint - Create a graphic positioned by a single control point.
    • createCircle - Create a graphic positioned by a center point and a radius.
    • createQuad - Create a graphic that has length and width properties.
    • createRoute - Create a graphic composed of point graphics connected by lines.
    See Also:
    TacticalGraphic
    • Method Detail

      • createGraphic

        TacticalGraphic createGraphic​(java.lang.String symbolIdentifier,
                                      java.lang.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​(java.lang.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.
      • createCircle

        TacticalCircle createCircle​(java.lang.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:
        java.lang.IllegalArgumentException - if symbolIdentifier does not describe a circular graphic.
      • createQuad

        TacticalQuad createQuad​(java.lang.String symbolIdentifier,
                                java.lang.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:
        java.lang.IllegalArgumentException - if symbolIdentifier does not describe a quad graphic.
      • createRoute

        TacticalRoute createRoute​(java.lang.String symbolIdentifier,
                                  java.lang.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:
        java.lang.IllegalArgumentException - if symbolIdentifier does not describe a route graphic.
      • isSupported

        boolean isSupported​(java.lang.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.