|
All Methods zio package context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zio.DisplayWindow
This displays some text, an image, or both.
This class was made for teaching purposes. It is meant to be
used with the DialogWindow
class. As an introduction,
here is an example which does not involve DialogWindow
.
DisplayWindow = new DisplayWindow( "Window Title", InOut.readImage("pictureFilename.jpg"), "Picture Caption\nmultiple lines ok" );
This creates an unchangeable window titled "Window Title". The window shows an image taken from the file named "pictureFilename.jpg" and with a multiline caption as indicated. A runtime error is generated if this window will not fit on the screen. Although unchangeable, the window can be temporarily removed from the screen.
Constructor Summary | |
DisplayWindow(java.lang.String titl,
java.awt.image.BufferedImage picture)
Creates a display window with only an image. |
|
DisplayWindow(java.lang.String titl,
java.awt.image.BufferedImage picture,
java.lang.String text)
Creates a display window with both image and text. |
|
DisplayWindow(java.lang.String titl,
java.lang.String text)
Creates a display window with text only. |
Method Summary | |
void |
closeWindow()
Closes the window which means it is gone forever. |
void |
hide()
Removes a window from the screen without getting rid of it. |
void |
show()
Redisplays a hidden window. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DisplayWindow(java.lang.String titl, java.awt.image.BufferedImage picture, java.lang.String text)
titl
- the title of the windowpicture
- the image to be displayed or nulltext
- the text to be displayed or nullpublic DisplayWindow(java.lang.String titl, java.lang.String text)
titl
- the title of the windowtext
- the text to be displayed or nullpublic DisplayWindow(java.lang.String titl, java.awt.image.BufferedImage picture)
titl
- the title of the windowpicture
- the image to be displayed or nullMethod Detail |
public final void hide()
public final void show()
public final void closeWindow()
|
author context |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |