Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

TextBox Class Reference

Inheritance diagram for TextBox:

Widget List of all members.

Public Member Functions

 TextBox (int rows, int cols, String prefix, Form form)
void loadValues ()
void display (boolean hidden)
void display (boolean hidden, String params)

Public Attributes

int rows
int cols
String text

Detailed Description

Definition at line 1 of file TextBox.java.


Constructor & Destructor Documentation

TextBox::TextBox int  rows,
int  cols,
String  prefix,
Form  form
[inline]
 

Definition at line 6 of file TextBox.java.

00007         {
00008           super(prefix, form);
00009           this.rows = rows;
00010           this.cols = cols;
00011         }


Member Function Documentation

void TextBox::display boolean  hidden,
String  params
[inline]
 

Definition at line 23 of file TextBox.java.

References cols, Widget::htmlencode(), Widget::p(), Widget::prefix, rows, and text.

00024         {
00025     String t = text == null ? "" : text;
00026     if (hidden)
00027       p("<input type=hidden name=" + prefix + " value=\"" + htmlencode(t)
00028         + "\"" + params+  ">");
00029     else if (rows == 0)
00030       p("<input type=textbox name=" + prefix + " value=\"" + htmlencode(t)
00031         + "\" size=" + cols + params+  ">");
00032     else
00033       p("<textarea name=" + prefix + " rows=" + rows + " cols=" + cols
00034         + params + ">" + t + "</textarea>");
00035         }       

void TextBox::display boolean  hidden  )  [inline]
 

Reimplemented from Widget.

Definition at line 18 of file TextBox.java.

References Widget::display().

00019         {
00020           display(hidden, "");
00021         }

void TextBox::loadValues  )  [inline]
 

Reimplemented from Widget.

Definition at line 13 of file TextBox.java.

References Widget::loadAttribute(), and text.

00014         {
00015           text = loadAttribute();
00016         }


Member Data Documentation

int TextBox::cols
 

Definition at line 3 of file TextBox.java.

int TextBox::rows
 

Definition at line 3 of file TextBox.java.

String TextBox::text
 

Definition at line 4 of file TextBox.java.


The documentation for this class was generated from the following file:
Generated on Mon Mar 6 23:34:35 2006 by  doxygen 1.4.4