org.eclipse.nebula.widgets.nattable.painter.cell
Class AutomaticRowHeightTextPainter
java.lang.Object
  
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractCellPainter
      
org.eclipse.nebula.widgets.nattable.painter.cell.CellPainterWrapper
          
org.eclipse.nebula.widgets.nattable.painter.cell.BackgroundPainter
              
org.eclipse.nebula.widgets.nattable.painter.cell.AbstractTextPainter
                  
org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter
                      
org.eclipse.nebula.widgets.nattable.painter.cell.AutomaticRowHeightTextPainter
- All Implemented Interfaces: 
 - ICellPainter
 
public class AutomaticRowHeightTextPainter
- extends TextPainter
 
Special TextPainter that will always calculate the row height of the
 cell dependent to the content shown in the cell. It uses word wrapping and
 calculation of the cell height to support showing long texts in a single
 cell. It will grow/shrink the row height on resizing so always the optimal
 height is used for the row the cell resides.
 
 This TextPainter should preferably be used for tables that use
 percentage sizing so the calculated row heights for example will grow/shrink
 correctly when resizing the composite that contains the table.
 
 
 It shouldn't be used for large tables that can be scrolled as the
 growing/shrinking on scrolling can cause some side effects, like jumping
 layouts on scrolling.
 
- Author:
 
  - Dirk Fauth
 
- See Also:
 TextPainter, 
DataLayer.setColumnPercentageSizing(boolean)
 
 
 
| 
Method Summary | 
protected  boolean | 
performRowResize(int contentHeight,
                 org.eclipse.swt.graphics.Rectangle rectangle)
 
          Checks if a row resize needs to be triggered. | 
 
 
| Methods inherited from class org.eclipse.nebula.widgets.nattable.painter.cell.AbstractTextPainter | 
convertDataType, getLengthFromCache, getNumberOfNewLines, getTextToDisplay, isCalculateByTextHeight, isCalculateByTextLength, isTrimText, renderStrikethrough, renderUnderlined, setCalculateByTextHeight, setCalculateByTextLength, setStrikethrough, setTrimText, setUnderline, setupGCFromConfig | 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
AutomaticRowHeightTextPainter
public AutomaticRowHeightTextPainter()
AutomaticRowHeightTextPainter
public AutomaticRowHeightTextPainter(int spacing)
performRowResize
protected boolean performRowResize(int contentHeight,
                                   org.eclipse.swt.graphics.Rectangle rectangle)
- Description copied from class: 
TextPainter 
- Checks if a row resize needs to be triggered.
- Overrides:
 performRowResize in class TextPainter
 
- Parameters:
 contentHeight - The necessary height to show the content completelyrectangle - The available rectangle to render to
- Returns:
 true if a row resize needs to be performed,
         false if not
 
 
Copyright © 2015. All rights reserved.