Changeset 17798 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
- Timestamp:
- 2021-04-19T20:15:59+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
r17299 r17798 4 4 import java.awt.Color; 5 5 import java.awt.Font; 6 import java.awt.Graphics; 7 import java.awt.Graphics2D; 8 import java.awt.RenderingHints; 6 9 import java.io.IOException; 7 10 import java.io.InputStream; … … 22 25 23 26 /** 24 * Subclass of {@link JEditorPane} that adds a "native" context menu (cut/copy/paste/select all) 25 * and effectively uses JOSM user agent when performing HTTP request in {@link #setPage(URL)} method. 27 * Subclass of {@link JEditorPane} that adds a "native" context menu (cut/copy/paste/select all), forces text and bullet 28 * point antialiasing based on user preferences, and effectively uses JOSM user agent when performing HTTP request in 29 * {@link #setPage(URL)} method. 26 30 * @since 5886 27 31 */ … … 85 89 } 86 90 return conn.getContent(); 91 } 92 93 @Override 94 public void paintComponent(Graphics g) { 95 // Force antialiasing within the JosmEditorPane for antialiased bullet points 96 Graphics2D g2d = (Graphics2D) g.create(); 97 g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 98 g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); 99 super.paintComponent(g2d); 100 g2d.dispose(); 87 101 } 88 102
Note:
See TracChangeset
for help on using the changeset viewer.
