|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.HttpFormEntry
public class HttpFormEntry
Class HttpFormEntry Represents a http form post input field.
| Field Summary | |
|---|---|
static int |
TYPE_AREA
Multi-line input field type |
static int |
TYPE_FILE
Just a label in the gui |
static int |
TYPE_HIDDEN
Hidden input field type |
static int |
TYPE_INPUT
Normal input field type |
static int |
TYPE_LABEL
Just a label in the gui |
| Constructor Summary | |
|---|---|
HttpFormEntry(int type,
String name,
String label)
Create the entry |
|
HttpFormEntry(int type,
String name,
String label,
int rows,
int cols)
Create the entry |
|
HttpFormEntry(int type,
String name,
String label,
String value)
Create the entry |
|
HttpFormEntry(int type,
String name,
String label,
String value,
boolean required)
Create the entry |
|
HttpFormEntry(int type,
String name,
String label,
String value,
int rows,
int cols)
Create the entry |
|
HttpFormEntry(int type,
String name,
String label,
String value,
int rows,
int cols,
boolean required)
Create the entry |
|
HttpFormEntry(String name,
String label)
Create the entry |
|
HttpFormEntry(String name,
String fileName,
byte[] bytes)
Create an entry that already holds the byte contents of a file. |
|
| Method Summary | |
|---|---|
void |
addToGui(List guiComps)
Add the label/gui component into the list of components |
void |
browse(JTextField fld)
Open a file browser associated with the text field |
static boolean |
checkEntries(List entries)
Check the entries to make sure they have been filled in |
static String[] |
doPost(List entries,
String urlPath)
Post the given entries tot he given url |
String |
getLabel()
Get the label |
String |
getName()
Get the name |
String |
getValue()
Get the value the user entered. |
static JComponent |
makeUI(List entries)
Create the GUI from the list of entries |
boolean |
ok()
Is this entry ok. |
boolean |
okToPost()
Post the file |
void |
setValue(String newValue)
Set the text value to the given newValue |
static boolean |
showUI(List entries,
JComponent extraTop,
JComponent extraBottom,
JDialog dialog,
boolean shouldDoBusyWait)
Show the UI in a modeful dialog. |
static boolean |
showUI(List entries,
String title,
Window window,
JComponent extraTop)
Show the UI in a modeful dialog. |
static boolean |
showUI(List entries,
String title,
Window parent,
JComponent extraTop,
JComponent extraBottom)
Show the UI in a modeful dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_HIDDEN
public static final int TYPE_INPUT
public static final int TYPE_AREA
public static final int TYPE_LABEL
public static final int TYPE_FILE
| Constructor Detail |
|---|
public HttpFormEntry(String name,
String fileName,
byte[] bytes)
name - The name of the filefileName - filename - this is the name that is postedbytes - the bytes
public HttpFormEntry(String name,
String label)
name - The namelabel - The label
public HttpFormEntry(int type,
String name,
String label)
type - The type of this entryname - The namelabel - The label
public HttpFormEntry(int type,
String name,
String label,
String value)
type - The type of this entryname - The namelabel - The labelvalue - Initial value
public HttpFormEntry(int type,
String name,
String label,
String value,
boolean required)
type - The type of this entryname - The namelabel - The labelvalue - Initial valuerequired - Is this entry required
public HttpFormEntry(int type,
String name,
String label,
int rows,
int cols)
type - The type of this entryname - The namelabel - The labelrows - How may rows in the text areacols - How many columns in the text area
public HttpFormEntry(int type,
String name,
String label,
String value,
int rows,
int cols)
type - The type of this entryname - The namelabel - The labelvalue - Initial valuerows - How many rowscols - How many cols
public HttpFormEntry(int type,
String name,
String label,
String value,
int rows,
int cols,
boolean required)
type - The type of this entryname - The namelabel - The labelvalue - Initial valuerows - How many rowscols - How many colsrequired - Is this entry required| Method Detail |
|---|
public boolean ok()
public void addToGui(List guiComps)
guiComps - A list.public void browse(JTextField fld)
fld - the JTextFieldpublic String getValue()
public void setValue(String newValue)
newValue - The new textpublic String getName()
public String getLabel()
public static JComponent makeUI(List entries)
entries - List of entries
public static boolean checkEntries(List entries)
entries - list of entries
public static boolean showUI(List entries,
String title,
Window window,
JComponent extraTop)
entries - List of entriestitle - The dialog titlewindow - The parent windowextraTop - If non-null then this is added to the top of the gui. It allows
you to provide a label, etc.
public static boolean showUI(List entries,
String title,
Window parent,
JComponent extraTop,
JComponent extraBottom)
entries - List of entriestitle - The dialog titleparent - The parent windowextraTop - If non-null then this is added to the top of the gui. It allows
you to provide a label, etc.extraBottom - Like extraTop but on the bottom of the window
public static boolean showUI(List entries,
JComponent extraTop,
JComponent extraBottom,
JDialog dialog,
boolean shouldDoBusyWait)
entries - List of entriesextraTop - If non-null then this is added to the top of the gui.
It allows you to provide a label, etc.extraBottom - Like extraTop but on the bottom of the windowdialog - the dialogshouldDoBusyWait - true to wait
public boolean okToPost()
public static String[] doPost(List entries,
String urlPath)
entries - The entriesurlPath - The url to post to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||