All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.util.MsgBox
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Dialog
|
+----com.sun.java.swing.JDialog
|
+----com.netobjects.nfx.util.MsgBox
- public class MsgBox
- extends JDialog
- implements ActionListener
Message box utility class which expands to the "max-width" as more
text is added. The pixel-width of the given text is determined and the
message box is resized accordingly up to the max-width where a scrollable
text pane is used instead of a on-line label. In this case the window width
reverts to the standard-width, and the height is increased.
- Version:
- 1.0
- Author:
- Scott Cinnamond
-
dmBtnLabelOk
- The OK label.
-
dmBtnOk
- The ok button.
-
dmMaxWidth
- Max width we want the window, a bit less than an 800x600 screen.
-
dmMsg
- The message.
-
dmStandardHeight
- The dialog standard height.
-
dmStandardPad
- The pixel pad value used to
-
dmStandardWidth
- The dialog standard width.
-
MsgBox(Frame, String, String)
- Constructor.
-
MsgBox(Frame, String, String, int, int)
- Constructor.
-
actionPerformed(ActionEvent)
- Handle control events.
-
addListeners()
-
-
createControls()
-
-
main(String[])
-
-
toPixels(String)
-
-
windowClosing(WindowEvent)
- Processes a window close event.
dmBtnOk
private JButton dmBtnOk
- The ok button.
dmMsg
private String dmMsg
- The message.
dmBtnLabelOk
private static final String dmBtnLabelOk
- The OK label.
dmStandardWidth
private int dmStandardWidth
- The dialog standard width.
dmStandardHeight
private int dmStandardHeight
- The dialog standard height.
dmStandardPad
private static final int dmStandardPad
- The pixel pad value used to
dmMaxWidth
private int dmMaxWidth
- Max width we want the window, a bit less than an 800x600 screen.
MsgBox
public MsgBox(Frame parent,
String title,
String msg)
- Constructor.
- Parameters:
- parent - the dialog parent frame.
- title - the dialog title.
- msg - the message.
MsgBox
public MsgBox(Frame parent,
String title,
String msg,
int width,
int height)
- Constructor.
- Parameters:
- parent - the dialog parent frame.
- title - the dialog title.
- msg - the message.
- width - the dialog width.
- height - the dialog height.
createControls
protected void createControls()
addListeners
protected void addListeners()
toPixels
protected int toPixels(String s)
windowClosing
public void windowClosing(WindowEvent event)
- Processes a window close event.
- Parameters:
- event - the window event.
actionPerformed
public void actionPerformed(ActionEvent event)
- Handle control events.
main
public static void main(String argv[])
All Packages Class Hierarchy This Package Previous Next Index