Class AbstractSelectionShapePainter

    • Constructor Detail

      • AbstractSelectionShapePainter

        public AbstractSelectionShapePainter()
    • Method Detail

      • canPaint

        protected abstract boolean canPaint​(ImagePanel.PaintPanel owner,
                                            Graphics g,
                                            Point topLeft,
                                            Point bottomRight,
                                            List<Point> trace)
        Checks whether painting is possible.
        Parameters:
        owner - the panel this shape is used with
        g - the graphics context
        topLeft - the top-left corner
        bottomRight - the bottom-right corner
        trace - the mouse movement trace
        Returns:
        true if painting is possible
      • doPaintSelectionShape

        protected abstract void doPaintSelectionShape​(ImagePanel.PaintPanel owner,
                                                      Graphics g,
                                                      Point topLeft,
                                                      Point bottomRight,
                                                      List<Point> trace)
        Paints the selection shape.
        Parameters:
        owner - the panel this shape is used with
        g - the graphics context
        topLeft - the top-left corner
        bottomRight - the bottom-right corner
        trace - the mouse movement trace