Skip to content

Commit

Permalink
comment in BasicXListUI.installDefaults()
Browse files Browse the repository at this point in the history
  • Loading branch information
homebeaver committed Dec 21, 2024
1 parent fb4976b commit 033f019
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import javax.swing.plaf.UIResource;

import org.jdesktop.swingx.JXList;
import org.jdesktop.swingx.JXList.DelegatingRenderer;
import org.jdesktop.swingx.plaf.LookAndFeelUtils;
import org.jdesktop.swingx.plaf.basic.BasicYListUI;
import org.jdesktop.swingx.plaf.basic.core.DragRecognitionSupport.BeforeDrag;
Expand Down Expand Up @@ -459,7 +460,16 @@ protected void installDefaults() {

LookAndFeel.installProperty(list, "opaque", Boolean.TRUE);

if (list.getCellRenderer() == null) {
if (list.getCellRenderer() == null) {
/* public ListCellRenderer<? super E> getCellRenderer()
* wird überschieben durch
* public ListCellRenderer<E> JXList.getCellRenderer()
* das wiederum ruft
* private DelegatingRenderer getDelegatingRenderer() {
* ... new DelegatingRenderer()
* in getDelegatingRenderer wird indirekt JRendererLabel instanziert
*/
// TODO dh list.getCellRenderer() ist nie null!!!!!!!!
@SuppressWarnings("unchecked")
ListCellRenderer<Object> tmp = (ListCellRenderer<Object>)(UIManager.get("List.cellRenderer"));
list.setCellRenderer(tmp);
Expand Down

0 comments on commit 033f019

Please sign in to comment.