Class TextFrame

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

public class TextFrame
extends Frame
This TextFrame class brings up a frame containing the text panel. The class constructor is normally called during the initialization of of a AlgAnimFrame instance.

See Also:
TextPanel

Constructor Index

 o TextFrame(URL)
Construct a text frame and initialize the text panel to be added to the text frame.

Method Index

 o getTextPanel()
Get the text panel corresponding to this frame.
 o getVertScrollbar()
Get the vertical scrollbar governing the view window of the text panel.
 o handleEvent(Event)
An event handler for the text frame which handles the WINDOW_DESTROY event and vertical scrollbar.
 o preferredSize()
Return the preferred size of the frame.

Constructors

 o TextFrame
 public TextFrame(URL sourceURL)
Construct a text frame and initialize the text panel to be added to the text frame. By default, this frame is going to be displayed with its top-left corner at position (600,0). This can be changed in the constructor according to preference.

Parameters:
sourceURL - The URL of the algorithm source code to be display on the text panel.

Methods

 o preferredSize
 public Dimension preferredSize()
Return the preferred size of the frame.

Returns:
The frame size as an object of type Dimension.
Overrides:
preferredSize in class Container
 o handleEvent
 public boolean handleEvent(Event event)
An event handler for the text frame which handles the WINDOW_DESTROY event and vertical scrollbar.

Overrides:
handleEvent in class Component
 o getTextPanel
 public TextPanel getTextPanel()
Get the text panel corresponding to this frame.

Returns:
The text panel contains in this frame.
See Also:
TextPanel
 o getVertScrollbar
 public Scrollbar getVertScrollbar()
Get the vertical scrollbar governing the view window of the text panel.

Returns:
The vertical scrollbar.
See Also:
TextPanel