org.problets.lib.stretchtext
Class StretchTextItemView

java.lang.Object
  extended by org.problets.lib.stretchtext.StretchTextItemView
All Implemented Interfaces:
java.awt.image.ImageObserver

public class StretchTextItemView
extends java.lang.Object
implements java.awt.image.ImageObserver

Displays one StretchTextItemModel

Author:
Amruth Kumar

Field Summary
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
StretchTextItemView(StretchTextItemModel inContent, javax.swing.JPanel inBasePanel)
           
 
Method Summary
 boolean elaborate(int yCoordinate)
           
 int getStartY()
          Returns the starting y coordinate for this item view
 boolean imageUpdate(java.awt.Image image, int flags, int x, int y, int width, int height)
           
static void main(java.lang.String[] args)
           
 int paint(java.awt.Graphics g, TextFormatter formatter, int inXStart, int inYStart)
          Prints the text, with elaborations if necessary.
 void setElaborateToDepth(int uptoDepth)
          If the depth of this item is <= indicated depth, set it to be elaborated from the start.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StretchTextItemView

public StretchTextItemView(StretchTextItemModel inContent,
                           javax.swing.JPanel inBasePanel)
Method Detail

paint

public int paint(java.awt.Graphics g,
                 TextFormatter formatter,
                 int inXStart,
                 int inYStart)
Prints the text, with elaborations if necessary. Returns the yCoordinate past the last line


imageUpdate

public boolean imageUpdate(java.awt.Image image,
                           int flags,
                           int x,
                           int y,
                           int width,
                           int height)
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

getStartY

public int getStartY()
Returns the starting y coordinate for this item view


elaborate

public boolean elaborate(int yCoordinate)

setElaborateToDepth

public void setElaborateToDepth(int uptoDepth)
If the depth of this item is <= indicated depth, set it to be elaborated from the start.


main

public static void main(java.lang.String[] args)