Interface JaxoCanvasComponent

    • Method Detail

      • asComponent

        Component asComponent()
        Return this CanvasComponent as a Component.
        Returns:
        this CanvasComponent as a Component or null, if this is not a Component.
      • getCanvasBackground

        Color getCanvasBackground()
        Background color in the region that is actually covered by the canvas getCanvasSize().
        Returns:
        The canvas background color.
      • getCanvasBounds

        Rectangle getCanvasBounds()
        Part of the component that is covered by the actual canvas. This includes canvas background and grid, -- i.e. a rectangle with size 'canvasSize' and origin 'canvasOrigin'.
        Returns:
        Rectangle the canvas bounds.
        See Also:
        getCanvasSize(), getCanvasOrigin()
      • getCanvasOrigin

        Point getCanvasOrigin()
        Origin of the actual canvas within the component. This is always the top-left corner.
        Returns:
        a Point at the origin.
      • getCanvasSize

        Dimension getCanvasSize()
        Canvas size. This is equal to the (inner) component size unless because of viewport size tracking, the component has become larger than the effective maximum canvas size.
        Returns:
        The canvas size.
      • getGraphics

        Graphics getGraphics()
        Return the graphics context of this CanvasComponent.
        Returns:
        the graphics context or null if this component is currently not displayable.
        See Also:
        Component.getGraphics()
      • getMaximumCanvasSize

        Dimension getMaximumCanvasSize()
        Maximum size of the canvas (even if there are objects with a larger bounding box). The default value is larger than (0,0). If the maximum canvas size is smaller (in either direction) than the minimum canvas size, the latter wins.
        Returns:
        The maximum canvas size.
      • getMinimumCanvasSize

        Dimension getMinimumCanvasSize()
        Minimum size of the canvas (even if there are no objects or they have a smaller bounding box). The default value is (0,0).
        Returns:
        The minimum canvas size.
      • removeMouseListener

        void removeMouseListener​(MouseListener l)
        Removes the specified mouse listener so that it no longer receives mouse events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.
        Parameters:
        l - the mouse listener
        See Also:
        Component.removeMouseListener(java.awt.event.MouseListener)
      • removeMouseMotionListener

        void removeMouseMotionListener​(MouseMotionListener l)
        Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.
        Parameters:
        l - the mouse motion listener
        See Also:
        Component.removeMouseMotionListener(java.awt.event.MouseMotionListener)
      • setCanvasBackground

        void setCanvasBackground​(Color color)
        Sets the color of the background.
        Parameters:
        color - The background color.
      • setMaximumCanvasSize

        void setMaximumCanvasSize​(Dimension value)
        Sets the maximum canvas size.
        Parameters:
        value - The maximum canvas size.
      • setMinimumCanvasSize

        void setMinimumCanvasSize​(Dimension value)
        Sets the minimum canvas size.
        Parameters:
        value - The minimum canvas size.