org.crsh.text
Class LineRenderer.Composite

java.lang.Object
  extended by org.crsh.text.LineRenderer
      extended by org.crsh.text.LineRenderer.Composite
Enclosing class:
LineRenderer

private static class LineRenderer.Composite
extends LineRenderer


Field Summary
private  int actualWidth
          .
private  int minWidth
          .
private  Iterable<? extends LineRenderer> renderers
          .
 
Fields inherited from class org.crsh.text.LineRenderer
NULL
 
Constructor Summary
private LineRenderer.Composite(Iterable<? extends LineRenderer> renderers)
           
 
Method Summary
 int getActualHeight(int width)
          Return the actual height for the specified with.
 int getActualWidth()
          Returns the element actual width.
 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.LineRenderer
render, vertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderers

private final Iterable<? extends LineRenderer> renderers
.


actualWidth

private final int actualWidth
.


minWidth

private final int minWidth
.

Constructor Detail

LineRenderer.Composite

private LineRenderer.Composite(Iterable<? extends LineRenderer> renderers)
Method Detail

getActualWidth

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

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

getMinWidth

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

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

getActualHeight

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

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

getMinHeight

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

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

reader

public LineReader reader(int width,
                         int height)
Description copied from class: LineRenderer
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 LineRenderer.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 LineRenderer
Parameters:
width - the width
height - the height
Returns:
the renderer

reader

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

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


Copyright © 2015 eXo Platform SAS. All Rights Reserved.