All Methods
zio package

context

zio
Class DisplayWindow


java.lang.Object

  extended byzio.DisplayWindow


public class DisplayWindow
extends java.lang.Object

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.

Version:
Jul 22, 2005
Author:
copyright 2005 by J Adrian Zimmer
Licensed under the Open Software License version 2.1
See Also:
zioDialog

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

DisplayWindow


public DisplayWindow(java.lang.String titl,
                     java.awt.image.BufferedImage picture,
                     java.lang.String text)
Creates a display window with both image and text.

Parameters:
titl - the title of the window
picture - the image to be displayed or null
text - the text to be displayed or null

DisplayWindow


public DisplayWindow(java.lang.String titl,
                     java.lang.String text)
Creates a display window with text only.

Parameters:
titl - the title of the window
text - the text to be displayed or null

DisplayWindow


public DisplayWindow(java.lang.String titl,
                     java.awt.image.BufferedImage picture)
Creates a display window with only an image.

Parameters:
titl - the title of the window
picture - the image to be displayed or null
Method Detail

hide


public final void hide()
Removes a window from the screen without getting rid of it. Will not wokr if the window is the only unhidden window the program has. This ensures that users always have a way to shut down programs.


show


public final void show()
Redisplays a hidden window. Has no effect if the window is already visible.


closeWindow


public final void closeWindow()
Closes the window which means it is gone forever. If this is the only unhidden window, the program stops.


author
context