Class LFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----LFrame

public class LFrame
extends Frame
LFrame is an extension of the java.awt.Frame class customized to display the legend of the color code used in the animation panel.


Variable Index

 o height
The dimension of the frame in the number of pixels.
 o width
The dimension of the frame in the number of pixels.

Constructor Index

 o LFrame(Color[], String[])
Creates a new legend frame.

Method Index

 o handleEvent(Event)
Legend window event handling method to dispose the legend frame when the WINDOW_DESTROY event is received.
 o preferredSize()
Returns the dimension of the window when probed by the window manager.
 o setDimension(int, int)
Set the dimension of the legend window.

Variables

 o width
 public int width
The dimension of the frame in the number of pixels.

 o height
 public int height
The dimension of the frame in the number of pixels.

Constructors

 o LFrame
 public LFrame(Color colors[],
               String strings[])
Creates a new legend frame.

Parameters:
colors - Array of Color using in the DrawingPanel.
strings - The descriptions of each color representation.

Methods

 o setDimension
 public void setDimension(int width,
                          int height)
Set the dimension of the legend window.

Parameters:
width - The width of the window.
height - The height of the window.
 o preferredSize
 public Dimension preferredSize()
Returns the dimension of the window when probed by the window manager.

Overrides:
preferredSize in class Container
 o handleEvent
 public boolean handleEvent(Event event)
Legend window event handling method to dispose the legend frame when the WINDOW_DESTROY event is received.

Parameters:
event - Event invoked.
Overrides:
handleEvent in class Component
See Also:
Event