- Timestamp:
- 2013-06-29T01:23:39+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r6032 r6040 154 154 */ 155 155 public String findSummaryDocumentation() { 156 String result = ""; 157 for (int i = 0; i < downloadTasks.size(); i++) { 158 Class<? extends DownloadTask> taskClass = downloadTasks.get(i); 156 String result = "<table>"; 157 for (Class<? extends DownloadTask> taskClass : downloadTasks) { 159 158 if (taskClass != null) { 160 159 try { 161 160 DownloadTask task = taskClass.getConstructor().newInstance(); 162 result += "<br/>" +task.acceptsDocumentationSummary();161 result += task.acceptsDocumentationSummary(); 163 162 } catch (Exception e) { 164 163 e.printStackTrace(); … … 166 165 } 167 166 } 167 result += "</table>"; 168 168 return result; 169 169 } … … 187 187 } else { 188 188 final String details = findSummaryDocumentation(); // Explain what patterns are supported 189 HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, tr(190 " <html><p>Cannot open URL ''{0}''<br/>The following download tasks accept the URL patterns shown:<br/>{1}</p></html>",191 url, details) , tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation"));189 HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, "<html><p>" + tr( 190 "Cannot open URL ''{0}''<br>The following download tasks accept the URL patterns shown:<br>{1}", 191 url, details) + "</p></html>", tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation")); 192 192 } 193 193 } -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
r6033 r6040 59 59 buf.append("<li>"); 60 60 buf.append(XmlWriter.encode(pattern)); 61 buf.append("</li>"); 61 62 } 62 63 buf.append("</ul>"); -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r5951 r6040 21 21 import javax.swing.JOptionPane; 22 22 import javax.swing.KeyStroke; 23 import javax.swing.SwingUtilities;24 23 25 24 import org.openstreetmap.josm.gui.help.HelpBrowser; 26 25 import org.openstreetmap.josm.gui.help.HelpUtil; 26 import org.openstreetmap.josm.gui.util.GuiHelper; 27 27 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 28 28 import org.openstreetmap.josm.tools.ImageProvider; … … 284 284 */ 285 285 static public void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title, final int messageType, final String helpTopic) { 286 SwingUtilities.invokeLater(new Runnable() {286 GuiHelper.runInEDT(new Runnable() { 287 287 public void run() { 288 288 showOptionDialog(parentComponent, msg, title, messageType, null, null, null, helpTopic); -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r5998 r6040 41 41 import javax.swing.text.html.HTML.Tag; 42 42 import javax.swing.text.html.HTMLDocument; 43 import javax.swing.text.html.HTMLEditorKit;44 43 import javax.swing.text.html.StyleSheet; 45 44 … … 49 48 import org.openstreetmap.josm.gui.MainMenu; 50 49 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 50 import org.openstreetmap.josm.gui.widgets.JosmHTMLEditorKit; 51 51 import org.openstreetmap.josm.tools.ImageProvider; 52 52 import org.openstreetmap.josm.tools.LanguageInfo.LocaleType; … … 168 168 protected void build() { 169 169 help = new JosmEditorPane(); 170 HTMLEditorKit kit = newHTMLEditorKit();170 JosmHTMLEditorKit kit = new JosmHTMLEditorKit(); 171 171 kit.setStyleSheet(buildStyleSheet()); 172 172 help.setEditorKit(kit); -
trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
r5886 r6040 17 17 import javax.swing.event.HyperlinkEvent; 18 18 import javax.swing.event.HyperlinkListener; 19 import javax.swing.text.html.HTMLEditorKit;20 19 import javax.swing.text.html.StyleSheet; 21 20 22 21 import org.openstreetmap.josm.data.osm.Changeset; 23 22 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 23 import org.openstreetmap.josm.gui.widgets.JosmHTMLEditorKit; 24 24 import org.openstreetmap.josm.io.OsmApi; 25 25 import org.openstreetmap.josm.tools.ImageProvider; 26 26 27 // FIXME this class should extend HtmlPanel instead (duplicated code in here) 27 28 public class UploadParameterSummaryPanel extends JPanel implements HyperlinkListener, PropertyChangeListener{ 28 29 private UploadStrategySpecification spec = new UploadStrategySpecification(); … … 127 128 ss.addRule(rule); 128 129 ss.addRule("a {text-decoration: underline; color: blue}"); 129 HTMLEditorKit kit = newHTMLEditorKit();130 JosmHTMLEditorKit kit = new JosmHTMLEditorKit(); 130 131 kit.setStyleSheet(ss); 131 132 jepMessage.setEditorKit(kit); -
trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java
r5886 r6040 9 9 import javax.swing.JPanel; 10 10 import javax.swing.UIManager; 11 import javax.swing.text.html.HTMLEditorKit;12 11 import javax.swing.text.html.StyleSheet; 13 12 … … 19 18 * blue and they are underlined. There is also a CSS rule for the HTML tag <strong> 20 19 * configured. 21 * 20 * @since 2688 22 21 */ 23 22 public class HtmlPanel extends JPanel { … … 50 49 ss.addRule("a {text-decoration: underline; color: blue}"); 51 50 ss.addRule("ul {margin-left: 1cm; list-style-type: disc}"); 52 HTMLEditorKit kit = newHTMLEditorKit();51 JosmHTMLEditorKit kit = new JosmHTMLEditorKit(); 53 52 kit.setStyleSheet(ss); 54 53 jepMessage.setEditorKit(kit);
Note:
See TracChangeset
for help on using the changeset viewer.