org.crsh.text.ui
Class TableRenderer

java.lang.Object
  extended by org.crsh.text.Renderer
      extended by org.crsh.text.ui.TableRenderer

 class TableRenderer
extends Renderer


Field Summary
(package private)  BorderStyle border
          .
(package private)  Layout columnLayout
          .
private  TableRowRenderer head
          .
(package private)  int leftCellPadding
          Cell padding left.
(package private)  Overflow overflow
          .
(package private)  int rightCellPadding
          Cell padding right.
(package private)  Layout rowLayout
          .
(package private)  BorderStyle separator
          .
(package private)  Style.Composite style
          .
private  TableRowRenderer tail
          .
 
Fields inherited from class org.crsh.text.Renderer
NULL
 
Constructor Summary
TableRenderer(TableElement table)
           
 
Method Summary
 int getActualHeight(int width)
          Return the actual height for the specified with.
 int getActualWidth()
          Returns the element actual width.
private  int getMaxColSize()
           
 int getMinHeight(int width)
          Return the minimum height for the specified with.
 int getMinWidth()
          Returns the element minimum width.
 LineReader reader(int width)
          Create a renderer for the specified width or return null if the element does not provide any output.
 LineReader reader(int width, int height)
          Create a renderer for the specified width and height or return null if the element does not provide any output for the specified dimensions.
 
Methods inherited from class org.crsh.text.Renderer
render, vertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnLayout

final Layout columnLayout
.


rowLayout

final Layout rowLayout
.


border

final BorderStyle border
.


separator

final BorderStyle separator
.


overflow

final Overflow overflow
.


style

final Style.Composite style
.


leftCellPadding

final int leftCellPadding
Cell padding left.


rightCellPadding

final int rightCellPadding
Cell padding right.


head

private TableRowRenderer head
.


tail

private TableRowRenderer tail
.

Constructor Detail

TableRenderer

TableRenderer(TableElement table)
Method Detail

getMaxColSize

private int getMaxColSize()

getMinWidth

public int getMinWidth()
Description copied from class: Renderer
Returns the element minimum width.

Specified by:
getMinWidth in class Renderer
Returns:
the minimum width

getActualWidth

public int getActualWidth()
Description copied from class: Renderer
Returns the element actual width.

Specified by:
getActualWidth in class Renderer
Returns:
the actual width

getActualHeight

public int getActualHeight(int width)
Description copied from class: Renderer
Return the actual height for the specified with.

Specified by:
getActualHeight in class Renderer
Parameters:
width - the width
Returns:
the minimum height

getMinHeight

public int getMinHeight(int width)
Description copied from class: Renderer
Return the minimum height for the specified with.

Specified by:
getMinHeight in class Renderer
Parameters:
width - the width
Returns:
the actual height

reader

public LineReader reader(int width)
Description copied from class: Renderer
Create a renderer for the specified width or return null if the element does not provide any output.

Specified by:
reader in class Renderer
Parameters:
width - the width
Returns:
the renderer

reader

public LineReader reader(int width,
                         int height)
Description copied from class: Renderer
Create a renderer for the specified width and height or return null if the element does not provide any output for the specified dimensions. The default implementation delegates to the Renderer.reader(int) method when the height argument is not positive otherwise it returns null. Subclasses should override this method when they want to provide content that can adapts to the specified height.

Overrides:
reader in class Renderer
Parameters:
width - the width
height - the height
Returns:
the renderer


Copyright © 2014 eXo Platform SAS. All Rights Reserved.