Java Reference
In-Depth Information
Composite listFormatting # new Font(" ! 2", infoColor,
"Courier New");
Ul list # new Ul();
membersPlaceholder # list;
// add a small embellishment: a link to Java homepage at
// Sun
Composite link # new Link("");
link.addChild( new Text("Java © Sun"));
// handle the name of the class by filling in the title
// of the HTML page and the heading at the top of the page
private void gotClassName(String className) {
titlePlaceholder.addChild( new Text(className));
head # new Head("Class: " ! className);
// handle a public member: put the member inside a LI
// element, then add this element in the placeholder for
// the public elements
private void gotMember(String member) {
// creates a new LI item
Li item # new Li();
// add the last chunk to the list item
item.addChild( new Text(member));
// putting a line break at the end
item.addChild(new Br());
// add the item to the placeholder
// compose the components into a single page at the end
// of the parsing
private void composePage() {
page # new Page();
if (head ! # null )
// receives the notification of parsing events and calls
// the appropriate helper method
public void update(Observable observable, Object arg) {
JavaParseEvent event # (JavaParseEvent) arg;
if (event.type ## JavaParseEvent.BEGIN_PARSING)
Search WWH ::

Custom Search