com.threerings.opengl.gui
Class TextArea.Line

java.lang.Object
  extended by com.threerings.opengl.gui.TextArea.Line
Enclosing class:
TextArea

protected static class TextArea.Line
extends Object

Contains the segments of text on a single line.


Field Summary
 int dx
          The current x position at which new text will be appended.
 TextArea.Run end
          The run that ends this line.
 int height
          The height of this line.
 ArrayList<Text> segments
          A list of Text instances for the text on this line.
 TextArea.Run start
          The run that starts this line.
 
Constructor Summary
protected TextArea.Line()
           
 
Method Summary
 int addRun(TextFactory tfact, TextArea.Run run, Color4f color, int effect, int effectSize, Color4f effectColor, int maxWidth, int offset)
          Adds the supplied run to the line using the supplied text factory, returns the offset into the run that must be appeneded to a new line or -1 if the entire run was appended.
 int getWidth()
          Returns the width of this line.
 void render(Renderer renderer, int x, int y, float alpha)
          Renders this line of text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public TextArea.Run start
The run that starts this line.


end

public TextArea.Run end
The run that ends this line.


dx

public int dx
The current x position at which new text will be appended.


height

public int height
The height of this line.


segments

public ArrayList<Text> segments
A list of Text instances for the text on this line.

Constructor Detail

TextArea.Line

protected TextArea.Line()
Method Detail

addRun

public int addRun(TextFactory tfact,
                  TextArea.Run run,
                  Color4f color,
                  int effect,
                  int effectSize,
                  Color4f effectColor,
                  int maxWidth,
                  int offset)
Adds the supplied run to the line using the supplied text factory, returns the offset into the run that must be appeneded to a new line or -1 if the entire run was appended.


render

public void render(Renderer renderer,
                   int x,
                   int y,
                   float alpha)
Renders this line of text.


getWidth

public int getWidth()
Returns the width of this line.