acm.graphics
Interface GResizable

All Known Implementing Classes:
GRect, GOval, GImage

public interface GResizable

Specifies the characteristics of a graphical object that supports the setSize and setBounds methods.


Method Summary
void setBounds(double x, double y, double width, double height)
Changes the bounds of this object to the specified values.
void setBounds(GRectangle bounds)
Changes the bounds of this object to the values from the specified GRectangle.
void setSize(double width, double height)
Changes the size of this object to the specified width and height.
void setSize(GDimension size)
Changes the size of this object as specified by the GDimension object.
 

Method Detail

public void setBounds(double x, double y, double width, double height)

Changes the bounds of this object to the specified values.

 
Usage: gobj.setBounds(x, y, width, height); 
Parameters: 
 The new x-coordinate for the object
 The new y-coordinate for the object
width  The new width of the object
height  The new height of the object
 

public void setBounds(GRectangle bounds)

Changes the bounds of this object to the values from the specified GRectangle.

 
Usage: gobj.setBounds(bounds); 
Parameter: 
bounds  A GRectangle specifying the new bounds
 

public void setSize(double width, double height)

Changes the size of this object to the specified width and height.

 
Usage: gobj.setSize(width, height); 
Parameters: 
width  The new width of the object
height  The new height of the object
 

public void setSize(GDimension size)

Changes the size of this object as specified by the GDimension object.

 
Usage: gobj.setSize(size); 
Parameter: 
size  A GDimension object specifying the new size