Class JaxoRoundHandle

java.lang.Object
net.sf.jaxodraw.gui.handle.AbstractJaxoHandle
net.sf.jaxodraw.gui.handle.JaxoRoundHandle
All Implemented Interfaces:
JaxoHandle

public class JaxoRoundHandle extends AbstractJaxoHandle
A circle implementation for handles.
Since:
2.0
  • Constructor Details

    • JaxoRoundHandle

      public JaxoRoundHandle()
      Constructor.
  • Method Details

    • paint

      public void paint(JaxoGraphics2D g2, int x, int y, boolean marked, Color handleColor)
      Paints the handle to the given graphics context. This implementation paints circles.
      Specified by:
      paint in class AbstractJaxoHandle
      Parameters:
      g2 - The graphics context to paint to.
      x - The x position of the handle.
      y - The y position of the handle.
      marked - True if the handle should be marked (selected).
      handleColor - The color of the handle.
    • contains

      public boolean contains(int handleX, int handleY, int x, int y)
      Determines whether the given point is contained in this handle. This implementation checks if the point is contained within a circle of length getSize() around the handle point.
      Parameters:
      handleX - The x position of the handle.
      handleY - The y position of the handle.
      x - The x position of the point to check.
      y - The y position of the point to check.
      Returns:
      True if the handle encloses the point, false otherwise.