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 a text area (which supports line feeds, which the default label-based table view cell renderer does not).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.TextArea
TextArea.Paragraph, TextArea.ParagraphListener, TextArea.ParagraphSequence, TextArea.ScrollDirection, TextArea.Skin, TextArea.TextBindMapping
 
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 row, int rowIndex, int columnIndex, TableView tableView, String columnName, boolean selected, boolean highlighted, boolean disabled)
          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.
 String toString(Object row, String columnName)
          Converts table view cell data to a string representation.
 
Methods inherited from class org.apache.pivot.wtk.TextArea
clear, clearSelection, copy, cut, getCharacterAt, getCharacterBounds, getCharacterCount, getExpandTabs, getInsertionPoint, getMaximumLength, getNextInsertionPoint, getParagraphAt, getParagraphs, getRowAt, getRowCount, getRowLength, getRowOffset, getSelectedText, getSelection, getSelectionLength, getSelectionStart, getText, getText, getTextAreaBindingListeners, getTextAreaContentListeners, getTextAreaListeners, getTextAreaSelectionListeners, getTextBindMapping, getTextBindType, getTextKey, insertText, isEditable, load, paste, removeText, selectAll, setEditable, setExpandTabs, setMaximumLength, setSelection, setSelection, setSkin, setText, setText, setText, setTextBindMapping, setTextBindType, setTextKey, store, undo
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, contains, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getSize, getSkin, getStyles, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, layout, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, paint, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setParent, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setVisible, setWidth, setWidthLimits, setWidthLimits, setX, setY, 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 row,
                   int rowIndex,
                   int columnIndex,
                   TableView tableView,
                   String columnName,
                   boolean selected,
                   boolean highlighted,
                   boolean disabled)
Description copied from interface: TableView.CellRenderer
Prepares the renderer for layout or paint.

Specified by:
render in interface TableView.CellRenderer
Parameters:
row - The row 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 host component.
columnName - The name of the column being rendered.
selected - If true, the row is selected.
highlighted - If true, the row is highlighted.
disabled - If true, the row is disabled.

renderStyles

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

toString

public String toString(Object row,
                       String columnName)
Description copied from interface: TableView.CellRenderer
Converts table view cell data to a string representation.

Specified by:
toString in interface TableView.CellRenderer
Returns:
The cell data's string representation, or null if the data does not have a string representation.

Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.