All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class net.strandberg.html.LabeledString

java.lang.Object
   |
   +----net.strandberg.html.LabeledString

public class LabeledString
extends Object
implements HTMLItem
The class LabeledString is used to create HTML strings that are labeled. To create a labeled string, inside or outside an HTML form, that looks like this:

Your name: John Doe

you would need HTML code like this:

   Your name: John Doe;
 
which is created by this Java code:
   LabeledString ls = new Text("Your name: ", "John Doe", false);
   String myString = text.toHTML();
 
The nice thing with using the labeled string is that it could be used in e.g. forms that are inside tables. In that case, label and string will be aligned with other items in the form.

Version:
$Revision: 0.0 $
Author:
Mats Strandberg

Constructor Index

 o LabeledString(boolean, String, String)
 o LabeledString(String, String)
 o LabeledString(String, String, boolean)

Method Index

 o main(String[])
Tests the class
 o toHTML()

Constructors

 o LabeledString
 public LabeledString(String label,
                      String text)
 o LabeledString
 public LabeledString(String label,
                      String text,
                      boolean asTableItem)
 o LabeledString
 public LabeledString(boolean wrap,
                      String label,
                      String text)

Methods

 o toHTML
 public String toHTML()
 o main
 public static void main(String args[])
Tests the class


All Packages  Class Hierarchy  This Package  Previous  Next  Index