Class Route

    • Field Detail

      • DEFAULT_WIDTH

        public static final double DEFAULT_WIDTH
        Width of the route if no width is specified in the modifiers.
        See Also:
        Constant Field Values
      • DEFAULT_OFFSET

        protected static final Offset DEFAULT_OFFSET
      • paths

        protected java.util.List<Path> paths
        Path used to render the route.
      • positions

        protected java.lang.Iterable<? extends Position> positions
        Control points that define the shape.
      • children

        protected java.lang.Iterable<? extends TacticalPoint> children
        Graphics drawn at the route control points.
    • Constructor Detail

      • Route

        public Route​(java.lang.String sidc)
    • Method Detail

      • getSupportedGraphics

        public static java.util.List<java.lang.String> getSupportedGraphics()
        Indicates the graphics supported by this class.
        Returns:
        List of masked SIDC strings that identify graphics that this class supports.
      • setHighlighted

        public void setHighlighted​(boolean highlighted)
        Specifies whether to highlight the shape. Overridden to apply the highlight state to child graphics.
        Specified by:
        setHighlighted in interface Highlightable
        Overrides:
        setHighlighted in class AbstractTacticalGraphic
        Parameters:
        highlighted - true to highlight the shape, otherwise false.
      • getControlPoints

        public java.lang.Iterable<? extends TacticalPoint> getControlPoints()
        Indicates the control points along this route.
        Specified by:
        getControlPoints in interface TacticalRoute
        Returns:
        This route's control points.
      • setControlPoints

        public void setControlPoints​(java.lang.Iterable<? extends TacticalPoint> points)
        Specifies the control points along this route.
        Specified by:
        setControlPoints in interface TacticalRoute
        Parameters:
        points - New control points.
      • getWidth

        public double getWidth()
        Indicates the width of the route, in meters.
        Returns:
        If the SymbologyConstants.DISTANCE modifier set, and is a Double, returns the value of this modifier. Otherwise returns a default width.
      • setWidth

        public void setWidth​(double width)
        Specifies the width of the route. Calling this method is equivalent to calling setModifier(SymbologyConstants.DISTANCE, value).
        Parameters:
        width - Width of the route, in meters.
      • setPositions

        public void setPositions​(java.lang.Iterable<? extends Position> positions)
        Specifies the positions of the control points that place and orient the graphic.
        Specified by:
        setPositions in interface TacticalGraphic
        Parameters:
        positions - Control points that orient the graphic. Must provide at least three points.
      • getPositions

        public java.lang.Iterable<? extends Position> getPositions()
        Indicates the positions of the control points that place and orient the graphic.
        Specified by:
        getPositions in interface TacticalGraphic
        Returns:
        positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many.
      • getReferencePosition

        public Position getReferencePosition()
        A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.
        Specified by:
        getReferencePosition in interface Movable
        Returns:
        the object's reference position, or null if no reference position is available.
      • setAttributes

        public void setAttributes​(TacticalGraphicAttributes attributes)
        Specifies attributes for this graphic in the normal (as opposed to highlighted) state. If any fields in the attribute bundle are null, the default attribute will be used instead. For example, if the attribute bundle includes a setting for outline material but not for interior material the new outline material will override the default outline material, but the interior material will remain the default. The default attributes are determined by the symbol set, and may differ depending on the type of graphic. Overridden to apply new attributes to route control points.
        Specified by:
        setAttributes in interface TacticalGraphic
        Overrides:
        setAttributes in class AbstractTacticalGraphic
        Parameters:
        attributes - new attributes. May be null, in which case default attributes are used.
      • setStatus

        public void setStatus​(java.lang.String status)
        Specifies this graphic's Status/Operational Condition field. A graphic's Status defines whether the represented object exists at the time the symbol was generated, or is anticipated to exist in the future. Additionally, a graphic's Status can define its operational condition. The recognized values depend on the graphic's scheme:

        Tactical graphics

        • STATUS_ANTICIPATED
        • STATUS_SUSPECTED
        • STATUS_PRESENT
        • STATUS_KNOWN

        Meteorological and Oceanographic

        • Not supported

        Emergency Management

        • STATUS_ANTICIPATED
        • STATUS_PRESENT
        Specified by:
        setStatus in interface MilStd2525TacticalGraphic
        Overrides:
        setStatus in class AbstractMilStd2525TacticalGraphic
        Parameters:
        status - the new value for the Status/Operational Condition field.
      • applyDelegateOwner

        protected void applyDelegateOwner​(java.lang.Object owner)
        Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic. This base class will apply the delegate owner to Label objects. Subclasses must implement this method to apply the delegate owner to any Renderables that they will draw in order to render the graphic.
        Specified by:
        applyDelegateOwner in class AbstractTacticalGraphic
        Parameters:
        owner - Current delegate owner.
      • createPaths

        protected void createPaths​(DrawContext dc)
        Create the paths used to draw the route.
        Parameters:
        dc - Current draw context.
      • createLabelText

        protected java.lang.String createLabelText()
        Create the text for the main label on this graphic.
        Returns:
        Text for the main label. May return null if there is no text.
      • getGraphicLabel

        protected java.lang.String getGraphicLabel()
        Return the string that identifies this type of route.
        Returns:
        The string the determines the type of route, such as "AC" for "Air Corridor".
      • determineLabelPositions

        protected void determineLabelPositions​(DrawContext dc)
        Compute the position for the area's main label. This position indicates the position of the first line of the label. If there are more lines, they will be arranged South of the first line. This method places the label between the first to control points on the route, and to the side of the route.
        Overrides:
        determineLabelPositions in class AbstractTacticalGraphic
        Parameters:
        dc - Current draw context.
      • computeMainLabelPosition

        protected Position computeMainLabelPosition​(DrawContext dc,
                                                    TacticalGraphicLabel label,
                                                    Position midpoint,
                                                    Position posB)
        Compute the position of the graphic's main label. This label is positioned to the side of the first segment along the route.
        Parameters:
        dc - Current draw context.
        label - Label for which to compute position.
        midpoint - Midpoint of the first route segment.
        posB - End point of the first route segment.
        Returns:
        The position of the main label.
      • createPath

        protected Path createPath​(Position start,
                                  Position end)
        Create between two points and configure the Path.
        Parameters:
        start - First position
        end - Second position
        Returns:
        New path configured with defaults appropriate for this type of graphic.