package e4s.tutorial; import e4s.html.*; import e4s.servlet.E4ModuleImplementation; /** * A simple class, that demonstrates the use of text output to HTML pages. * E4S consists of a class for each HTML tag, for example you could write * in your code html.B().I().print("Hello") which results in <Bgt;<Igt;Hello</I></Bgt;. * But at any certain point, you need to print out the "real" content which is not a HTML tag and this * can be done using the print() or println() functions provided by almost all HTML tag objects. * * {@tutorial Example_SimpleOutput} */ public class Example_SimpleOutput extends E4ModuleImplementation { public static E4Method start = null; public void start( HTML html ) { html.println("You can use the println(..) function to write out Strings, numbers, .."); // use the P() for a paragraph html.P(); // use the print(), println() functions for numbers, text html.print(1000); // use the BR() for a break html.BR(); // use the HR() for a horizontal ruler html.HR(); // this number is small, italic, bold and strike html.STRIKE().SMALL().I().B().print(12345); // this is very similar but each element can be accessed individually STRIKE strike = html.STRIKE(); strike.print(6); SMALL small = strike.SMALL(); small.print(7); I italic = small.I(); italic.print(8); B bold = italic.B(); bold.print(9); } }