Class Picture
java.lang.Object
SimplePicture
Picture
- All Implemented Interfaces:
DigitalPicture
A class that represents a picture. This class inherits from
SimplePicture and allows the student to add functionality to
the Picture class.
Copyright Georgia Institute of Technology 2004-2005
-
Constructor Summary
ConstructorsConstructorDescriptionPicture()
Constructor that takes no argumentsPicture
(int width, int height) Constructor that takes a file name and creates the picturePicture
(BufferedImage image) Constructor that takes a buffered imageConstructor that takes a picture and creates a copy of that picture -
Method Summary
Methods inherited from class SimplePicture
addMessage, copyPicture, createGraphics, drawString, getBasicPixel, getBufferedImage, getExtension, getFileName, getGraphics, getHeight, getImage, getPictureFrame, getPictureWithHeight, getPictureWithWidth, getPixel, getPixels, getTitle, getTransformEnclosingRect, getTranslationEnclosingRect, getWidth, hide, load, repaint, scale, setAllPixelsToAColor, setBasicPixel, setFileName, setPictureFrame, setTitle, setVisible, show
-
Constructor Details
-
Picture
public Picture()Constructor that takes no arguments -
Picture
public Picture(int width, int height) Constructor that takes a file name and creates the picture- Parameters:
fileName
- the name of the file to create the picture from
-
Picture
Constructor that takes a picture and creates a copy of that picture -
Picture
Constructor that takes a buffered image- Parameters:
image
- the buffered image to use
-
-
Method Details
-
toString
Method to return a string with information about this picture.- Overrides:
toString
in classSimplePicture
- Returns:
- a string with information about the picture such as fileName, height and width.
-