Class semper.tinguin.StructDoc
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.tinguin.StructDoc

java.lang.Object
   |
   +----semper.tinguin.Document
           |
           +----semper.tinguin.StructDoc

public class StructDoc
extends Document
Definition of strucured docunments that allow to specify headings, lists and descrption lists. Presumably this will be the interface for Tinguin programmers. (Structured) Documents are shown on a display, namely a derivate of a DocumentDisplay which in turn is invoked by a derivate of a TinguinDisplay.
Version:
0.5
Author:
Tobias Himstedt
See Also:
TinguinDisplay, GraphTinguin

Constructor Index

 o StructDoc()
Create a structured document
 o StructDoc(DocumentDisplay)
Create a structured document

Method Index

 o addBoldFlowing(String)
Write flowing bold text
 o addFixedFlowing(String)
Write flowing fixed text
 o addHeading(String, int)
Insert a heading.
 o addItalicFlowing(String)
Write flowing italic text
 o addItem(String)
Add an item to the to current (ordered or unordered) list.
 o beginBold()
Write the following text in bold until an endBIF occurs.
 o beginFixed()
Write the following text in fixed font until an endBIF occurs.
 o beginItalic()
Write all following text in italic until an endBIF occurs.
 o beginOrderedList()
Start an ordered list.
 o beginUnorderedList()
Start an unordered list.
 o clear()
Clear the document.
 o describeItem(String, String)
Start a description list.
 o endBIF()
Write the following text as it was before begin{Italic|Bold|Fixed}
 o endOrderedList()
End the current (outermost) ordered list.
 o endUnorderedList()
End the current unordered list.

Constructors

 o StructDoc
  protected StructDoc(DocumentDisplay w)
Create a structured document
Parameters:
w - The DocumentDisplay where to to show the document
 o StructDoc
  public StructDoc()
Create a structured document

Methods

 o addHeading
  public final void addHeading(String text,
                               int level)
Insert a heading. This could be considered as an equivalent to <h1-5>Heading</h1-5> in HTML.
Parameters:
text - The heading text. A heading is always a singe line, meaning: Before and after the heading are newlines.
level - The heading level, currently from 1 to 5 whereat 1 is the biggest and 5 is smallest heading.
 o beginOrderedList
  public final void beginOrderedList()
Start an ordered list. The items of the list are then added with addItem. The first item will have the label 1 or any other of i, I, a, A, depending how deep the ordered lists are nested. This could be considered as the ordered list definition <ol>... in HTML.
See Also:
addItem, endOrderedList
 o endOrderedList
  public final void endOrderedList()
End the current (outermost) ordered list. Equivalent to </ol> in HTML.
See Also:
addItem, beginOrderedList
 o addItem
  public final void addItem(String text)
Add an item to the to current (ordered or unordered) list. This must be within an open list. Equivalent to <li> tag in HTML.
Parameters:
text - The text to print after the label.
See Also:
beginOrderedList, endOrderedList, beginUnorderedList, endUnorderedList
 o beginUnorderedList
  public final void beginUnorderedList()
Start an unordered list. The labels of the list items will be one of *, -, o, +, depending on how deep the unordered lists are nested. The items are also added with addItem. This could be considered as the unordered list definition <ul>... in HTML.
See Also:
addItem, endUnorderedList
 o endUnorderedList
  public final void endUnorderedList()
End the current unordered list. Equivalent to </ul>
See Also:
addItem, beginUnorderedList
 o describeItem
  public final void describeItem(String item,
                                 String description)
Start a description list. A description list consits of a text label which is the 'described' in the next lines. The descrption text is slightly indented.

Similar to the description list in HTML.
<dl>
<dt> Item
<dd> Description
</dl>
Parameters:
item - The item which is going to be described
description - The description of the item
 o beginItalic
  public final void beginItalic()
Write all following text in italic until an endBIF occurs.
See Also:
endBIF
 o beginBold
  public final void beginBold()
Write the following text in bold until an endBIF occurs.
See Also:
endBIF
 o beginFixed
  public final void beginFixed()
Write the following text in fixed font until an endBIF occurs.
See Also:
endBIF
 o endBIF
  public final void endBIF()
Write the following text as it was before begin{Italic|Bold|Fixed}
 o addBoldFlowing
  public final void addBoldFlowing(String w)
Write flowing bold text
Parameters:
w - The text to be written in bold
 o addItalicFlowing
  public final void addItalicFlowing(String w)
Write flowing italic text
Parameters:
w - The text to be written in italic
 o addFixedFlowing
  public final void addFixedFlowing(String w)
Write flowing fixed text
Parameters:
w - The text to be written in fixed
 o clear
  public void clear()
Clear the document. Remove all elements from the document and make it empty. Set the deafult font und clear all lists.
Overrides:
clear in class Document

All Packages  Class Hierarchy  This Package  Previous  Next  Index