Interface StyleOGL2D<T>

All Known Implementing Classes:
DefaultStyleOGL2D, EditedStyleOGL2D

public interface StyleOGL2D<T>
Style interface for ogl 2D styling.
Author:
Nick Collier
  • Method Summary

    Modifier and Type
    Method
    Description
    getBorderColor(T object)
    Gets the border color for the specified object.
    int
    getBorderSize(T object)
    Gets the size of the border for the specified object.
    getColor(T object)
    Gets the color for the specified object.
    getLabel(T object)
    Gets a label for the specified object.
    getLabelColor(T object)
    Gets the label color.
    getLabelFont(T object)
    Gets the font for this objects label.
    saf.v3d.scene.Position
    Gets the position of the label relative the VSpatial.
    float
    Gets an optional X offset for the label location.
    float
    Gets an optional Y offset for the label location.
    float
    getRotation(T object)
    Gets the rotation, in degrees, of the VSpatial for the specified object.
    float
    getScale(T object)
    Gets the scale for the specified object.
    saf.v3d.scene.VSpatial
    getVSpatial(T object, saf.v3d.scene.VSpatial spatial)
    Gets the VSpatial visual representation of the object.
    void
    init(saf.v3d.ShapeFactory2D factory)
    Initializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.
  • Method Details

    • init

      void init(saf.v3d.ShapeFactory2D factory)
      Initializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.
      Parameters:
      factory - the factory to intialize this style with
    • getVSpatial

      saf.v3d.scene.VSpatial getVSpatial(T object, saf.v3d.scene.VSpatial spatial)
      Gets the VSpatial visual representation of the object. If there are no changes to the representation then the VSpatial spatial parameter should be returned.
      Parameters:
      object - the object whose VSpatial representation we want
      spatial - the current VSpatial representation
      Returns:
      a new VSpatial visual representation of the object or the current one if there has been no change.
    • getColor

      Color getColor(T object)
      Gets the color for the specified object.
      Parameters:
      object -
      Returns:
      the color for the specified object.
    • getBorderSize

      int getBorderSize(T object)
      Gets the size of the border for the specified object. A size of 0 means no border is drawn.
      Parameters:
      object -
      Returns:
      the size of the border for the specified object.
    • getBorderColor

      Color getBorderColor(T object)
      Gets the border color for the specified object. This will be ignored if the border size is 0.
      Parameters:
      object -
      Returns:
      the border color for the specified object.
    • getRotation

      float getRotation(T object)
      Gets the rotation, in degrees, of the VSpatial for the specified object.
      Parameters:
      object -
      Returns:
      the rotation, in degrees, of the VSpatial for the specified object.
    • getScale

      float getScale(T object)
      Gets the scale for the specified object.
      Parameters:
      object -
      Returns:
      the for the specified object.
    • getLabel

      String getLabel(T object)
      Gets a label for the specified object. Null and an empty String are permitted values.
      Parameters:
      object - the object to get the label for
      Returns:
      a label for the specified object. Null and an empty String are permitted values.
    • getLabelFont

      Font getLabelFont(T object)
      Gets the font for this objects label. This can be null if there is no label.
      Parameters:
      object -
      Returns:
      the font for this objects label. This can be null if there is no label.
    • getLabelXOffset

      float getLabelXOffset(T object)
      Gets an optional X offset for the label location. This can be used to make small adjustments the label location.
      Returns:
      an optional X offset for the label placement.
    • getLabelYOffset

      float getLabelYOffset(T object)
      Gets an optional Y offset for the label location. This can be used to make small adjustments the label location.
      Returns:
      an optional Y offset for the label placement.
    • getLabelPosition

      saf.v3d.scene.Position getLabelPosition(T object)
      Gets the position of the label relative the VSpatial. Valid values are
      • Position.CENTER
      • Position.NORTH
      • Position.SOUTH
      • Position.EAST
      • Position.WEST
      • Position.NORTH_EAST
      • Position.NORTH_WEST
      • Position.SOUTH_EAST
      • Position.SOUTH_WEST
      Parameters:
      object -
      Returns:
      the position of the label relative the VSpatial.
    • getLabelColor

      Color getLabelColor(T object)
      Gets the label color. Can return null if there is no label.
      Parameters:
      object -
      Returns:
      the label color. Can return null if there is no label.