org.apache.pivot.wtk.content
Class TableViewImageCellRenderer
java.lang.Object
org.apache.pivot.wtk.Component
org.apache.pivot.wtk.ImageView
org.apache.pivot.wtk.content.TableViewImageCellRenderer
- All Implemented Interfaces:
- ConstrainedVisual, Renderer, TableView.CellRenderer, Visual
public class TableViewImageCellRenderer
- extends ImageView
- implements TableView.CellRenderer
Default renderer for table view cells that contain image data.
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. |
void |
setPreferredHeight(int preferredHeight)
Sets the component's preferred height. |
void |
setPreferredSize(int preferredWidth,
int preferredHeight)
Sets the component's preferred size. |
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.ImageView |
getImage, getImageKey, getImageViewListeners, isAsynchronous, load, setAsynchronous, setImage, setImage, setImage, setImageKey, store |
Methods inherited from class org.apache.pivot.wtk.Component |
clear, clearFocus, getAncestor, getAttribute, 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, 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, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setParent, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setVisible, setWidth, setX, setY, toString, transferFocus, validate |
DEFAULT_HEIGHT
public static int DEFAULT_HEIGHT
TableViewImageCellRenderer
public TableViewImageCellRenderer()
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
setPreferredHeight
public void setPreferredHeight(int preferredHeight)
- Description copied from class:
Component
- Sets the component's preferred height.
- Overrides:
setPreferredHeight
in class Component
- Parameters:
preferredHeight
- The preferred height value, or -1 to use the default
value determined by the skin.
setPreferredSize
public void setPreferredSize(int preferredWidth,
int preferredHeight)
- Description copied from class:
Component
- Sets the component's preferred size.
- Overrides:
setPreferredSize
in class Component
- Parameters:
preferredWidth
- The preferred width value, or -1 to use the default
value determined by the skin.preferredHeight
- The preferred height value, or -1 to use the default
value determined by the skin.
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.
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.