org.crsh.text.ui
Class TextElement

java.lang.Object
  extended by org.crsh.text.ui.Element
      extended by org.crsh.text.ui.TextElement

public class TextElement
extends Element


Field Summary
(package private)  int minWidth
          .
(package private)  Iterable<Chunk> stream
          .
(package private)  int width
          .
 
Constructor Summary
TextElement(Iterable<Chunk> stream)
           
TextElement(Iterable<Chunk> stream, int minWidth)
           
 
Method Summary
 Renderer renderer()
           
 TextElement style(Style.Composite style)
           
 String toString()
           
private static int width(int width, Iterator<Chunk> stream, Text current, Integer from)
           
 
Methods inherited from class org.crsh.text.ui.Element
getStyle, header, label, render, row, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stream

final Iterable<Chunk> stream
.


minWidth

final int minWidth
.


width

final int width
.

Constructor Detail

TextElement

public TextElement(Iterable<Chunk> stream,
                   int minWidth)

TextElement

public TextElement(Iterable<Chunk> stream)
Method Detail

width

private static int width(int width,
                         Iterator<Chunk> stream,
                         Text current,
                         Integer from)

renderer

public Renderer renderer()
Specified by:
renderer in class Element

toString

public String toString()
Overrides:
toString in class Object

style

public TextElement style(Style.Composite style)
Overrides:
style in class Element


Copyright © 2014 eXo Platform SAS. All Rights Reserved.