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

Class AbstractDrawable

    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractDrawable()
      Creates an AbstractDrawable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface de.erichseifert.gral.graphics.Drawable

        draw
    • Constructor Detail

      • AbstractDrawable

        public AbstractDrawable()
        Creates an AbstractDrawable.
    • Method Detail

      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Returns the bounds of this Drawable.
        Specified by:
        getBounds in interface Drawable
        Returns:
        a bounding rectangle
      • getX

        public double getX()
        Returns the x-position of the bounds.
        Specified by:
        getX in interface Drawable
        Returns:
        horizontal position of the upper-left corner of the bounding rectangle.
      • getY

        public double getY()
        Returns the y-position of the bounds.
        Specified by:
        getY in interface Drawable
        Returns:
        vertical position of the upper-left corner of the bounding rectangle.
      • getWidth

        public double getWidth()
        Returns the width of the bounds.
        Specified by:
        getWidth in interface Drawable
        Returns:
        horizontal extent.
      • getHeight

        public double getHeight()
        Returns the height of the bounds.
        Specified by:
        getHeight in interface Drawable
        Returns:
        vertical extent.
      • setBounds

        public void setBounds(java.awt.geom.Rectangle2D bounds)
        Sets the bounds to the specified bounding rectangle.
        Specified by:
        setBounds in interface Drawable
        Parameters:
        bounds - rectangle containing the component.
      • setBounds

        public 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.
        Specified by:
        setBounds in interface Drawable
        Parameters:
        x - horizontal position of the upper-left corner
        y - vertical position of the upper-left corner
        width - horizontal extent
        height - vertical extent
      • getPreferredSize

        public java.awt.geom.Dimension2D getPreferredSize()
        Returns the preferred size of the Drawable.
        Specified by:
        getPreferredSize in interface Drawable
        Returns:
        horizontal and vertical extent that wants to be reached
      • setPosition

        public void setPosition(double x,
                                double y)
        Description copied from interface: Drawable
        Sets the position to the specified coordinates.
        Specified by:
        setPosition in interface Drawable
        Parameters:
        x - Coordinate on the x-axis.
        y - Coordinate on the y-axis.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.