Changeset 999 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2008-09-21T14:03:38+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r800 r999 19 19 20 20 import org.openstreetmap.josm.Main; 21 import org.openstreetmap.josm.tools.ImageProvider;22 21 import org.openstreetmap.josm.tools.OpenBrowser; 23 22 import org.openstreetmap.josm.tools.WikiReader; … … 26 25 public class GettingStarted extends JPanel { 27 26 28 private JPanel panel;29 27 static private String content = ""; 30 28 31 29 public class LinkGeneral extends JEditorPane implements HyperlinkListener { 32 private String action;33 30 public LinkGeneral(String text) { 34 31 setContentType("text/html"); … … 73 70 /* look for hrefs of the form wiki/MessageOfTheDay>123 where > can also be <,<=,>= and the number is the revision number */ 74 71 int start = 0; 75 boolean nothingIncluded = true;76 72 Pattern versionPattern = Pattern.compile("\\<a[^\\>]*href\\=\\\"([^\\\"]*\\/wiki\\/)(MessageOfTheDay(\\%3E%3D|%3C%3D|\\%3E|\\%3C)([0-9]+))\\\"[^\\>]*\\>[^\\<]*\\<\\/a\\>", Pattern.CASE_INSENSITIVE|Pattern.DOTALL|Pattern.MULTILINE); 77 73 Matcher matcher = versionPattern.matcher(motdcontent); … … 119 115 if (message.indexOf(emptyIndicator) == -1) { 120 116 content += message.replace("<html>", "").replace("</html>", "").replace("<div id=\"searchable\">", "").replace("</div>", ""); 121 nothingIncluded = false;122 117 } 123 118 } catch (IOException ioe) { … … 125 120 try { 126 121 content += wr.read(url).replace("<html>", "").replace("</html>", "").replace("<div id=\"searchable\">", "").replace("</div>", ""); 127 nothingIncluded = false;128 122 } catch (IOException ioe2) { 129 123 } -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r976 r999 52 52 * Main application Startup 53 53 */ 54 @SuppressWarnings("deprecation")55 54 public static void main(final String[] argArray) { 56 55 ///////////////////////////////////////////////////////////////////////// -
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r861 r999 15 15 import org.openstreetmap.josm.data.coor.LatLon; 16 16 import org.openstreetmap.josm.data.projection.Projection; 17 import org.openstreetmap.josm.tools.ColorHelper;18 17 19 18 public class MapScaler extends JComponent implements Helpful { 20 19 21 20 private final NavigatableComponent mv; 22 private final Projection proj;23 24 21 public MapScaler(NavigatableComponent mv, Projection proj) { 25 22 this.mv = mv; 26 this.proj = proj;27 23 setSize(100,30); 28 24 setOpaque(false); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r861 r999 68 68 class ImageLabel extends JPanel { 69 69 private JLabel tf; 70 private JLabel lbl;71 70 private int chars; 72 71 public ImageLabel(String img, String tooltip, int chars) { … … 74 73 setLayout(new GridBagLayout()); 75 74 setBackground(Color.decode("#b8cfe5")); 76 add( lbl =new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0,1,1,0));75 add(new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0,1,1,0)); 77 76 add(tf = new JLabel(), GBC.std().fill(GBC.BOTH).anchor(GBC.WEST).insets(2,1,1,0)); 78 77 setToolTipText(tooltip); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r989 r999 9 9 import java.awt.Graphics2D; 10 10 import java.awt.Point; 11 import java.awt.Transparency;12 11 import java.awt.event.MouseEvent; 13 12 import java.awt.event.MouseMotionListener; … … 29 28 import org.openstreetmap.josm.actions.MoveAction; 30 29 import org.openstreetmap.josm.data.Bounds; 31 import org.openstreetmap.josm.data.Preferences;32 30 import org.openstreetmap.josm.data.SelectionChangedListener; 33 31 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
r845 r999 7 7 import java.awt.Point; 8 8 import java.awt.Rectangle; 9 import java.awt.event.ActionEvent;10 9 import java.awt.event.InputEvent; 11 import java.awt.event.KeyEvent;12 10 import java.awt.event.MouseEvent; 13 11 import java.awt.event.MouseListener; … … 18 16 import java.util.LinkedList; 19 17 20 import javax.swing.AbstractAction;21 import javax.swing.JComponent;22 import javax.swing.KeyStroke;23 24 import org.openstreetmap.josm.Main;25 18 import org.openstreetmap.josm.data.osm.Node; 26 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; -
trunk/src/org/openstreetmap/josm/gui/SideButton.java
r758 r999 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 import static org.openstreetmap.josm.tools.I18n.marktr;5 6 4 import java.awt.event.ActionListener; 7 5 import java.awt.Insets; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r804 r999 31 31 import org.openstreetmap.josm.Main; 32 32 import org.openstreetmap.josm.command.ConflictResolveCommand; 33 import org.openstreetmap.josm.data.Preferences;34 33 import org.openstreetmap.josm.data.SelectionChangedListener; 35 34 import org.openstreetmap.josm.data.osm.DataSet; -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java
r988 r999 219 219 if (RelationEditor.this.relation == null) { 220 220 Main.main.undoRedo.add(new AddCommand(clone)); 221 Main.ds.fireSelectionChanged(Main.ds.getSelected());221 DataSet.fireSelectionChanged(Main.ds.getSelected()); 222 222 } else if (!RelationEditor.this.relation.realEqual(clone, true)) { 223 223 Main.main.undoRedo.add(new ChangeCommand(RelationEditor.this.relation, clone)); 224 Main.ds.fireSelectionChanged(Main.ds.getSelected());224 DataSet.fireSelectionChanged(Main.ds.getSelected()); 225 225 } 226 226 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r997 r999 22 22 import org.openstreetmap.josm.Main; 23 23 import org.openstreetmap.josm.command.DeleteCommand; 24 import org.openstreetmap.josm.data.osm.DataSet; 24 25 import org.openstreetmap.josm.data.osm.OsmPrimitive; 25 26 import org.openstreetmap.josm.data.osm.Relation; … … 114 115 list.setSize(Main.ds.relations.size()); 115 116 int i = 0; 116 for (OsmPrimitive e : Main.ds.sort(Main.ds.relations)) {117 for (OsmPrimitive e : DataSet.sort(Main.ds.relations)) { 117 118 if (!e.deleted && !e.incomplete) 118 119 list.setElementAt(e, i++); -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r807 r999 99 99 } 100 100 } 101 } ;101 } 102 102 103 103 osmUrl.getDocument().addDocumentListener(new osmUrlRefresher()); -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r941 r999 67 67 import org.openstreetmap.josm.io.GpxWriter; 68 68 import org.openstreetmap.josm.io.MultiPartFormOutputStream; 69 import org.openstreetmap.josm.tools.ColorHelper;70 69 import org.openstreetmap.josm.tools.DontShowAgainInfo; 71 70 import org.openstreetmap.josm.tools.GBC; -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r994 r999 35 35 import org.openstreetmap.josm.actions.SaveAsAction; 36 36 import org.openstreetmap.josm.command.Command; 37 import org.openstreetmap.josm.data.Preferences;38 37 import org.openstreetmap.josm.data.coor.EastNorth; 39 38 import org.openstreetmap.josm.data.coor.LatLon; -
trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
r804 r999 49 49 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 50 50 import org.openstreetmap.josm.io.MultiPartFormOutputStream; 51 import org.openstreetmap.josm.tools.ColorHelper;52 51 import org.openstreetmap.josm.tools.DontShowAgainInfo; 53 52 import org.openstreetmap.josm.tools.GBC; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r944 r999 39 39 import org.openstreetmap.josm.gui.layer.Layer; 40 40 import org.openstreetmap.josm.tools.AudioPlayer; 41 import org.openstreetmap.josm.tools.ColorHelper;42 41 import org.openstreetmap.josm.tools.ImageProvider; 43 42 -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
r991 r999 37 37 icon.init(); 38 38 } 39 } ;39 } 40 40 41 41 public ElemStyleHandler(String name) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r990 r999 8 8 9 9 import org.openstreetmap.josm.data.osm.Node; 10 import org.openstreetmap.josm.data.osm.OsmPrimitive;11 10 import org.openstreetmap.josm.data.osm.OsmUtils; 12 11 import org.openstreetmap.josm.data.osm.Way; -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r990 r999 12 12 13 13 public boolean over; 14 public enum WidthMode { ABSOLUTE, PERCENT, OFFSET } ;14 public enum WidthMode { ABSOLUTE, PERCENT, OFFSET } 15 15 public WidthMode widthMode; 16 16 … … 57 57 widthMode = WidthMode.ABSOLUTE; 58 58 overlays = null; 59 } ;59 } 60 60 61 61 // get width for overlays -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r991 r999 1 1 package org.openstreetmap.josm.gui.mappaint; 2 2 3 import java.awt.Toolkit;4 import java.io.File;5 import java.io.FileReader;6 import java.net.URL;7 import java.util.HashMap;8 3 import java.util.LinkedList; 9 4 import java.util.List; 10 import java.util.Iterator;11 5 12 6 import javax.swing.ImageIcon; 13 7 14 8 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.osm.OsmPrimitive;16 9 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 17 10 import org.openstreetmap.josm.io.MirroredInputStream; -
trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java
r930 r999 48 48 { 49 49 JLabel label=new JLabel(); 50 String s = defaults.get( (String)value);50 String s = defaults.get(value); 51 51 if(s != null) 52 52 { … … 60 60 label.setText((String)value); 61 61 return label; 62 } ;62 } 63 63 }; 64 64 final JTable list = new JTable(model); -
trunk/src/org/openstreetmap/josm/gui/preferences/FilePreferences.java
r938 r999 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import javax.swing.Box;7 6 import javax.swing.JCheckBox; 8 7 import javax.swing.JSeparator; -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r939 r999 47 47 48 48 /** 49 * Only the plugin name, it 's jar location and the description.49 * Only the plugin name, its jar location and the description. 50 50 * In other words, this is the minimal requirement the plugin preference page 51 51 * needs to show the plugin as available … … 53 53 * @author imi 54 54 */ 55 public static class PluginDescription implements Comparable {55 public static class PluginDescription implements Comparable<Object> { 56 56 // Note: All the following need to be public instance variables of 57 57 // type String. (Plugin description XMLs from the server are parsed -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java
r627 r999 11 11 12 12 /** 13 * Called , when OK is pressed to save the setting in the Preferences file.13 * Called when OK is pressed to save the setting in the preferences file. 14 14 */ 15 15 void ok(); -
trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
r895 r999 12 12 import java.util.StringTokenizer; 13 13 14 import javax.swing.Action;15 14 import javax.swing.BorderFactory; 16 15 import javax.swing.Box; -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r824 r999 145 145 for (Action a : actions.values()) 146 146 { 147 us.put(a.getValue( a.NAME).toString()+a.toString(), a);147 us.put(a.getValue(Action.NAME).toString()+a.toString(), a); 148 148 } 149 149 for (String a : us.keySet())
Note:
See TracChangeset
for help on using the changeset viewer.