Last change
on this file since 17333 was 17333, checked in by Don-vip, 3 years ago |
see #20129 - Fix typos and misspellings in the code (patch by gaben)
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.dialogs.changeset;
|
---|
3 |
|
---|
4 | import java.awt.Component;
|
---|
5 | import java.util.Date;
|
---|
6 |
|
---|
7 | import javax.swing.JComponent;
|
---|
8 | import javax.swing.JTable;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.data.osm.User;
|
---|
11 | import org.openstreetmap.josm.gui.widgets.JosmTextArea;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * The cell renderer for the changeset discussion table
|
---|
15 | * @since 7715
|
---|
16 | */
|
---|
17 | public class ChangesetDiscussionTableCellRenderer extends AbstractCellRenderer {
|
---|
18 |
|
---|
19 | @Override
|
---|
20 | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
|
---|
21 | int row, int column) {
|
---|
22 | if (value == null)
|
---|
23 | return this;
|
---|
24 | JComponent comp = this;
|
---|
25 | reset(comp, true);
|
---|
26 | renderColors(comp, isSelected);
|
---|
27 | switch(column) {
|
---|
28 | case 0:
|
---|
29 | renderDate((Date) value);
|
---|
30 | break;
|
---|
31 | case 1:
|
---|
32 | renderUser((User) value);
|
---|
33 | break;
|
---|
34 | case 2:
|
---|
35 | comp = new JosmTextArea((String) value);
|
---|
36 | ((JosmTextArea) comp).setLineWrap(true);
|
---|
37 | ((JosmTextArea) comp).setWrapStyleWord(true);
|
---|
38 | reset(comp, false);
|
---|
39 | renderColors(comp, isSelected);
|
---|
40 | break;
|
---|
41 | default: // Do nothing
|
---|
42 | }
|
---|
43 | return comp;
|
---|
44 | }
|
---|
45 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.