Building Parsers with Java

sjm.utensil
Class SwingUtensil

java.lang.Object
  |
  +--sjm.utensil.SwingUtensil

public class SwingUtensil
extends java.lang.Object

This class harbors a few handy swing utilities.


Constructor Summary
SwingUtensil()
           
 
Method Summary
static void center(java.awt.Frame f)
           
static java.awt.Font ideFont()
          A standard font for interactive development environment text areas.
static javax.swing.JTextArea ideTextArea()
          Return a standard text area, with the standard font and border, and with word wrapping enabled.
static javax.swing.border.TitledBorder ideTitledBorder(java.lang.String title)
          Return a standard titled border.
static javax.swing.JFrame launch(java.awt.Component c, java.lang.String title)
          Create a frame with the given title around the given component; center and display the frame; listen for exit, closing the frame's window on exit.
static void listen(java.awt.Frame f)
           
static javax.swing.JPanel textPanel(java.lang.String title, javax.swing.JTextArea ta, java.awt.Dimension pref, java.awt.Dimension min)
          Returns a standard text panel, with a scroll pane around a text area, and with a title border.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtensil

public SwingUtensil()
Method Detail

center

public static void center(java.awt.Frame f)

ideFont

public static java.awt.Font ideFont()
A standard font for interactive development environment text areas.

ideTextArea

public static javax.swing.JTextArea ideTextArea()
Return a standard text area, with the standard font and border, and with word wrapping enabled.

ideTitledBorder

public static javax.swing.border.TitledBorder ideTitledBorder(java.lang.String title)
Return a standard titled border.

launch

public static javax.swing.JFrame launch(java.awt.Component c,
                                        java.lang.String title)
Create a frame with the given title around the given component; center and display the frame; listen for exit, closing the frame's window on exit.

listen

public static void listen(java.awt.Frame f)

textPanel

public static javax.swing.JPanel textPanel(java.lang.String title,
                                           javax.swing.JTextArea ta,
                                           java.awt.Dimension pref,
                                           java.awt.Dimension min)
Returns a standard text panel, with a scroll pane around a text area, and with a title border.
Parameters:
String - the panel title
JTextArea - the text area to wrap
Dimension - the preferred size for this panel
Dimension - the minimum size for this panel
Returns:
a standard text panel, with a scroll pane around a text area, and with a title border.

by Steve Metsker