com.jmex.bui
Class BTextArea.Line

java.lang.Object
  extended by com.jmex.bui.BTextArea.Line
Enclosing class:
BTextArea

protected static class BTextArea.Line
extends java.lang.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.
 BTextArea.Run end
          The run that ends this line.
 int height
          The height of this line.
 java.util.ArrayList<BText> segments
          A list of BText instances for the text on this line.
 BTextArea.Run start
          The run that starts this line.
 
Constructor Summary
protected BTextArea.Line()
           
 
Method Summary
 int addRun(BTextFactory tfact, BTextArea.Run run, com.jme.renderer.ColorRGBA color, TextEffect effect, int effectSize, com.jme.renderer.ColorRGBA 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(com.jme.renderer.Renderer renderer, int x, int y, float alpha)
          Renders this line of text.
 void wasAdded()
           
 void wasRemoved()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

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


end

public BTextArea.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 java.util.ArrayList<BText> segments
A list of BText instances for the text on this line.

Constructor Detail

BTextArea.Line

protected BTextArea.Line()
Method Detail

addRun

public int addRun(BTextFactory tfact,
                  BTextArea.Run run,
                  com.jme.renderer.ColorRGBA color,
                  TextEffect effect,
                  int effectSize,
                  com.jme.renderer.ColorRGBA 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.

Parameters:
tfact - BTextFactory
run - Run
color - ColorRGBA
effect - int
effectSize - int
effectColor - ColorRGBA
maxWidth - int
offset - int
Returns:
int

render

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

Parameters:
renderer - Renderer
x - int
y - int
alpha - float

getWidth

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

Returns:
int

wasAdded

public void wasAdded()

wasRemoved

public void wasRemoved()


Copyright © 2011 Michael Bayne. All Rights Reserved.