Package org.apache.pivot.wtk.content
Class TableViewNumberCellRenderer
- java.lang.Object
-
- org.apache.pivot.wtk.Component
-
- org.apache.pivot.wtk.Label
-
- org.apache.pivot.wtk.content.TableViewCellRenderer
-
- org.apache.pivot.wtk.content.TableViewNumberCellRenderer
-
- All Implemented Interfaces:
ConstrainedVisual
,Renderer
,TableView.CellRenderer
,Visual
public class TableViewNumberCellRenderer extends TableViewCellRenderer
Default renderer for table view cells that contain numeric data. Renders cell contents as a formatted number.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Label
Label.TextBindMapping
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
-
-
Field Summary
Fields Modifier and Type Field Description static java.text.NumberFormat
DEFAULT_NUMBER_FORMAT
-
Constructor Summary
Constructors Constructor Description TableViewNumberCellRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.text.NumberFormat
getNumberFormat()
void
setNumberFormat(java.lang.String numberFormat)
void
setNumberFormat(java.text.NumberFormat numberFormat)
java.lang.String
toString(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.content.TableViewCellRenderer
render, renderStyles, setSize
-
Methods inherited from class org.apache.pivot.wtk.Label
clear, getLabelBindingListeners, getLabelListeners, getMaximumLength, getText, getTextBindMapping, getTextBindType, getTextKey, load, setMaximumLength, setText, setTextBindMapping, setTextBindType, setTextKey, setTextOrEmpty, store, toString
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize
-
-
-
-
Method Detail
-
getNumberFormat
public java.text.NumberFormat getNumberFormat()
-
setNumberFormat
public void setNumberFormat(java.text.NumberFormat numberFormat)
-
setNumberFormat
public void setNumberFormat(java.lang.String numberFormat)
-
toString
public java.lang.String toString(java.lang.Object row, java.lang.String columnName)
Description copied from interface:TableView.CellRenderer
Converts table view cell data to a string representation.- Specified by:
toString
in interfaceTableView.CellRenderer
- Overrides:
toString
in classTableViewCellRenderer
- Parameters:
row
- The row object.columnName
- The name of the column.- 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.
-
-