|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface aggregating table, tree, and list cell renderers.
Method Summary | |
void |
reset()
Clear any stale data from previous use by other components, clearing the icon, text, disabled state and other customizations, returning the component to its initialized state. |
void |
setCentered(boolean centered)
Indicate that the text should be painted centered below the icon. |
void |
setHtml(boolean val)
Explicitly tell the renderer it is going to receive HTML markup, or it is not. |
void |
setIcon(Icon icon)
Set the icon to be used for painting |
void |
setIconTextGap(int gap)
Convenience method to set the gap between the icon and text. |
void |
setIndent(int pixels)
Set a number of pixels the icon and text should be indented. |
void |
setParentFocused(boolean parentFocused)
Indicate that the component being rendered has keyboard focus. |
void |
setRenderStyle(int style)
Set the rendering style - this can be JLabel-style truncated-with-elipsis (...) text, or clipped text. |
void |
setText(String txt)
Set the text to be displayed. |
Methods inherited from interface javax.swing.table.TableCellRenderer |
getTableCellRendererComponent |
Methods inherited from interface javax.swing.tree.TreeCellRenderer |
getTreeCellRendererComponent |
Methods inherited from interface javax.swing.ListCellRenderer |
getListCellRendererComponent |
Method Detail |
public void setParentFocused(boolean parentFocused)
parentFocused
- Whether or not the focused selection color should be usedpublic void setCentered(boolean centered)
centered
- Whether or not centered painting should be used.public void setIndent(int pixels)
setCentered(true)
has been called.
pixels
- The number of pixels to indentpublic void setHtml(boolean val)
val
- public void setRenderStyle(int style)
HtmlRenderer.STYLE_CLIP
.
style
- The text stylepublic void setIcon(Icon icon)
icon
- An icon or nullpublic void reset()
HtmlRenderer.createLabel()
is called.
Users of the static HtmlRenderer.createLabel()
method may want to call this method if they
use the returned instance more than once without again calling HtmlRenderer.createLabel()
.
public void setText(String txt)
setHtml(boolean)
if the text is known to either be or not be HTML markup.
txt
- The text that should be displayedpublic void setIconTextGap(int gap)
gap
- an integer number of pixels
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |