|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.table.DefaultListRowHeaderRenderer
public class DefaultListRowHeaderRenderer
DefaultListRowHeaderRenderer is the default renderer of a ListRowHeader.
It makes use of a JButton or a JLabel to render its the list cells.
| Field Summary | |
|---|---|
protected JComponent |
component
the component drawn and returned with the getListCellRendererComponent method. |
| Constructor Summary | |
|---|---|
DefaultListRowHeaderRenderer()
Creates a DefaultListRowHeaderRenderer that uses a JButton. |
|
DefaultListRowHeaderRenderer(JButton button)
Creates a DefaultListRowHeaderRenderer that uses a JButton. |
|
DefaultListRowHeaderRenderer(JLabel label)
Creates a DefaultListRowHeaderRenderer that uses a JLabel. |
|
| Method Summary | |
|---|---|
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
Return a component that has been configured to display the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JComponent component
getListCellRendererComponent method.
| Constructor Detail |
|---|
public DefaultListRowHeaderRenderer()
public DefaultListRowHeaderRenderer(JButton button)
public DefaultListRowHeaderRenderer(JLabel label)
| Method Detail |
|---|
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
paint method is then called to
"render" the cell. If it is necessary to compute the dimensions
of a list because the list cells do not have a fixed size, this method
is called to generate a component on which getPreferredSize
can be invoked.
getListCellRendererComponent in interface ListCellRendererlist - The JList we're painting.value - The value returned by list.getModel().getElementAt(index).index - The cells index.isSelected - True if the specified cell was selected.cellHasFocus - True if the specified cell has the focus.
JList,
ListSelectionModel,
ListModel
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||