Class GraphShapeRegistry

java.lang.Object
com.codename1.ui.graph.GraphShapeRegistry

public final class GraphShapeRegistry extends Object

The outlines behind the names of GraphShapes, and the place to add outlines of your own.

The registry is shared by every graph of the application, and like the components that read it, it belongs to the event dispatch thread.

  • Method Details

    • register

      public static void register(String name, GraphShape shape)
      Adds an outline under a name, or replaces the one that had it.
    • get

      public static GraphShape get(String name)
      The outline registered under a name, or null. A node whose shape has no outline is drawn as the ordinary box.
    • contains

      public static boolean contains(String name, double px, double py, double x, double y, double w, double h)
      True when a point lies inside a shape drawn in the given bounds. A name with no outline is its bounds.