- Timestamp:
- 2009-09-09T00:46:01+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r2082 r2083 75 75 76 76 /** 77 * Registers an upload hook. Adds the hook to the end of the list ofupload hooks.77 * Registers an upload hook. Adds the hook at the first position of the upload hooks. 78 78 * 79 79 * @param hook the upload hook. Ignored if null. … … 82 82 if(hook == null) return; 83 83 if (!uploadHooks.contains(hook)) { 84 uploadHooks.add( hook);84 uploadHooks.add(0,hook); 85 85 } 86 86 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2070 r2083 97 97 * the respective class. 98 98 * 99 * @deprecated use {@see #getId()} and {@see #setId()}. Don't assign an id, create a primitive with 100 * the respective constructors. 101 */ 102 @Deprecated 103 public long id = 0; 99 */ 100 private long id = 0; 104 101 105 102 /** … … 109 106 * the modified is ignored and the object is added to the server. 110 107 * 111 * @deprecated Please use {@see #setModified()} and {@see #getModified()} 112 */ 113 @Deprecated 114 public boolean modified = false; 108 */ 109 private boolean modified = false; 115 110 116 111 /** 117 112 * <code>true</code>, if the object has been deleted. 118 113 * 119 * @deprecated use {@see #delete()} and {@see #isDeleted()} 120 */ 121 @Deprecated 122 public boolean deleted = false; 114 */ 115 private boolean deleted = false; 123 116 124 117 /** … … 127 120 * (they will have visible=false). 128 121 * 129 * @deprecated use {@see #isVisible()} and {@see #setVisible(boolean)} 130 */ 131 @Deprecated 132 public boolean visible = true; 122 */ 123 private boolean visible = true; 133 124 134 125 /** … … 141 132 * If set to true, this object is currently selected. 142 133 * 143 * @deprecated use {@see #isSelected()} and {@see #setSelected(boolean)} 144 */ 145 @Deprecated 146 public volatile boolean selected = false; 134 */ 135 private volatile boolean selected = false; 147 136 148 137 /** … … 155 144 * Contains the version number as returned by the API. Needed to 156 145 * ensure update consistency 157 * @deprecated use {@see #getVersion()} and {@see #setVersion(long)} 158 */ 159 @Deprecated 160 public int version = 0; 161 146 */ 147 private int version = 0; 162 148 163 149 /** -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r2077 r2083 20 20 * makeBackReferences and/or removeBackReferences should be called. 21 21 * 22 * @deprecated use the improved API instead of accessing this list directly 23 */ 24 @Deprecated 25 public final List<RelationMember> members = new ArrayList<RelationMember>(); 22 */ 23 private final List<RelationMember> members = new ArrayList<RelationMember>(); 26 24 27 25 /** -
trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java
r2070 r2083 11 11 /** 12 12 * 13 * @deprecated use {@see #getRole()} or create a clone in order to assign a new role14 13 */ 15 @Deprecated 16 public String role; 14 private String role; 17 15 18 16 /** 19 17 * 20 * @deprecated use {@see #getMember()} or create a clone in order to assign a new member21 18 */ 22 @Deprecated 23 public OsmPrimitive member; 19 private OsmPrimitive member; 24 20 25 21 /** … … 106 102 } 107 103 108 109 /**110 * Default constructor. Does nothing.111 * @deprecated Use other constructors because RelationMember class will become immutable112 * in the future113 */114 @Deprecated115 public RelationMember() { }116 117 104 public RelationMember(String role, OsmPrimitive member) { 118 105 this.role = role; -
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r2037 r2083 88 88 89 89 /** 90 * Sets up the dialog. The first button is always the default.91 * @param parent The parent element that will be used for position and maximum size92 * @param title The text that will be shown in the window titlebar93 * @param content Any component that should be show above the buttons (e.g. JLabel)94 * @param buttonTexts The labels that will be displayed on the buttons95 * @param buttonIcons The path to the icons that will be displayed on the buttons. Path is relative to JOSM's image directory. File extensions need to be included. If a button should not have an icon pass null.96 */97 @Deprecated public ExtendedDialog(Component parent, String title, Component content,98 String[] buttonTexts, String[] buttonIcons) {99 super(JOptionPane.getFrameForComponent(parent), title, true /* modal */);100 this.parent = parent;101 bTexts = buttonTexts;102 this.content = content;103 this.bIcons = buttonIcons;104 setupDialog();105 setVisible(true);106 }107 108 @Deprecated public ExtendedDialog(Component parent, String title, Component content,109 String[] buttonTexts) {110 this(parent, title, content, buttonTexts, null);111 }112 113 /**114 * Sets up the dialog and displays the given message in a breakable label115 */116 @Deprecated public ExtendedDialog(Component parent, String title, String message,117 String[] buttonTexts, String[] buttonIcons) {118 this(parent, title, string2label(message), buttonTexts, buttonIcons);119 }120 121 @Deprecated public ExtendedDialog(Component parent, String title, String message,122 String[] buttonTexts) {123 this(parent, title, message, buttonTexts, null);124 }125 126 /**127 90 * Allows decorating the buttons with icons. Expects an String[] with paths 128 91 * to images relative to JOSM/images. -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
r2070 r2083 42 42 public boolean isCellEditable(int row, int column) { 43 43 switch(column) { 44 45 44 case 1: return true; 45 default: return false; 46 46 } 47 47 } … … 52 52 protected void setValueAt(DefaultTableModel model, Object value, int row, int col) { 53 53 if (model == getMergedTableModel() && col == 1) { 54 RelationMember member = getMergedEntries().get(row); 55 member.role = (String)value; 54 RelationMember memberOld = getMergedEntries().get(row); 55 RelationMember memberNew = new RelationMember((String)value,memberOld.getMember()); 56 getMergedEntries().remove(row); 57 getMergedEntries().add(row,memberNew); 56 58 fireModelDataChanged(); 57 59 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r2077 r2083 106 106 public void setValueAt(Object value, int rowIndex, int columnIndex) { 107 107 RelationMember member = members.get(rowIndex); 108 member.role = value.toString(); 108 RelationMember newMember = new RelationMember(value.toString(), member.getMember()); 109 members.remove(rowIndex); 110 members.add(rowIndex, newMember); 109 111 } 110 112 … … 198 200 199 201 public void updateMemberReferences(DataSet ds) { 200 for (RelationMember member : members) { 202 for (int i=0; i< members.size();i++) { 203 RelationMember member = members.get(i); 201 204 if (member.getMember().getId() == 0) { 202 205 continue; … … 204 207 OsmPrimitive primitive = ds.getPrimitiveById(member.getMember().getId(), OsmPrimitiveType.from(member.getMember())); 205 208 if (primitive != null) { 206 member.member = primitive; 209 RelationMember newMember = new RelationMember(member.getRole(), primitive); 210 members.remove(i); 211 members.add(i, newMember); 207 212 } 208 213 } … … 351 356 return; 352 357 for (int row : idx) { 353 members.get(row).role = role; 358 RelationMember oldMember = members.get(row); 359 RelationMember newMember = new RelationMember(role, oldMember.getMember()); 360 members.remove(row); 361 members.add(row, newMember); 354 362 } 355 363 fireTableDataChanged();
Note:
See TracChangeset
for help on using the changeset viewer.