Interface GraphCreator

All Known Implementing Classes:
Animation2D

public interface GraphCreator
Interface for objects that create a graph. The graph may not be initially available, but the graph's width and height will be available.

The class Animation2D implements this interface. It is used by a constructor for the class Model3D.Image so that objects that initially store the dimensions of a graph, but that do not initially have the graph available, can be used in one an Model3D.Image constructor. Other classes not defined by this class library may have similar requirements.

  • Method Summary

    Modifier and Type
    Method
    Description
    Get the graph that this object creates.
    default double
    Get the height of the graph.
    int
    Get the height of the graph as an integer.
    default double
    Get the width of the graph.
    int
    Get the width of the graph as an integer.
  • Method Details

    • getGraph

      Graph getGraph()
      Get the graph that this object creates.

      Note: For some implementations of GraphCreator the graph may not be initially available, but will be created eventually. The width and height, however, will be available immediately.

      Returns:
      the graph; null if one is not available
      See Also:
    • getWidthAsInt

      int getWidthAsInt()
      Get the width of the graph as an integer. The width is in user-space units. The corresponding graph may or may not have been created when this method is called.
      Returns:
      the width
      See Also:
    • getHeightAsInt

      int getHeightAsInt()
      Get the height of the graph as an integer. The height is in user-space units. The corresponding graph may or may not have been created when this method is called.
      Returns:
      the width
      See Also:
    • getWidth

      default double getWidth()
      Get the width of the graph. The corresponding graph may or may not have been be created when this method is called.
      Returns:
      the width
      See Also:
    • getHeight

      default double getHeight()
      Get the height of the graph. The corresponding graph may or may not have been created when this method is called.
      Returns:
      the width in user-space units
      See Also: