|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectPictureFrame
public class PictureFrame
Class that holds a digital picture and displays it using a JFrame
| Field Summary | |
|---|---|
(package private) JFrame |
frame
Main window used as the frame |
(package private) ImageIcon |
imageIcon
ImageIcon used to display the picture in the label |
| Constructor Summary | |
|---|---|
PictureFrame()
A constructor that takes no arguments. |
|
PictureFrame(DigitalPicture picture)
A constructor that takes a picture to display |
|
| Method Summary | |
|---|---|
void |
close()
A method to close a picture frame |
void |
displayImage()
A method to make sure the frame is displayed |
void |
hide()
A method to hide the frame |
void |
repaint()
Method to force the picture frame to repaint (redraw) |
void |
setPicture(Picture picture)
Method to set the picture to show in this picture frame |
void |
setTitle(String title)
Method to set the title for the picture frame |
void |
setVisible(boolean flag)
A method to set the visible flag on the frame |
void |
updateImage()
A method to update the picture frame image with the image in the picture |
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 |
| Field Detail |
|---|
JFrame frame
ImageIcon imageIcon
| Constructor Detail |
|---|
public PictureFrame()
public PictureFrame(DigitalPicture picture)
picture - the digital picture to display in the
picture frame| Method Detail |
|---|
public void close()
public void displayImage()
public void hide()
public void repaint()
public void setPicture(Picture picture)
picture - the new picture to usepublic void setTitle(String title)
title - the title to usepublic void setVisible(boolean flag)
flag - the flag to usepublic void updateImage()
public void updateImageAndShowIt()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||