|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.content.TableViewMultiCellRenderer
public class TableViewMultiCellRenderer
Table cell renderer that supports dynamic rendering based on the type of content being rendered.
Nested Class Summary | |
---|---|
static class |
TableViewMultiCellRenderer.RendererMapping
Maps the type of value being rendered (the value class) to a specific cell renderer. |
Constructor Summary | |
---|---|
TableViewMultiCellRenderer()
|
Method Summary | |
---|---|
int |
getBaseline()
Returns the visual's baseline. |
int |
getBaseline(int widthArgument,
int heightArgument)
Returns the baseline for a given width and height. |
TableView.CellRenderer |
getDefaultRenderer()
|
int |
getHeight()
Returns the visual's height. |
int |
getPreferredHeight(int widthArgument)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int heightArgument)
Returns the visual's preferred width given the provided height constraint. |
Sequence<TableViewMultiCellRenderer.RendererMapping> |
getRendererMappings()
|
Dictionary<String,Object> |
getStyles()
Returns the renderer's style dictionary. |
int |
getWidth()
Returns the visual's width. |
void |
paint(Graphics2D graphics)
Paints the visual. |
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 |
setDefaultRenderer(TableView.CellRenderer defaultRenderer)
|
void |
setSize(int width,
int height)
Sets the visual's render size. |
String |
toString(Object row,
String columnName)
Converts table view cell data to a string representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableViewMultiCellRenderer()
Method Detail |
---|
public int getWidth()
Visual
getWidth
in interface Visual
public int getHeight()
Visual
getHeight
in interface Visual
public int getBaseline()
Visual
getBaseline
in interface Visual
public void paint(Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public void setSize(int width, int height)
ConstrainedVisual
setSize
in interface ConstrainedVisual
public int getPreferredWidth(int heightArgument)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
heightArgument
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int widthArgument)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
widthArgument
- The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
public int getBaseline(int widthArgument, int heightArgument)
ConstrainedVisual
getBaseline
in interface ConstrainedVisual
public Dictionary<String,Object> getStyles()
Renderer
getStyles
in interface Renderer
public void render(Object row, int rowIndex, int columnIndex, TableView tableView, String columnName, boolean selected, boolean highlighted, boolean disabled)
TableView.CellRenderer
render
in interface TableView.CellRenderer
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.public String toString(Object row, String columnName)
TableView.CellRenderer
toString
in interface TableView.CellRenderer
Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.
public TableView.CellRenderer getDefaultRenderer()
public void setDefaultRenderer(TableView.CellRenderer defaultRenderer)
public Sequence<TableViewMultiCellRenderer.RendererMapping> getRendererMappings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |