|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.swing.controls.AbstractCellRenderer
public abstract class AbstractCellRenderer
Base for classes that want to implement a cell renderer that can be used interchangably for lists, tables and trees: classes implement one method (getRendererComponent ()) to provide a renderer for all 3 interfaces. Provides support for setting colours, borders etc based on behaviour of default renderers.
Constructor Summary | |
---|---|
AbstractCellRenderer()
|
Method Summary | |
---|---|
Color |
getBackground()
The current background colour that should be used. |
Border |
getBorder()
The current border that should be used. |
Color |
getForeground()
The current foreground colour that should be used. |
JLabel |
getLabel()
Get a label guaranteed to have correct colours and borders set. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean hasFocus)
|
abstract JComponent |
getRendererComponent(JComponent client,
Object value,
int row,
int column,
boolean isSelected,
boolean hasFocus,
boolean expanded,
boolean leaf)
Return the renderer component. |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
Component |
getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCellRenderer()
Method Detail |
---|
public Color getBackground()
public Color getForeground()
public Border getBorder()
public JLabel getLabel()
public abstract JComponent getRendererComponent(JComponent client, Object value, int row, int column, boolean isSelected, boolean hasFocus, boolean expanded, boolean leaf)
getRendererComponent
in interface CellRenderer
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
getTreeCellRendererComponent
in interface TreeCellRenderer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface TableCellRenderer
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean hasFocus)
getListCellRendererComponent
in interface ListCellRenderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |