Interface IJavaRenderer

All Known Implementing Classes:
JavaRenderer

public interface IJavaRenderer
Author:
michael.spinelli
  • Method Summary

    Modifier and Type
    Method
    Description
    CanRender(ArmyC2.C2SD.Utilities.MilStdSymbol symbol)
    Checks if the Renderer can build the symbol with the given information
    CanRender(String symbolCode, ArrayList<Point2D.Double> coords)
    Checks if the Renderer can build the symbol with the given information
    CanRender(String symbolCode, ArrayList<Point2D.Double> coords, int symStd)
    Checks if the Renderer can build the symbol with the given information
    void
    Draw(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, Graphics2D destination)
    Does the actual drawing of the Symbol.
    void
    Draw(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, Graphics2D destination)
    Does the actual drawing of the Symbol.
    void
    DrawDB(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, Graphics2D destination, Rectangle clip)
    Does the actual drawing of the Symbol.
    void
    DrawDB(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, Graphics2D destination, Rectangle clip)
    Does the actual drawing of the Symbol.
    int
    Returns size currently being used to draw single point Tactical Graphics
    Map<String,ArmyC2.C2SD.Utilities.UnitDef>
    getSupportedFETypes(int symStd)
    Get a Map of the supported Unit or Force Element symbols
    Map<String,ArmyC2.C2SD.Utilities.SymbolDef>
    getSupportedTGTypes(int symStd)
    Get a Map of the supported Tactical Graphic symbols.
    int
    Returns size currently being used to draw units
    ArmyC2.C2SD.Utilities.MilStdSymbol
    Render(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds)
    Takes a MilStdSymbol populated with the symbol code, coordinates, and modifier and build invalid input: '&' assigns the shape objects
    ArmyC2.C2SD.Utilities.MilStdSymbol
    Render(String symbolCode, String UUID, ArrayList<Point2D.Double> coords, Map<String,String> Modifiers, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds)
    Takes info needed to draw a symbol and returns a full populated MilStdSymbol.
    ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol>
    Render(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds)
    Takes a List of MilStdSymbol's populated with the symbol code, coordinates, and modifier and build invalid input: '&' assigns the shape objects
    RenderMilStdSymbolAsIcon(String symbolID, int iconSize, Boolean showDisplayModifiers)
    Returns an icon representing a milstd symbol.
    ArmyC2.C2SD.Utilities.ImageInfo
    RenderSinglePointAsImageInfo(String symbolCode, Map<String,String> Modifiers, int unitSize, boolean keepUnitRatio)
    Requires less information than RenderMilStdSymbolAsImageInfo.
    void
    setModifierFont(String name, int type, int size)
    Set the label font to be used in the renderer Default tracking to TextAttribute.TRACKING_LOOSE and kerning to off.
    void
    setModifierFont(String name, int type, int size, float tracking, Boolean kerning)
    Set the label font to be used in the renderer
    void
    determines size of single point tactical graphics
    void
    determines size of units (force elements)
  • Method Details

    • setUnitSymbolSize

      void setUnitSymbolSize(int size)
      determines size of units (force elements)
      Parameters:
      size - JavaRenderer.SymbolSizeMedium or positive any integer
    • getUnitSymbolSize

      int getUnitSymbolSize()
      Returns size currently being used to draw units
    • setSinglePointTGSymbolSize

      void setSinglePointTGSymbolSize(int size)
      determines size of single point tactical graphics
      Parameters:
      size - like JavaRenderer.SymbolSizeMedium or any positive integer
    • getSinglePointTGSymbolSize

      int getSinglePointTGSymbolSize()
      Returns size currently being used to draw single point Tactical Graphics
    • setModifierFont

      void setModifierFont(String name, int type, int size)
      Set the label font to be used in the renderer Default tracking to TextAttribute.TRACKING_LOOSE and kerning to off.
      Parameters:
      name - like "arial"
      type - like Font.BOLD
      size - like 12
    • setModifierFont

      void setModifierFont(String name, int type, int size, float tracking, Boolean kerning)
      Set the label font to be used in the renderer
      Parameters:
      name - like "arial"
      type - like Font.BOLD
      size - like 12
      tracking - like TextAttribute.TRACKING_LOOSE (0.04f)
      kerning - default false.
    • getSupportedFETypes

      Map<String,ArmyC2.C2SD.Utilities.UnitDef> getSupportedFETypes(int symStd)
      Get a Map of the supported Unit or Force Element symbols
      Parameters:
      symStd - RendererSettings.Symbology_2525C
      Returns:
      a Map of UnitDefs keyed by symbol code.
    • getSupportedTGTypes

      Map<String,ArmyC2.C2SD.Utilities.SymbolDef> getSupportedTGTypes(int symStd)
      Get a Map of the supported Tactical Graphic symbols.
      Parameters:
      symStd - RendererSettings.Symbology_2525C
      Returns:
      a Map of SymbolDefs keyed by symbol code.
    • CanRender

      Boolean CanRender(ArmyC2.C2SD.Utilities.MilStdSymbol symbol)
      Checks if the Renderer can build the symbol with the given information
      Parameters:
      symbol -
      Returns:
      true if symbol can be rendered based on provided information
    • CanRender

      Boolean CanRender(String symbolCode, ArrayList<Point2D.Double> coords)
      Checks if the Renderer can build the symbol with the given information
      Parameters:
      symbolCode -
      coords -
      Returns:
      true if symbol can be rendered based on provided information
    • CanRender

      Boolean CanRender(String symbolCode, ArrayList<Point2D.Double> coords, int symStd)
      Checks if the Renderer can build the symbol with the given information
      Parameters:
      symbolCode -
      coords -
      symStd - Like RendererSettings.Symbology_2525C
      Returns:
      true if symbol can be rendered based on provided information
    • Render

      ArmyC2.C2SD.Utilities.MilStdSymbol Render(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds) throws ArmyC2.C2SD.Utilities.RendererException
      Takes a MilStdSymbol populated with the symbol code, coordinates, and modifier and build invalid input: '&' assigns the shape objects
      Parameters:
      symbol -
      converter - does point conversion between pixels invalid input: '&' lat/lon coordinates.
      Returns:
      drawable symbol populated with shape data
      Throws:
      ArmyC2.C2SD.Utilities.TBCRendererException
      ArmyC2.C2SD.Utilities.RendererException
    • Render

      ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> Render(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds) throws ArmyC2.C2SD.Utilities.RendererException
      Takes a List of MilStdSymbol's populated with the symbol code, coordinates, and modifier and build invalid input: '&' assigns the shape objects
      Parameters:
      symbols -
      converter - does point conversion between pixels invalid input: '&' lat/lon coordinates.
      clipBounds - Dimensions of the drawing surface. Will not do clipping if NULL is passed.
      Returns:
      drawable symbols populated with shape data
      Throws:
      ArmyC2.C2SD.Utilities.TBCRendererException
      ArmyC2.C2SD.Utilities.RendererException
    • Render

      ArmyC2.C2SD.Utilities.MilStdSymbol Render(String symbolCode, String UUID, ArrayList<Point2D.Double> coords, Map<String,String> Modifiers, ArmyC2.C2SD.Utilities.IPointConversion converter, Rectangle2D clipBounds) throws ArmyC2.C2SD.Utilities.RendererException
      Takes info needed to draw a symbol and returns a full populated MilStdSymbol.
      Parameters:
      symbolCode -
      UUID - unique ID for the symbol. For client use.
      coords -
      Modifiers - keyed by ModifiersUnits or ModifiersTG (ModifiersTG.C_QUANTITY)
      converter - does point conversion between pixels invalid input: '&' lat/lon coordinates.
      clipBounds - Dimensions of the drawing surface. Will not do clipping if NULL is passed.
      Returns:
      drawable symbol populated with shape data
      Throws:
      ArmyC2.C2SD.Utilities.TBCRendererException
      ArmyC2.C2SD.Utilities.RendererException
    • RenderMilStdSymbolAsIcon

      BufferedImage RenderMilStdSymbolAsIcon(String symbolID, int iconSize, Boolean showDisplayModifiers)
      Returns an icon representing a milstd symbol. Useful for adding icons in tree controls. Does not work for multipoints currently.
      Parameters:
      symbolID - 15 character symbol ID
      iconSize - if 15, returned icon will be sized for 15x15 pixels
      showDisplayModifiers - Things like echelon, mobility, or affiliation modifiers
      Returns:
    • RenderSinglePointAsImageInfo

      ArmyC2.C2SD.Utilities.ImageInfo RenderSinglePointAsImageInfo(String symbolCode, Map<String,String> Modifiers, int unitSize, boolean keepUnitRatio)
      Requires less information than RenderMilStdSymbolAsImageInfo. Can only be used for singlepoint graphics.
      Parameters:
      symbolCode -
      Modifiers - keyed on values from ModifiersUnits, ModifiersTG, and MilStdAttributes.
      unitSize - 35 would make a an image where the core symbol is 35x35. label modifiers and display modifiers may fall outside of that area and final image may be bigger than 35x35. use getSinglePointTGSymbolSize or getUnitSymbolSize.
      keepUnitRatio - Recommend setting to true when drawing on a map. Only applies to force elements (units). If KeepUnitRatio is set, Symbols will be drawn with respect to each other. Unknown unit is the all around biggest, neutral unit is the smallest. if size is 35, neutral would be (35/1.5)*1.1=25.7
      Returns:
      ImageInfo, which has the image and all the information needed to position it properly.
    • DrawDB

      void DrawDB(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, Graphics2D destination, Rectangle clip) throws ArmyC2.C2SD.Utilities.RendererException
      Does the actual drawing of the Symbol. MilstdSymbol need to be properly populated via the Render call first. Draws to an offscreen image that blits the result to the desination Graphics2D object.
      Parameters:
      symbol -
      destination -
      clip - Cannot be null. This function does not apply it to the destination object. It makes use of the dimensions for the back buffer
      Throws:
      ArmyC2.C2SD.Utilities.RendererException
    • DrawDB

      void DrawDB(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, Graphics2D destination, Rectangle clip) throws ArmyC2.C2SD.Utilities.RendererException
      Does the actual drawing of the Symbol. MilstdSymbol need to be properly populated via the Render call first. Draws to an offscreen image that blits the result to the desination Graphics2D object.
      Parameters:
      symbols -
      destination -
      clip - Cannot be null. This function does not apply it to the destination object. It makes use of the dimensions for the back buffer
      Throws:
      ArmyC2.C2SD.Utilities.RendererException
    • Draw

      void Draw(ArmyC2.C2SD.Utilities.MilStdSymbol symbol, Graphics2D destination) throws ArmyC2.C2SD.Utilities.RendererException
      Does the actual drawing of the Symbol. MilstdSymbol need to be properly populated via the Render call first.
      Parameters:
      symbol -
      destination -
      Throws:
      ArmyC2.C2SD.Utilities.RendererException
    • Draw

      void Draw(ArrayList<ArmyC2.C2SD.Utilities.MilStdSymbol> symbols, Graphics2D destination) throws ArmyC2.C2SD.Utilities.RendererException
      Does the actual drawing of the Symbol. MilstdSymbol need to be properly populated via the Render call first.
      Parameters:
      symbols -
      destination -
      Throws:
      ArmyC2.C2SD.Utilities.RendererException