|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.JXList.DelegatingRenderer
public class JXList.DelegatingRenderer
A decorator for the original ListCellRenderer. Needed to hook highlighters after messaging the delegate.
PENDING JW: formally implement UIDependent?
Constructor Summary | |
---|---|
JXList.DelegatingRenderer()
Instantiates a DelegatingRenderer with list's default renderer as delegate. |
|
JXList.DelegatingRenderer(ListCellRenderer delegate)
Instantiates a DelegatingRenderer with the given delegate. |
Method Summary | |
---|---|
void |
doClick()
Same as AbstractButton.doClick(). |
ListCellRenderer |
getDelegateRenderer()
Returns the delegate. |
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
Return a component that has been configured to display the specified value. |
boolean |
isEnabled()
|
void |
setDelegateRenderer(ListCellRenderer delegate)
Sets the delegate. |
void |
updateUI()
Updates the ui of the delegate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JXList.DelegatingRenderer()
public JXList.DelegatingRenderer(ListCellRenderer delegate)
delegate
- the delegate to use, if null the list's default is
created and used.Method Detail |
---|
public void setDelegateRenderer(ListCellRenderer delegate)
delegate
- the delegate to use, if null the list's default is
created and used.public ListCellRenderer getDelegateRenderer()
public void updateUI()
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. Overridden to apply the highlighters, if any, after calling the delegate. The decorators are not applied if the row is invalid.
getListCellRendererComponent
in interface ListCellRenderer
list
- 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
public boolean isEnabled()
isEnabled
in interface RolloverRenderer
public void doClick()
doClick
in interface RolloverRenderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |