Changeset 6733 in josm
- Timestamp:
- 2014-01-19T15:33:15+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6717 r6733 28 28 import org.openstreetmap.josm.tools.Utils; 29 29 import org.openstreetmap.josm.tools.template_engine.TemplateEngineDataProvider; 30 31 30 32 31 /** … … 974 973 } 975 974 } 975 976 976 /** 977 977 * Find primitives that reference this primitive. Returns only primitives that are included in the same … … 988 988 * @return a collection of all primitives that reference this primitive. 989 989 */ 990 991 990 public final List<OsmPrimitive> getReferrers(boolean allowWithoutDataset) { 992 // Method copied from OsmPrimitive in josm-ng993 991 // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example 994 992 // when way is cloned -
trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java
r6529 r6733 19 19 import org.openstreetmap.josm.tools.GBC; 20 20 21 /* 22 * marker.audiosampleminsecs 23 * marker.audiosampleminmetres 24 * marker.buttonlabels 25 * markers.namedtrackpoints 26 * audio.forwardbackamount 27 * audio.leadin 28 * audio.menuinvisible 29 * marker.audiotraceVisible 30 * audio.toolbar ?? 21 /** 22 * Audio preferences. 31 23 */ 32 33 24 public final class AudioPreference extends DefaultTabPreferenceSetting { 34 25 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
r6084 r6733 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Dimension;7 6 import java.awt.event.KeyAdapter; 8 7 import java.awt.event.KeyEvent; … … 10 9 11 10 import javax.swing.JLabel; 12 import javax.swing.text.View;13 11 14 12 import org.openstreetmap.josm.data.imagery.ImageryInfo; … … 18 16 import org.openstreetmap.josm.tools.Utils; 19 17 18 /** 19 * An imagery panel used to add TMS imagery sources 20 */ 20 21 public class AddTMSLayerPanel extends AddImageryPanel { 21 22 … … 80 81 } 81 82 82 public static Dimension getPreferredSize(JLabel label, boolean width, int prefSize) {83 84 View view = (View) label.getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey);85 view.setSize(width ? prefSize : 0, width ? 0 : prefSize);86 87 return new java.awt.Dimension(88 (int) Math.ceil(view.getPreferredSpan(View.X_AXIS)),89 (int) Math.ceil(view.getPreferredSpan(View.Y_AXIS)));90 }91 92 83 protected final String getTmsUrl() { 93 84 return sanitize(tmsUrl.getText()); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r6248 r6733 30 30 import org.openstreetmap.josm.tools.Utils; 31 31 32 /** 33 * An imagery panel used to add WMS imagery sources 34 */ 32 35 public class AddWMSLayerPanel extends AddImageryPanel { 33 36 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r6690 r6733 67 67 import org.openstreetmap.josm.tools.LanguageInfo; 68 68 69 /** 70 * Imagery preferences, including imagery providers, settings and offsets. 71 */ 69 72 public final class ImageryPreference extends DefaultTabPreferenceSetting { 70 73 … … 129 132 } 130 133 134 /** 135 * Returns the imagery providers panel. 136 * @return The imagery providers panel. 137 */ 131 138 public ImageryProvidersPanel getProvidersPanel() { 132 139 return imageryProviders; … … 189 196 } 190 197 198 /** 199 * A panel displaying imagery providers. 200 */ 191 201 public static class ImageryProvidersPanel extends JPanel { 192 202 // Public JTables and JMapViewer 203 /** The table of active providers **/ 193 204 public final JTable activeTable; 205 /** The table of default providers **/ 194 206 public final JTable defaultTable; 207 /** The map displaying imagery bounds of selected default providers **/ 195 208 public final JMapViewer defaultMap; 196 209 197 210 // Public models 211 /** The model of active providers **/ 198 212 public final ImageryLayerTableModel activeModel; 213 /** The model of default providers **/ 199 214 public final ImageryDefaultLayerTableModel defaultModel; 200 215 201 216 // Public JToolbars 217 /** The toolbar on the right of active providers **/ 202 218 public final JToolBar activeToolbar; 219 /** The toolbar on the middle of the panel **/ 203 220 public final JToolBar middleToolbar; 221 /** The toolbar on the right of default providers **/ 204 222 public final JToolBar defaultToolbar; 205 223 … … 240 258 } 241 259 260 /** 261 * Constructs a new {@code ImageryProvidersPanel}. 262 * @param gui The parent preference tab pane 263 * @param layerInfoArg The list of imagery entries to display 264 */ 242 265 public ImageryProvidersPanel(final PreferenceTabbedPane gui, ImageryLayerInfo layerInfoArg) { 243 266 super(new GridBagLayout()); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java
r5889 r6733 20 20 import org.openstreetmap.josm.io.imagery.WMSImagery; 21 21 22 /** 23 * The layer tree of a WMS server. 24 */ 22 25 public class WMSLayerTree { 23 26 private final MutableTreeNode treeRootNode = new DefaultMutableTreeNode(); … … 27 30 private boolean previouslyShownUnsupportedCrsError = false; 28 31 32 /** 33 * Returns the root node. 34 * @return The root node 35 */ 29 36 public MutableTreeNode getTreeRootNode() { 30 37 return treeRootNode; 31 38 } 32 39 40 /** 41 * Returns the {@code JTree}. 42 * @return The {@code JTree} 43 */ 33 44 public JTree getLayerTree() { 34 45 return layerTree; 35 46 } 36 47 48 /** 49 * Returns the list of selected layers. 50 * @return the list of selected layers 51 */ 37 52 public List<WMSImagery.LayerDetails> getSelectedLayers() { 38 53 return selectedLayers; … … 55 70 } 56 71 72 /** 73 * Updates the whole tree with the given WMS imagery info. 74 * @param wms The imagery info for a given WMS server 75 */ 57 76 public void updateTree(WMSImagery wms) { 58 77 treeRootNode.setUserObject(wms.getServiceUrl().getHost()); … … 60 79 } 61 80 81 /** 82 * Updates the list of WMS layers. 83 * @param layers The list of layers to add to the root node 84 */ 62 85 public void updateTreeList(List<WMSImagery.LayerDetails> layers) { 63 86 addLayersToTreeData(getTreeRootNode(), layers); -
trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
r6666 r6733 28 28 import org.openstreetmap.josm.tools.GBC; 29 29 30 /** 31 * Preference settings for data layer autosave. 32 */ 30 33 public class BackupPreference implements SubPreferenceSetting { 31 34 -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r6670 r6733 17 17 import javax.swing.JCheckBox; 18 18 import javax.swing.JPanel; 19 import javax.swing.event.ChangeEvent;20 import javax.swing.event.ChangeListener;21 19 22 20 import org.openstreetmap.josm.Main; … … 26 24 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 27 25 import org.openstreetmap.josm.gui.preferences.SourceEditor; 28 import org.openstreetmap.josm.gui.preferences.SourceType;29 26 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry; 30 27 import org.openstreetmap.josm.gui.preferences.SourceEntry; 31 28 import org.openstreetmap.josm.gui.preferences.SourceProvider; 29 import org.openstreetmap.josm.gui.preferences.SourceType; 32 30 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting; 33 31 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting; … … 36 34 import org.openstreetmap.josm.tools.Utils; 37 35 36 /** 37 * Preference settings for map paint styles. 38 */ 38 39 public class MapPaintPreference implements SubPreferenceSetting { 39 40 private SourceEditor sources; -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java
r6529 r6733 12 12 import org.openstreetmap.josm.tools.GBC; 13 13 14 /** 15 * Map preferences, including map paint styles, tagging presets and autosave sub-preferences. 16 */ 14 17 public final class MapPreference extends DefaultTabPreferenceSetting { 15 18 -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r6670 r6733 22 22 import javax.swing.JPanel; 23 23 import javax.swing.JSeparator; 24 import javax.swing.event.ChangeEvent;25 import javax.swing.event.ChangeListener;26 24 27 25 import org.openstreetmap.josm.Main; … … 47 45 import org.xml.sax.SAXParseException; 48 46 47 /** 48 * Preference settings for tagging presets. 49 */ 49 50 public final class TaggingPresetPreference implements SubPreferenceSetting { 50 51 … … 64 65 65 66 private static final List<SourceProvider> presetSourceProviders = new ArrayList<SourceProvider>(); 67 68 /** 69 * The collection of tagging presets. 70 */ 66 71 public static Collection<TaggingPreset> taggingPresets; 67 72 private SourceEditor sources; -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
r6524 r6733 32 32 import org.openstreetmap.josm.tools.Utils; 33 33 34 public class PluginListPanel extends VerticallyScrollablePanel{ 34 /** 35 * A panel displaying the list of known plugins. 36 */ 37 public class PluginListPanel extends VerticallyScrollablePanel { 35 38 private PluginPreferencesModel model; 36 39 40 /** 41 * Constructs a new {@code PluginListPanel} with a default model. 42 */ 37 43 public PluginListPanel() { 38 44 this(new PluginPreferencesModel()); 39 45 } 40 46 47 /** 48 * Constructs a new {@code PluginListPanel} with a given model. 49 * @param model The plugin model 50 */ 41 51 public PluginListPanel(PluginPreferencesModel model) { 42 52 this.model = model; … … 72 82 } 73 83 84 /** 85 * Displays a message when the plugin list is empty. 86 */ 74 87 public void displayEmptyPluginListInformation() { 75 88 GridBagConstraints gbc = new GridBagConstraints(); … … 181 194 } 182 195 196 /** 197 * Refreshes the list. 198 */ 183 199 public void refreshView() { 184 200 final Rectangle visibleRect = getVisibleRect(); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r6643 r6733 21 21 import org.openstreetmap.josm.plugins.PluginInformation; 22 22 23 public class PluginPreferencesModel extends Observable{ 23 /** 24 * The plugin model behind a {@code PluginListPanel}. 25 */ 26 public class PluginPreferencesModel extends Observable { 24 27 private final List<PluginInformation> availablePlugins = new ArrayList<PluginInformation>(); 25 28 private final List<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>(); … … 37 40 } 38 41 42 /** 43 * Filters the list of displayed plugins. 44 * @param filter The filter used against plugin name, description or version 45 */ 39 46 public void filterDisplayedPlugins(String filter) { 40 47 if (filter == null) { … … 55 62 } 56 63 64 /** 65 * Sets the list of available plugins. 66 * @param available The available plugins 67 */ 57 68 public void setAvailablePlugins(Collection<PluginInformation> available) { 58 69 availablePlugins.clear(); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java
r6070 r6733 13 13 14 14 /** 15 * Construct or.15 * Constructs a new {@code AbstractProjectionChoice}. 16 16 * 17 17 * @param name short name of the projection choice as shown in the GUI … … 26 26 27 27 /** 28 * Construct or (without cacheDir argument).28 * Constructs a new {@code AbstractProjectionChoice}. 29 29 * 30 30 * Only for core projection choices, where chacheDir is the same as 31 31 * the second part of the id. 32 * @param name short name of the projection choice as shown in the GUI 33 * @param id unique identifier for the projection choice 32 34 */ 33 35 public AbstractProjectionChoice(String name, String id) { … … 63 65 return new CustomProjection(getProjectionName(), code, pref, getCacheDir()); 64 66 } 65 66 67 } -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java
r6070 r6733 38 38 /** 39 39 * Get the projection that matches the internal state. 40 * @return the effective projection 40 41 */ 41 42 Projection getProjection(); … … 62 63 /** 63 64 * Return all projection codes supported by this projection choice. 65 * @return all supported projection codes 64 66 */ 65 67 String[] allCodes(); … … 67 69 /** 68 70 * Get Preferences from projection code. 71 * @param code projection code 69 72 * 70 73 * @return null when code is not part of this projection choice. … … 80 83 */ 81 84 String toString(); 82 83 85 } -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java
r5548 r6733 18 18 19 19 /** 20 * Construct or.20 * Constructs a new {@code SingleProjectionChoice}. 21 21 * 22 22 * @param name short name of the projection choice as shown in the GUI … … 30 30 } 31 31 32 /** 33 * Constructs a new {@code SingleProjectionChoice}. 34 * 35 * @param name short name of the projection choice as shown in the GUI 36 * @param id unique identifier for the projection choice, e.g. "core:thisproj" 37 * @param code the unique identifier for the projection, e.g. "EPSG:1234" 38 */ 32 39 public SingleProjectionChoice(String name, String id, String code) { 33 40 super(name, id); … … 55 62 56 63 @Override 57 public String toString() {58 return name;59 }60 61 @Override62 64 public Collection<String> getPreferencesFromCode(String code) { 63 65 if (code.equals(this.code))
Note:
See TracChangeset
for help on using the changeset viewer.