Documentation of 'de.erichseifert.gral.graphics.Drawable' Java class
Drawable
de.erichseifert.gral.graphics

Interface Drawable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void draw(DrawingContext context)
      Draws the Drawable with the specified drawing context.
      java.awt.geom.Rectangle2D getBounds()
      Returns the bounds of this Drawable.
      double getHeight()
      Returns the height of the bounds.
      java.awt.geom.Dimension2D getPreferredSize()
      Returns the preferred size of the Drawable.
      double getWidth()
      Returns the width of the bounds.
      double getX()
      Returns the x-position of the bounds.
      double getY()
      Returns the y-position of the bounds.
      void setBounds(double x, double y, double width, double height)
      Sets the bounds to the specified coordinates, width and height.
      void setBounds(java.awt.geom.Rectangle2D bounds)
      Sets the bounds to the specified bounding rectangle.
      void setPosition(double x, double y)
      Sets the position to the specified coordinates.
    • Method Detail

      • getBounds

        java.awt.geom.Rectangle2D getBounds()
        Returns the bounds of this Drawable.
        Returns:
        a bounding rectangle
      • setBounds

        void setBounds(java.awt.geom.Rectangle2D bounds)
        Sets the bounds to the specified bounding rectangle.
        Parameters:
        bounds - rectangle containing the component.
      • setBounds

        void setBounds(double x,
                       double y,
                       double width,
                       double height)
        Sets the bounds to the specified coordinates, width and height. This method should be used when overriding functionality.
        Parameters:
        x - horizontal position of the upper-left corner
        y - vertical position of the upper-left corner
        width - horizontal extent
        height - vertical extent
      • getX

        double getX()
        Returns the x-position of the bounds.
        Returns:
        horizontal position of the upper-left corner of the bounding rectangle
      • getY

        double getY()
        Returns the y-position of the bounds.
        Returns:
        vertical position of the upper-left corner of the bounding rectangle
      • setPosition

        void setPosition(double x,
                         double y)
        Sets the position to the specified coordinates.
        Parameters:
        x - Coordinate on the x-axis.
        y - Coordinate on the y-axis.
      • getWidth

        double getWidth()
        Returns the width of the bounds.
        Returns:
        horizontal extent
      • getHeight

        double getHeight()
        Returns the height of the bounds.
        Returns:
        vertical extent
      • getPreferredSize

        java.awt.geom.Dimension2D getPreferredSize()
        Returns the preferred size of the Drawable.
        Returns:
        horizontal and vertical extent that wants to be reached
      • draw

        void draw(DrawingContext context)
        Draws the Drawable with the specified drawing context.
        Parameters:
        context - Environment used for drawing

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.