Package org.apache.pivot.wtk.content
Class TableViewCellRenderer
- java.lang.Object
- 
- org.apache.pivot.wtk.Component
- 
- org.apache.pivot.wtk.Label
- 
- org.apache.pivot.wtk.content.TableViewCellRenderer
 
 
 
- 
- All Implemented Interfaces:
- ConstrainedVisual,- Renderer,- TableView.CellRenderer,- Visual
 - Direct Known Subclasses:
- TableViewDateCellRenderer,- TableViewFileSizeCellRenderer,- TableViewNumberCellRenderer
 
 public class TableViewCellRenderer extends Label implements TableView.CellRenderer Default table cell renderer. Renders cell contents as a string, vertically centered.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.LabelLabel.TextBindMapping
 - 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.ComponentComponent.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
- 
 - 
Constructor SummaryConstructors Constructor Description TableViewCellRenderer()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrender(java.lang.Object row, int rowIndex, int columnIndex, TableView tableView, java.lang.String columnName, boolean selected, boolean highlighted, boolean disabled)Prepares the renderer for layout or paint.protected voidrenderStyles(TableView tableView, boolean rowSelected, boolean rowDisabled)voidsetSize(int width, int height)NOTE This method should only be called during layout.java.lang.StringtoString(java.lang.Object row, java.lang.String columnName)Converts table view cell data to a string representation.- 
Methods inherited from class org.apache.pivot.wtk.Labelclear, getLabelBindingListeners, getLabelListeners, getMaximumLength, getText, getTextBindMapping, getTextBindType, getTextKey, load, setMaximumLength, setText, setTextBindMapping, setTextBindType, setTextKey, setTextOrEmpty, store, toString
 - 
Methods inherited from class org.apache.pivot.wtk.ComponentcheckSkin, clearFocus, contains, copyStyle, copyStyle, 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, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, 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, offsetToScreen, paint, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, requestFocus, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setParent, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setVisible, setWidth, setWidthLimits, setWidthLimits, setX, setY, transferFocus, validate
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisualgetBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize
 
- 
 
- 
- 
- 
Method Detail- 
setSizepublic void setSize(int width, int height)Description copied from class:ComponentNOTE This method should only be called during layout. Callers should useComponent.setPreferredSize(int, int).- Specified by:
- setSizein interface- ConstrainedVisual
- Overrides:
- setSizein class- Component
- Parameters:
- width- Final computed width
- height- Final computed height
 
 - 
renderpublic void render(java.lang.Object row, int rowIndex, int columnIndex, TableView tableView, java.lang.String columnName, boolean selected, boolean highlighted, boolean disabled)Description copied from interface:TableView.CellRendererPrepares the renderer for layout or paint.- Specified by:
- renderin interface- TableView.CellRenderer
- Parameters:
- row- The row to render, or- nullif called to calculate preferred height for skins that assume a fixed renderer height.
- rowIndex- The index of the row being rendered, or- -1if- valueis- 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.
 
 - 
renderStylesprotected void renderStyles(TableView tableView, boolean rowSelected, boolean rowDisabled) 
 - 
toStringpublic java.lang.String toString(java.lang.Object row, java.lang.String columnName)Description copied from interface:TableView.CellRendererConverts table view cell data to a string representation.- Specified by:
- toStringin interface- TableView.CellRenderer
- Parameters:
- row- The row object.
- columnName- The name of the column.
- Returns:
- The cell data's string representation, or nullif 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. 
 
 
- 
 
-