Interface IGaService

All Superinterfaces:
IGaCreateService, IGaLayoutService
All Known Implementing Classes:
GaServiceImpl

public interface IGaService extends IGaCreateService, IGaLayoutService
The interface IGaService provides convenient services for the creation and layout of graphics algorithm.
  • Field Details

  • Method Details

    • deleteFont

      void deleteFont(Font font)
      Deletes the given font.
      Parameters:
      font - the font to delete
      Since:
      0.8
    • deleteColor

      void deleteColor(Color color)
      Deletes the given color.
      Parameters:
      color - the color to delete
      Since:
      0.8
    • deleteRenderingStyle

      void deleteRenderingStyle(AbstractStyle abstractStyle)
      Deletes the RenderingStyle from the given AbstractStyle.
      Parameters:
      abstractStyle - the abstract style from which to delete the RenderingStyle.
    • findStyle

      Style findStyle(StyleContainer styleContainer, String id)
      Searches for a style with the given id. The search scope is the given style container (which will usually be the diagram).
      Parameters:
      styleContainer - the style container
      id - style id
      Returns:
      the found style; null if not found
    • getRotation

      double getRotation(AbstractText at, boolean checkStyles)
      Gets the rotation angle.
      Parameters:
      at - the abstract text
      checkStyles - the check styles
      Returns:
      the angle
      Since:
      0.11
    • getBackgroundColor

      Color getBackgroundColor(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the background color.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the background color
    • getFont

      Font getFont(AbstractText at, boolean checkStyles)
      Gets the font.
      Parameters:
      at - the abstract text
      checkStyles - the check styles
      Returns:
      the font
    • getForegroundColor

      Color getForegroundColor(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the foreground color.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the foreground color
    • getHorizontalAlignment

      Orientation getHorizontalAlignment(AbstractText at, boolean checkStyles)
      Gets the horizontal alignment.
      Parameters:
      at - the abstract text
      checkStyles - the check styles
      Returns:
      the horizontal alignment
    • getLineStyle

      LineStyle getLineStyle(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the line style.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the line style
    • getLineWidth

      int getLineWidth(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the line width.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the line width
    • getRenderingStyle

      RenderingStyle getRenderingStyle(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the rendering style.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the rendering style
    • getTransparency

      double getTransparency(GraphicsAlgorithm ga, boolean checkStyles)
      Gets the transparency.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      the transparency
    • getVerticalAlignment

      Orientation getVerticalAlignment(AbstractText at, boolean checkStyles)
      Gets the vertical alignment.
      Parameters:
      at - the abstract text
      checkStyles - the check styles
      Returns:
      the vertical alignment
    • resetAll

      void resetAll(AbstractStyle abstractStyle)
      Sets the provided AbstractStyle (could be a GraphicsAlgorithm or a Style) to ignore all locally set attributes and instead use the ones provided by the style set to the AbstractStyle.
      Parameters:
      abstractStyle - The abstract style (style or graphics algorithm)
      Since:
      0.9
    • isFilled

      boolean isFilled(GraphicsAlgorithm ga, boolean checkStyles)
      Checks if is filled.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      true, if is filled
    • isLineVisible

      boolean isLineVisible(GraphicsAlgorithm ga, boolean checkStyles)
      Checks if line is visible.
      Parameters:
      ga - the graphics algorithm
      checkStyles - the check styles
      Returns:
      true, if line is visible
    • isProportional

      boolean isProportional(Image image, boolean checkStyles)
      Checks if is proportional.
      Parameters:
      image - the image
      checkStyles - the check styles
      Returns:
      true, if is proportional
    • isStretchH

      boolean isStretchH(Image image, boolean checkStyles)
      Checks if is stretch h.
      Parameters:
      image - the image
      checkStyles - the check styles
      Returns:
      true, if is stretch h
    • isStretchV

      boolean isStretchV(Image image, boolean checkStyles)
      Checks if is stretch v.
      Parameters:
      image - the image
      checkStyles - the check styles
      Returns:
      true, if is stretch v
    • manageColor

      Color manageColor(Diagram diagram, IColorConstant colorConstant)
      Provides a color instance with the given color constant by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.
      Parameters:
      diagram - the diagram that aggregates the colors
      colorConstant - which contains the RGB values.
      Returns:
      the color instance
    • manageColor

      Color manageColor(Diagram diagram, int red, int green, int blue)
      Provides a color instance with the given RGB values by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.
      Parameters:
      diagram - the diagram that aggregates the colors
      red - the red
      green - the green
      blue - the blue
      Returns:
      the color instance
    • manageDefaultFont

      Font manageDefaultFont(Diagram diagram)
      Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.
      Parameters:
      diagram - the diagram that aggregates the fonts
      Returns:
      the font instance
      Since:
      0.9
    • manageDefaultFont

      Font manageDefaultFont(Diagram diagram, boolean isItalic, boolean isBold)
      Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.
      Parameters:
      diagram - the diagram that aggregates the fonts
      isItalic - the is italic
      isBold - the is bold
      Returns:
      the font instance
      Since:
      0.9
    • manageFont

      Font manageFont(Diagram diagram, String name, int size)
      Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.
      Parameters:
      diagram - the diagram that aggregates the fonts
      name - the name of the font
      size - the size of the font
      Returns:
      the font instance
      Since:
      0.8
    • manageFont

      Font manageFont(Diagram diagram, String name, int size, boolean isItalic, boolean isBold)
      Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.
      Parameters:
      diagram - the diagram that aggregates the fonts
      name - the name of the font
      size - the size of the font
      isItalic - the is italic
      isBold - the is bold
      Returns:
      the font instance
      Since:
      0.8
    • movePolylinePoint

      void movePolylinePoint(Polyline polyline, int index, int deltaX, int deltaY)
      Move polyline point.
      Parameters:
      polyline - the polyline
      index - the index
      deltaX - the delta x
      deltaY - the delta y
    • setRenderingStyle

      void setRenderingStyle(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas)
      Sets a RenderingStyle with given adapted gradient colored areas for the given AbstractStyle. The AdaptedGradientColoredAreas are defined and created in PredefinedColoredAreas.
      Parameters:
      abstractStyle - the abstract style for which to set the rendering style.
      adaptedGradientColoredAreas - The AdaptedGradientColoredAreas gradient colored areas.