org.sourcejammer.client.gui.dialog
Class InputBox

java.lang.Object
  |
  +--org.sourcejammer.client.gui.dialog.InputBox

public class InputBox
extends java.lang.Object

Title: $FileName: InputBox.java$

Version:
$VerNum: 2$

$Description: Easily generates a small dialog containing input fields (text box, password, or checkbox).$ $KeyWordsOff: $

Author:
$AuthorName: Rob MacGrogan$

Nested Class Summary
static class InputBox.FieldType
           
 
Field Summary
private  java.lang.String[] defaultValues
           
private  InputBox.FieldType[] fieldTypes
           
private  SJDialog inputDialog
           
private  java.lang.String[] inputLabels
           
private  javax.swing.JPanel inputPanel
           
private  java.lang.String[] inputValues
           
private  boolean modal
           
private  java.lang.String okButtonText
           
private  boolean showDefaults
           
private  java.lang.String title
           
private  boolean useFieldTypes
           
 
Constructor Summary
InputBox()
           
 
Method Summary
private  javax.swing.JButton buildCancelButton()
           
private  void buildInputBox(java.awt.Component c)
           
private  javax.swing.JButton buildOKButton(java.lang.String okButtonText)
           
 java.lang.String[] getInputValues()
          Returns the values the user entered in the generated dialog.
 void setDefaultValues(java.lang.String[] defaultValues)
          Sets the defaultValues.
 void setFieldTypes(InputBox.FieldType[] fieldTypes)
          Sets the fieldTypes.
 void setInputLabels(java.lang.String[] inputLabels)
          Sets the inputLabels.
 void setModal(boolean modal)
          Sets the modal.
 void setOkButtonText(java.lang.String okButtonText)
          Sets the okButtonText.
 void setTitle(java.lang.String title)
          Sets the title.
 void showInputBox()
           
 void showInputBox(java.awt.Dialog d)
           
 void showInputBox(java.awt.Frame f)
           
private  void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputDialog

private SJDialog inputDialog

inputPanel

private javax.swing.JPanel inputPanel

inputLabels

private java.lang.String[] inputLabels

defaultValues

private java.lang.String[] defaultValues

title

private java.lang.String title

modal

private boolean modal

okButtonText

private java.lang.String okButtonText

fieldTypes

private InputBox.FieldType[] fieldTypes

showDefaults

private boolean showDefaults

useFieldTypes

private boolean useFieldTypes

inputValues

private java.lang.String[] inputValues
Constructor Detail

InputBox

public InputBox()
Method Detail

showInputBox

public void showInputBox()

showInputBox

public void showInputBox(java.awt.Frame f)

showInputBox

public void showInputBox(java.awt.Dialog d)

buildOKButton

private javax.swing.JButton buildOKButton(java.lang.String okButtonText)

buildCancelButton

private javax.swing.JButton buildCancelButton()

buildInputBox

private void buildInputBox(java.awt.Component c)

validate

private void validate()

setDefaultValues

public void setDefaultValues(java.lang.String[] defaultValues)
Sets the defaultValues.

Parameters:
defaultValues - The defaultValues to set

setFieldTypes

public void setFieldTypes(InputBox.FieldType[] fieldTypes)
Sets the fieldTypes.

Parameters:
fieldTypes - The fieldTypes to set

setInputLabels

public void setInputLabels(java.lang.String[] inputLabels)
Sets the inputLabels.

Parameters:
inputLabels - The inputLabels to set

setModal

public void setModal(boolean modal)
Sets the modal.

Parameters:
modal - The modal to set

setOkButtonText

public void setOkButtonText(java.lang.String okButtonText)
Sets the okButtonText.

Parameters:
okButtonText - The okButtonText to set

setTitle

public void setTitle(java.lang.String title)
Sets the title.

Parameters:
title - The title to set

getInputValues

public java.lang.String[] getInputValues()
Returns the values the user entered in the generated dialog.

Returns:
String[]


Copyright 2003 Soucejammer project.