Changeset 14102 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-08-07T19:50:47+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
r14101 r14102 51 51 52 52 /** 53 * Construct a new note container with a given list ofnotes53 * Construct a new note container without notes 54 54 * @since 14101 55 55 */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r13150 r14102 277 277 @Override 278 278 public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { 279 FilterTableModel model = (FilterTableModel) table.getModel();280 279 Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); 281 cell.setEnabled(model.isCellEnabled(row, column)); 280 TableModel model = table.getModel(); 281 if (model instanceof FilterTableModel) { 282 cell.setEnabled(((FilterTableModel) model).isCellEnabled(row, column)); 283 } 282 284 return cell; 283 285 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r14097 r14102 813 813 if (c instanceof JLabel) { 814 814 JLabel label = (JLabel) c; 815 label.setText(((MemberInfo) table.getValueAt(row, 1)).getPositionString()); 815 MemberInfo member = (MemberInfo) table.getValueAt(row, 1); 816 if (member != null) { 817 label.setText(member.getPositionString()); 818 } 816 819 if (isDisabledAndHidden) { 817 820 label.setFont(label.getFont().deriveFont(Font.ITALIC)); -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r14101 r14102 19 19 import java.util.Collections; 20 20 import java.util.List; 21 import java.util.Objects; 21 22 import java.util.regex.Matcher; 22 23 import java.util.regex.Pattern; … … 97 98 */ 98 99 public NoteLayer(Collection<Note> notes, String name) { 99 super(name); 100 noteData = new NoteData(notes); 101 noteData.addNoteDataUpdateListener(this); 100 this(new NoteData(notes), name); 102 101 } 103 102 … … 110 109 public NoteLayer(NoteData noteData, String name) { 111 110 super(name); 112 this.noteData = noteData;111 this.noteData = Objects.requireNonNull(noteData); 113 112 this.noteData.addNoteDataUpdateListener(this); 114 113 }
Note:
See TracChangeset
for help on using the changeset viewer.