OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 41 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41 Rev 83
Line 11... Line 11...
11
 * When distributing the software, include this License Header Notice in each file.
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.ui.table;
14
 package org.openconcerto.ui.table;
15
 
15
 
-
 
16
import org.openconcerto.ui.component.ComponentWrapper;
-
 
17
 
16
import java.awt.Color;
18
import java.awt.Color;
17
import java.awt.Component;
19
import java.awt.Component;
18
import java.awt.Graphics;
20
import java.awt.Graphics;
19
import java.beans.PropertyChangeEvent;
21
import java.beans.PropertyChangeEvent;
20
import java.beans.PropertyChangeListener;
22
import java.beans.PropertyChangeListener;
Line 86... Line 88...
86
            return computeAlternateColor(c);
88
            return computeAlternateColor(c);
87
    }
89
    }
88
 
90
 
89
    private static final ProxyComp altComp = new ProxyComp();
91
    private static final ProxyComp altComp = new ProxyComp();
90
 
92
 
91
    private static final class ProxyComp extends JComponent {
93
    private static final class ProxyComp extends JComponent implements ComponentWrapper.I {
92
 
94
 
93
        private Component comp;
95
        private Component comp;
94
        private JComponent jComp;
96
        private JComponent jComp;
95
        private Map<Color, Color> oddBGColorMap;
97
        private Map<Color, Color> oddBGColorMap;
96
 
98
 
Line 102... Line 104...
102
            final Map<Color, Color> jCompMap = this.jComp == null ? null : getBGColorMap(this.jComp);
104
            final Map<Color, Color> jCompMap = this.jComp == null ? null : getBGColorMap(this.jComp);
103
            this.oddBGColorMap = jCompMap == null ? DEFAULT_MAP : jCompMap;
105
            this.oddBGColorMap = jCompMap == null ? DEFAULT_MAP : jCompMap;
104
            return this;
106
            return this;
105
        }
107
        }
106
 
108
 
-
 
109
        @Override
-
 
110
        public Component getComponent() {
-
 
111
            return this.comp;
-
 
112
        }
-
 
113
 
107
        private Color getAlternateColor(final Color c) {
114
        private Color getAlternateColor(final Color c) {
108
            return AlternateTableCellRenderer.getAlternateColor(c, this.oddBGColorMap);
115
            return AlternateTableCellRenderer.getAlternateColor(c, this.oddBGColorMap);
109
        }
116
        }
110
 
117
 
111
        @Override
118
        @Override