img
Class PictureFrame

java.lang.Object
  extended by img.PictureFrame

public class PictureFrame
extends java.lang.Object

The class encapsulates a frame that is capable of displaying a DigitalPicture. This class is based on an original specificaion from Guzdial and Ericson, with explanatory comments and modifications provided by various contributors: mb@cse.yorku.ca


Constructor Summary
PictureFrame()
          Default constructor that ...
PictureFrame(AbstractDigitalPicture picture)
          Constructs a PictureFrame for the passed DigitalPicture object.
 
Method Summary
 void close()
          Causes this picture frame to be closed.
 void displayImage()
          Ensure that this picture frame is shown on the current graphical display.
 void hide()
          Ensure that this picture frame is not shown on the current graphical display.
 void repaint()
          Cause this picture frame to signal to the graphics manager that it needs to be redrawn at the next opportunity.
 void setPicture(AbstractDigitalPicture picture)
          Set the digital picture to be shown in the this picture frame
 void setTitle(java.lang.String title)
          Set the title for the picture frame to be the passed string value.
 void setVisible(boolean shouldBeShown)
          Specify whether this picture frame is shown on the current graphical display or not, as per the passed boolean flag.
 void updateImage()
          Update this picture frame to show the current digital picture (it may have been changed since the most recent display)
 void updateImageAndShowIt()
          A method to update the picture frame image with the image in the picture and show it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PictureFrame

public PictureFrame()
Default constructor that ... A constructor that takes no arguments. This is needed for subclasses of this class


PictureFrame

public PictureFrame(AbstractDigitalPicture picture)
Constructs a PictureFrame for the passed DigitalPicture object.

Parameters:
picture - the digital picture to display in the picture frame
Method Detail

setPicture

public void setPicture(AbstractDigitalPicture picture)
Set the digital picture to be shown in the this picture frame

Parameters:
picture - the digital picture to be shown in this frame

updateImage

public void updateImage()
Update this picture frame to show the current digital picture (it may have been changed since the most recent display)


updateImageAndShowIt

public void updateImageAndShowIt()
A method to update the picture frame image with the image in the picture and show it


displayImage

public void displayImage()
Ensure that this picture frame is shown on the current graphical display.


hide

public void hide()
Ensure that this picture frame is not shown on the current graphical display.


setVisible

public void setVisible(boolean shouldBeShown)
Specify whether this picture frame is shown on the current graphical display or not, as per the passed boolean flag.

Parameters:
shouldBeShown - a boolean value that indicates whether this picture frame should be shown on not.

close

public void close()
Causes this picture frame to be closed.


setTitle

public void setTitle(java.lang.String title)
Set the title for the picture frame to be the passed string value.

Parameters:
title - as described above

repaint

public void repaint()
Cause this picture frame to signal to the graphics manager that it needs to be redrawn at the next opportunity.