Package diva.canvas

Interface VisibleComponent

    • Method Detail

      • isVisible

        boolean isVisible()
        Test the visibility flag of this object. Note that this flag does not indicate whether the object is actually visible on the screen, as one of its ancestors may not be visible.
        Returns:
        true if the object is visible.
      • paint

        void paint​(java.awt.Graphics2D graphics2D)
        Paint this object onto a 2D graphics object. Implementors should first test if the visibility flag is set, and paint the object if it is.
        Parameters:
        graphics2D - The 2D graphics object that this object it to be painted upon.
      • paint

        void paint​(java.awt.Graphics2D graphics2D,
                   java.awt.geom.Rectangle2D region)
        Paint this object onto a 2D graphics object, within the given region. Implementors should first test if the visibility flag is set, and paint the object if it is. The provided region can be used to optimize the paint, but implementors can assume that the clip region is correctly set beforehand.
        Parameters:
        graphics2D - The 2D graphics object that this object it to be painted upon.
        region - The region.
      • setVisible

        void setVisible​(boolean flag)
        Set the visibility flag of this object. If the flag is false, then the object will not be painted on the screen.
        Parameters:
        flag - True if this object is to be visible.