Venice 0.7beta

org.mov.ui
Class TextDialog

java.lang.Object
  extended by org.mov.ui.TextDialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class TextDialog
extends java.lang.Object
implements java.awt.event.ActionListener

Replacement dialog for Java's JOptionPane dialog for querying the user to enter a text field. It provides two fixes for the existing Java code. Firstly it allows for default text to be placed in the text input field, secondly it allows the user to press return to exit the dialog.

Author:
Daniel Makovec

Constructor Summary
TextDialog(javax.swing.JComponent parent, java.lang.String message, java.lang.String title)
          Create new text dialog.
TextDialog(javax.swing.JComponent parent, java.lang.String message, java.lang.String title, java.lang.String defaultText)
          Create new text dialog.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          ActionListener interface used for internal buttons.
 java.lang.String showDialog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextDialog

public TextDialog(javax.swing.JComponent parent,
                  java.lang.String message,
                  java.lang.String title)
Create new text dialog.

Parameters:
parent - The parent component to tie the dialog to
message - The question to ask the user
title - The title to place on the dialog

TextDialog

public TextDialog(javax.swing.JComponent parent,
                  java.lang.String message,
                  java.lang.String title,
                  java.lang.String defaultText)
Create new text dialog.

Parameters:
parent - The parent component to tie the dialog to
message - The question to ask the user
title - The title to place on the dialog
defaultText - The default string to display in the text entry
Method Detail

showDialog

public java.lang.String showDialog()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
ActionListener interface used for internal buttons.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

Venice 0.7beta