org.apache.pivot.wtk.content
Class TableViewTextAreaCellRenderer

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.TextArea
          extended by org.apache.pivot.wtk.content.TableViewTextAreaCellRenderer
All Implemented Interfaces:
ConstrainedVisual, Renderer, TableView.CellRenderer, Visual

public class TableViewTextAreaCellRenderer
extends TextArea
implements TableView.CellRenderer

Renders cell contents as a string using TextArea. Only really useful when the TableView is using the variableRowHeight style.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.TextArea
TextArea.Skin
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Constructor Summary
TableViewTextAreaCellRenderer()
           
 
Method Summary
 void render(Object value, int rowIndex, int columnIndex, TableView tableView, String columnName, boolean rowSelected, boolean rowHighlighted, boolean rowDisabled)
          Prepares the renderer for layout or paint.
protected  void renderStyles(TableView tableView, boolean rowSelected, boolean rowDisabled)
           
 void setSize(int width, int height)
          NOTE This method should only be called during layout.
 
Methods inherited from class org.apache.pivot.wtk.TextArea
clear, clearSelection, copy, cut, delete, getCharacterBounds, getDocument, getInsertionPoint, getNextInsertionPoint, getRowCount, getRowIndex, getSelectedText, getSelection, getSelectionLength, getSelectionStart, getText, getTextAreaCharacterListeners, getTextAreaListeners, getTextAreaSelectionListeners, getTextKey, insertImage, insertParagraph, insertText, insertText, isEditable, load, paste, redo, selectAll, setDocument, setEditable, setSelection, setSelection, setSkin, setText, setText, setTextKey, store, undo
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installThemeSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, load, mapPointFromAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, paint, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setAutomationID, setCursor, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setParent, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setStyles, setStyles, setStyles, setTooltipText, setVisible, setWidth, setX, setY, store, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.pivot.wtk.Renderer
getStyles
 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth
 
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getWidth, paint
 

Constructor Detail

TableViewTextAreaCellRenderer

public TableViewTextAreaCellRenderer()
Method Detail

setSize

public void setSize(int width,
                    int height)
Description copied from class: Component
NOTE This method should only be called during layout. Callers should use Component.setPreferredSize(int, int).

Specified by:
setSize in interface ConstrainedVisual
Overrides:
setSize in class Component

render

public void render(Object value,
                   int rowIndex,
                   int columnIndex,
                   TableView tableView,
                   String columnName,
                   boolean rowSelected,
                   boolean rowHighlighted,
                   boolean rowDisabled)
Description copied from interface: TableView.CellRenderer
Prepares the renderer for layout or paint.

Specified by:
render in interface TableView.CellRenderer
Parameters:
value - The cell value to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
rowIndex - The index of the row being rendered, or -1 if value is null.
columnIndex - The index of the column being rendered.
tableView - The table view that contains the cell.
columnName - The name of the column being rendered.
rowSelected - If true, the row is selected.
rowHighlighted - If true, the row is highlighted.
rowDisabled - If true, the row is disabled.

renderStyles

protected void renderStyles(TableView tableView,
                            boolean rowSelected,
                            boolean rowDisabled)