acm.graphics.GResizable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javakarel Show documentation
Show all versions of javakarel Show documentation
This the original Stanford Karel for Java, packaged for Maven. ACM Library is included. See also https://cs.stanford.edu/people/eroberts/karel-the-robot-learns-java.pdf
The newest version!
/*
* @(#)GResizable.java 1.99.1 08/12/08
*/
// ************************************************************************
// * Copyright (c) 2008 by the Association for Computing Machinery *
// * *
// * The Java Task Force seeks to impose few restrictions on the use of *
// * these packages so that users have as much freedom as possible to *
// * use this software in constructive ways and can make the benefits of *
// * that work available to others. In view of the legal complexities *
// * of software development, however, it is essential for the ACM to *
// * maintain its copyright to guard against attempts by others to *
// * claim ownership rights. The full text of the JTF Software License *
// * is available at the following URL: *
// * *
// * http://www.acm.org/jtf/jtf-software-license.pdf *
// * *
// ************************************************************************
package acm.graphics;
/* Interface: GResizable */
/**
* Specifies the characteristics of a graphical object that supports the
* setSize
and setBounds
methods.
*/
public interface GResizable {
/* Method: setSize(width, height) */
/**
* Changes the size of this object to the specified width and height.
*
* Example: gobj.setSize(width, height);
* @param width The new width of the object
* @param height The new height of the object
*/
public void setSize(double width, double height);
/* Method: setSize(size) */
/**
* Changes the size of this object as specified by the GDimension
* object.
*
* Example: gobj.setSize(size);
* @param size A GDimension
object specifying the new size
*/
public void setSize(GDimension size);
/* Method: setBounds(x, y, width, height) */
/**
* Changes the bounds of this object to the specified values.
*
* Example: gobj.setBounds(x, y, width, height);
* @param x The new x-coordinate for the object
* @param y The new y-coordinate for the object
* @param width The new width of the object
* @param height The new height of the object
*/
public void setBounds(double x, double y, double width, double height);
/* Method: setBounds(bounds) */
/**
* Changes the bounds of this object to the values from the specified
* GRectangle
.
*
* Example: gobj.setBounds(bounds);
* @param bounds A GRectangle
specifying the new bounds
*/
public void setBounds(GRectangle bounds);
}