Class SelectionBoxHandler

    • Field Detail

      • dash1

        protected static final float[] dash1
      • currentRect

        protected Rectangle currentRect
      • previousRectDrawn

        protected final Rectangle previousRectDrawn
      • selectionBoxColour

        protected static Color selectionBoxColour
    • Method Detail

      • setSelectionRectangle

        public abstract void setSelectionRectangle​(Point cursorLocation,
                                                   Rectangle selection)
      • paintSelectionBox

        public void paintSelectionBox​(Graphics g,
                                      Rectangle rectToDraw)
      • resetRectangle

        public void resetRectangle​(int x,
                                   int y)
      • getCurrentRect

        public Rectangle getCurrentRect()
      • setCurrentRect

        public void setCurrentRect​(Rectangle currentRect)
      • getRectToDraw

        public Rectangle getRectToDraw()
      • setRectToDraw

        public void setRectToDraw​(Rectangle rectToDraw)
      • clearRectangle

        public void clearRectangle​(Component component)
      • updateSelectionSize

        public void updateSelectionSize​(int x,
                                        int y,
                                        Component component)
        Update the size of the selection rectangle.
        Parameters:
        x - x-coordinate of the selection size update.
        y - y-coordinate of the selection size update.
        component - component to repaint
      • setSelectionSize

        public void setSelectionSize​(Rectangle rect,
                                     Component component)
      • updateDrawableRect

        public void updateDrawableRect​(int compWidth,
                                       int compHeight)
        Update the drawable rectangle so that it does not extend bast the edge of the page.
        Parameters:
        compWidth - width of component being selected
        compHeight - height of component being selected.
      • isOverPageComponent

        protected PageViewComponentImpl isOverPageComponent​(Container container,
                                                            MouseEvent e)
        Utility method for determining if the mouse event occurred over a page in the page view.
        Parameters:
        e - mouse event in this coordinates space
        container - to find component of mouse event source.
        Returns:
        component that mouse event is over or null if not over a page.