de.uni_paderborn.fujaba.app
Class BlockContainer

java.lang.Object
  extended byde.uni_paderborn.fujaba.app.BlockContainer

class BlockContainer
extends java.lang.Object

The class BlockContainer loads and stores a complete text for scrolling purposes

Version:
$Revision: 1.27 $
Author:
$Author: lowende $

Field Summary
private  java.util.Vector blockTable
          The vector that contains all blocks of the container
private  int width
          Contains the width in pixel of all blocks in the container
private  int wordEnd
          No comment provided by developer, please add a comment to improve documentation.
private  int wordStart
          Start and ending point of the current word in the readbuffer
 
Constructor Summary
BlockContainer(int w)
          Constructor of BlockContainer
 
Method Summary
 Block getBlock(int i)
          Returns the block at the specified position from the container
 int getBlockCount()
          Returns the number of blocks in the container
private  java.lang.String getNextWord(java.lang.String scriptLine)
          scans the scriptLine buffer for the next word !!!
 int getWidth()
          Returns the width in pixel of all blocks in the container
 boolean readScript(java.lang.String script, java.awt.Font titleF, java.awt.Font textF, java.awt.Font subtitleF)
          Reads and parses a script file, formats the text and stores it into Blocks in BlockContainers blockTable
private  void resetGNW()
          resets the scriptLine buffer scan !!!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockTable

private java.util.Vector blockTable
The vector that contains all blocks of the container


width

private int width
Contains the width in pixel of all blocks in the container


wordStart

private int wordStart
Start and ending point of the current word in the readbuffer


wordEnd

private int wordEnd
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

BlockContainer

public BlockContainer(int w)
Constructor of BlockContainer

Parameters:
w - the width of all blocks in the container
Method Detail

getNextWord

private java.lang.String getNextWord(java.lang.String scriptLine)
scans the scriptLine buffer for the next word !!! should be rewritten in cause of ugly implementation !!!

Parameters:
scriptLine - No description provided
Returns:
The nextWord value

resetGNW

private void resetGNW()
resets the scriptLine buffer scan !!! should be rewritten in cause of ugly implementation !!!


readScript

public boolean readScript(java.lang.String script,
                          java.awt.Font titleF,
                          java.awt.Font textF,
                          java.awt.Font subtitleF)
                   throws java.lang.Exception
Reads and parses a script file, formats the text and stores it into Blocks in BlockContainers blockTable

Parameters:
script - the script file
titleF - Font for the Titles
textF - Font for normal Text
subtitleF - Font for subscriptions
Returns:
No description provided
Throws:
java.lang.Exception - Exception description not provided

getWidth

public int getWidth()
Returns the width in pixel of all blocks in the container

Returns:
width in pixel

getBlock

public Block getBlock(int i)
Returns the block at the specified position from the container

Parameters:
i - index of block to return
Returns:
the specified block

getBlockCount

public int getBlockCount()
Returns the number of blocks in the container

Returns:
The number of blocks in the container