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
-
TextFrame(URL)
- Construct a text frame and initialize the text panel to be added to
the text frame.
-
getTextPanel()
- Get the text panel corresponding to this frame.
-
getVertScrollbar()
- Get the vertical scrollbar governing the view window of the text panel.
-
handleEvent(Event)
- An event handler for the text frame which handles the WINDOW_DESTROY
event and vertical scrollbar.
-
preferredSize()
- Return the preferred size of the frame.
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.
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
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
getTextPanel
public TextPanel getTextPanel()
- Get the text panel corresponding to this frame.
- Returns:
- The text panel contains in this frame.
- See Also:
- TextPanel
getVertScrollbar
public Scrollbar getVertScrollbar()
- Get the vertical scrollbar governing the view window of the text panel.
- Returns:
- The vertical scrollbar.
- See Also:
- TextPanel