- Timestamp:
- 2013-04-19T22:21:57+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 added
- 81 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r5849 r5886 15 15 import javax.swing.JScrollPane; 16 16 import javax.swing.JTabbedPane; 17 import javax.swing.JTextArea;18 17 19 18 import org.openstreetmap.josm.Main; 20 19 import org.openstreetmap.josm.data.Version; 21 20 import org.openstreetmap.josm.gui.util.GuiHelper; 21 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 22 22 import org.openstreetmap.josm.plugins.PluginHandler; 23 23 import org.openstreetmap.josm.tools.BugReportExceptionHandler; … … 38 38 public class AboutAction extends JosmAction { 39 39 40 /** 41 * Constructs a new {@code AboutAction}. 42 */ 40 43 public AboutAction() { 41 44 super(tr("About"), "about", tr("Display the about screen."), … … 49 52 Version version = Version.getInstance(); 50 53 51 J TextArea readme = new JTextArea();54 JosmTextArea readme = new JosmTextArea(); 52 55 readme.setEditable(false); 53 56 readme.setText(Version.loadResourceFile(Main.class.getResource("/README"))); 54 57 readme.setCaretPosition(0); 55 58 56 J TextArea revision = new JTextArea();59 JosmTextArea revision = new JosmTextArea(); 57 60 revision.setEditable(false); 58 61 revision.setText(version.getReleaseAttributes()); 59 62 revision.setCaretPosition(0); 60 63 61 J TextArea contribution = new JTextArea();64 JosmTextArea contribution = new JosmTextArea(); 62 65 contribution.setEditable(false); 63 66 contribution.setText(Version.loadResourceFile(Main.class.getResource("/CONTRIBUTION"))); 64 67 contribution.setCaretPosition(0); 65 68 66 J TextArea license = new JTextArea();69 JosmTextArea license = new JosmTextArea(); 67 70 license.setEditable(false); 68 71 license.setText(Version.loadResourceFile(Main.class.getResource("/LICENSE"))); … … 103 106 } 104 107 105 private JScrollPane createScrollPane(J TextArea area) {108 private JScrollPane createScrollPane(JosmTextArea area) { 106 109 area.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 107 110 area.setOpaque(false); -
trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
r5765 r5886 19 19 import javax.swing.JPanel; 20 20 import javax.swing.JScrollPane; 21 import javax.swing.JTextArea;22 21 import javax.swing.SwingUtilities; 23 22 … … 32 31 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 33 32 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 33 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 34 34 import org.openstreetmap.josm.tools.GBC; 35 35 import org.openstreetmap.josm.tools.Shortcut; … … 43 43 public class DownloadPrimitiveAction extends JosmAction { 44 44 45 /** 46 * Constructs a new {@code DownloadPrimitiveAction}. 47 */ 45 48 public DownloadPrimitiveAction() { 46 49 super(tr("Download object..."), "downloadprimitive", tr("Download OSM object by ID."), … … 144 147 p.add(missing, GBC.eol()); 145 148 } 146 J TextArea txt = new JTextArea();149 JosmTextArea txt = new JosmTextArea(); 147 150 txt.setFont(new Font("Monospaced", txt.getFont().getStyle(), txt.getFont().getSize())); 148 151 txt.setEditable(false); -
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r5808 r5886 20 20 import javax.swing.JLabel; 21 21 import javax.swing.JPanel; 22 import javax.swing.JTextField;23 22 24 23 import org.openstreetmap.josm.Main; … … 31 30 import org.openstreetmap.josm.tools.GBC; 32 31 import org.openstreetmap.josm.tools.ImageProvider; 32 import org.openstreetmap.josm.gui.widgets.JosmTextField; 33 33 34 34 … … 149 149 150 150 class ImageryOffsetDialog extends ExtendedDialog implements FocusListener { 151 public final J TextField tOffset = new JTextField();152 J TextField tBookmarkName = new JTextField();151 public final JosmTextField tOffset = new JosmTextField(); 152 JosmTextField tBookmarkName = new JosmTextField(); 153 153 private boolean ignoreListener; 154 154 public ImageryOffsetDialog() { -
trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
r5780 r5886 14 14 import javax.swing.JOptionPane; 15 15 import javax.swing.JPanel; 16 import javax.swing.JTextField;17 16 import javax.swing.event.DocumentEvent; 18 17 import javax.swing.event.DocumentListener; … … 25 24 import org.openstreetmap.josm.tools.OsmUrlToBounds; 26 25 import org.openstreetmap.josm.tools.Shortcut; 26 import org.openstreetmap.josm.gui.widgets.JosmTextField; 27 27 28 28 public class JumpToAction extends JosmAction implements MouseListener { 29 /** 30 * Constructs a new {@code JumpToAction}. 31 */ 29 32 public JumpToAction() { 30 33 super(tr("Jump To Position"), null, tr("Opens a dialog that allows to jump to a specific location"), Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump To Position")), … … 34 37 } 35 38 36 private J TextField url = new JTextField();37 private J TextField lat = new JTextField();38 private J TextField lon = new JTextField();39 private J TextField zm = new JTextField();39 private JosmTextField url = new JosmTextField(); 40 private JosmTextField lat = new JosmTextField(); 41 private JosmTextField lon = new JosmTextField(); 42 private JosmTextField zm = new JosmTextField(); 40 43 41 44 private double zoomFactor = 0; -
trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
r5567 r5886 17 17 import javax.swing.JPanel; 18 18 import javax.swing.JRadioButton; 19 import javax.swing.JTextField;20 19 21 20 import org.openstreetmap.josm.Main; … … 27 26 import org.openstreetmap.josm.tools.UrlLabel; 28 27 import org.openstreetmap.josm.tools.Utils; 28 import org.openstreetmap.josm.gui.widgets.JosmTextField; 29 29 30 30 public class Map_Rectifier_WMSmenuAction extends JosmAction { … … 111 111 panel.add(new JLabel(tr("Supported Rectifier Services:")), GBC.eol()); 112 112 113 J TextField tfWmsUrl = new JTextField(30);113 JosmTextField tfWmsUrl = new JosmTextField(30); 114 114 115 115 String clip = Utils.getClipboardContent(); -
trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
r4570 r5886 14 14 import javax.swing.JDialog; 15 15 import javax.swing.JOptionPane; 16 import javax.swing.JTextField;17 16 18 17 import org.openstreetmap.josm.Main; 19 18 import org.openstreetmap.josm.gui.layer.Layer; 20 19 import org.openstreetmap.josm.tools.ImageProvider; 20 import org.openstreetmap.josm.gui.widgets.JosmTextField; 21 21 22 22 /** … … 44 44 public void actionPerformed(ActionEvent e) { 45 45 Box panel = Box.createVerticalBox(); 46 final J TextField name = new JTextField(layer.getName());46 final JosmTextField name = new JosmTextField(layer.getName()); 47 47 panel.add(name); 48 48 JCheckBox filerename = new JCheckBox(tr("Also rename the file")); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r5873 r5886 19 19 20 20 import javax.swing.JScrollPane; 21 import javax.swing.JTextArea;22 21 23 22 import org.openstreetmap.josm.Main; … … 27 26 import org.openstreetmap.josm.data.osm.DatasetConsistencyTest; 28 27 import org.openstreetmap.josm.gui.ExtendedDialog; 28 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 29 29 import org.openstreetmap.josm.plugins.PluginHandler; 30 30 import org.openstreetmap.josm.tools.BugReportExceptionHandler; … … 138 138 } 139 139 140 J TextArea ta = new JTextArea(text.toString());140 JosmTextArea ta = new JosmTextArea(text.toString()); 141 141 ta.setWrapStyleWord(true); 142 142 ta.setLineWrap(true); -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r5813 r5886 30 30 import javax.swing.JPanel; 31 31 import javax.swing.JRadioButton; 32 import javax.swing.JTextField;33 32 import javax.swing.text.BadLocationException; 34 33 … … 51 50 import org.openstreetmap.josm.tools.Shortcut; 52 51 import org.openstreetmap.josm.tools.Utils; 52 import org.openstreetmap.josm.gui.widgets.JosmTextField; 53 53 54 54 55 public class SearchAction extends JosmAction implements ParameterizedAction { … … 195 196 public void mouseClicked(MouseEvent e) { 196 197 try { 197 J TextField tf = (JTextField) hcb.getEditor().getEditorComponent();198 JosmTextField tf = (JosmTextField) hcb.getEditor().getEditorComponent(); 198 199 tf.getDocument().insertString(tf.getCaretPosition(), " " + insertText, null); 199 200 } catch (BadLocationException ex) { -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r5883 r5886 16 16 17 17 import javax.swing.JComponent; 18 import javax.swing.JEditorPane;19 18 import javax.swing.JPanel; 20 19 import javax.swing.JScrollPane; … … 26 25 import org.openstreetmap.josm.Main; 27 26 import org.openstreetmap.josm.data.Version; 27 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 28 28 import org.openstreetmap.josm.io.CacheCustomContent; 29 29 import org.openstreetmap.josm.tools.LanguageInfo; … … 39 39 + "</style>\n"; 40 40 41 public static class LinkGeneral extends JEditorPane implements HyperlinkListener { 41 public static class LinkGeneral extends JosmEditorPane implements HyperlinkListener { 42 43 /** 44 * Constructs a new {@code LinkGeneral} with the given HTML text 45 * @param text The text to display 46 */ 42 47 public LinkGeneral(String text) { 43 48 setContentType("text/html"); -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r5266 r5886 17 17 import org.openstreetmap.josm.gui.help.HelpBrowser; 18 18 import org.openstreetmap.josm.gui.help.HelpUtil; 19 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 19 20 import org.openstreetmap.josm.tools.ImageProvider; 20 21 import org.openstreetmap.josm.tools.InputMapUtils; … … 158 159 159 160 if (msg instanceof String) { 160 JEditorPane pane = new JEditorPane(); 161 pane.setContentType("text/html"); 162 pane.setText((String) msg); 161 JosmEditorPane pane = new JosmEditorPane("text/html", (String) msg); 163 162 pane.setEditable(false); 164 163 pane.setOpaque(false); -
trunk/src/org/openstreetmap/josm/gui/MainApplet.java
r5865 r5886 22 22 import javax.swing.JOptionPane; 23 23 import javax.swing.JPanel; 24 import javax.swing.JPasswordField;25 import javax.swing.JTextField;26 24 27 25 import org.openstreetmap.josm.Main; … … 30 28 import org.openstreetmap.josm.gui.MainApplication.Option; 31 29 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 30 import org.openstreetmap.josm.gui.widgets.JosmTextField; 32 31 import org.openstreetmap.josm.tools.GBC; 33 32 import org.openstreetmap.josm.tools.I18n; … … 114 113 p.add(new JLabel(tr(e.realm)), GBC.eol().fill(GBC.HORIZONTAL)); 115 114 p.add(new JLabel(tr("Username")), GBC.std().insets(0,0,20,0)); 116 J TextField user = new JTextField(username == null ? "" : username);115 JosmTextField user = new JosmTextField(username == null ? "" : username); 117 116 p.add(user, GBC.eol().fill(GBC.HORIZONTAL)); 118 117 p.add(new JLabel(tr("Password")), GBC.std().insets(0,0,20,0)); 119 J PasswordField pass = new JosmPasswordField(password == null ? "" : password);118 JosmPasswordField pass = new JosmPasswordField(password == null ? "" : password); 120 119 p.add(pass, GBC.eol().fill(GBC.HORIZONTAL)); 121 120 JOptionPane.showMessageDialog(null, p); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r5534 r5886 34 34 import javax.swing.JProgressBar; 35 35 import javax.swing.JScrollPane; 36 import javax.swing.JTextField;37 36 import javax.swing.Popup; 38 37 import javax.swing.PopupFactory; … … 50 49 import org.openstreetmap.josm.tools.GBC; 51 50 import org.openstreetmap.josm.tools.ImageProvider; 51 import org.openstreetmap.josm.gui.widgets.JosmTextField; 52 52 53 53 /** … … 151 151 final ImageLabel lonText = new ImageLabel("lon", tr("The geographic longitude at the mouse pointer."), 11); 152 152 final ImageLabel nameText = new ImageLabel("name", tr("The name of the object at the mouse pointer."), 20); 153 final J TextField helpText = new JTextField();153 final JosmTextField helpText = new JosmTextField(); 154 154 final ImageLabel latText = new ImageLabel("lat", tr("The geographic latitude at the mouse pointer."), 11); 155 155 final ImageLabel angleText = new ImageLabel("angle", tr("The angle between the previous and the current way segment."), 6); -
trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
r5534 r5886 20 20 import javax.swing.JProgressBar; 21 21 import javax.swing.JScrollPane; 22 import javax.swing.JTextArea;23 22 import javax.swing.UIManager; 24 23 25 24 import org.openstreetmap.josm.Main; 26 25 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.ProgressMonitorDialog; 26 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 27 27 import org.openstreetmap.josm.tools.GBC; 28 28 import org.openstreetmap.josm.tools.ImageProvider; … … 38 38 private JButton btnInBackground; 39 39 /** the text area and the scroll pane for the log */ 40 private J TextArea taLog = new JTextArea(5,50);40 private JosmTextArea taLog = new JosmTextArea(5,50); 41 41 private JScrollPane spLog; 42 42 -
trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java
r4879 r5886 24 24 import javax.swing.BorderFactory; 25 25 import javax.swing.JDialog; 26 import javax.swing.JEditorPane;27 26 import javax.swing.JOptionPane; 28 27 import javax.swing.JPanel; … … 47 46 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; 48 47 import org.openstreetmap.josm.gui.help.HelpUtil; 48 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 49 49 import org.openstreetmap.josm.tools.ImageProvider; 50 50 import org.openstreetmap.josm.tools.WindowGeometry; … … 53 53 * This dialog is used to get a user confirmation that a collection of primitives can be removed 54 54 * from their parent relations. 55 * 55 * @since 2308 56 56 */ 57 57 public class DeleteFromRelationConfirmationDialog extends JDialog implements TableModelListener { … … 62 62 * Replies the unique instance of this dialog 63 63 * 64 * @return 64 * @return The unique instance of this dialog 65 65 */ 66 66 static public DeleteFromRelationConfirmationDialog getInstance() { … … 73 73 /** the data model */ 74 74 private RelationMemberTableModel model; 75 private J EditorPane jepMessage;75 private JosmEditorPane jepMessage; 76 76 private boolean canceled; 77 77 private SideButton btnOK; … … 79 79 protected JPanel buildMessagePanel() { 80 80 JPanel pnl = new JPanel(new BorderLayout()); 81 jepMessage = new J EditorPane("text/html", "");81 jepMessage = new JosmEditorPane("text/html", ""); 82 82 jepMessage.setOpaque(false); 83 83 jepMessage.setEditable(false); … … 169 169 } 170 170 171 /** 172 * Constructs a new {@code DeleteFromRelationConfirmationDialog}. 173 */ 171 174 public DeleteFromRelationConfirmationDialog() { 172 175 super(JOptionPane.getFrameForComponent(Main.parent), "", ModalityType.DOCUMENT_MODAL); … … 225 228 private ArrayList<RelationToChildReference> data; 226 229 230 /** 231 * Constructs a new {@code RelationMemberTableModel}. 232 */ 227 233 public RelationMemberTableModel() { 228 234 data = new ArrayList<RelationToChildReference>(); -
trunk/src/org/openstreetmap/josm/gui/actionsupport/LogShowDialog.java
r5114 r5886 1 1 package org.openstreetmap.josm.gui.actionsupport; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 2 4 3 5 import java.awt.Dimension; 4 6 import java.awt.GridBagLayout; 5 import javax.swing.*; 7 8 import javax.swing.JLabel; 9 import javax.swing.JPanel; 10 import javax.swing.JScrollPane; 11 6 12 import org.openstreetmap.josm.Main; 7 import org.openstreetmap.josm.data.Preferences;8 13 import org.openstreetmap.josm.gui.ExtendedDialog; 9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 10 import org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference; 11 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 14 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 12 15 import org.openstreetmap.josm.tools.GBC; 13 14 import static org.openstreetmap.josm.tools.I18n.tr;15 16 16 17 /** … … 34 35 35 36 p.add(lbl, GBC.eol().insets(5,0,5,0)); 36 J EditorPane txt = new JEditorPane();37 JosmEditorPane txt = new JosmEditorPane(); 37 38 txt.setContentType("text/html"); 38 39 txt.setText(log); … … 50 51 } 51 52 } 52 53 -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r5266 r5886 33 33 import javax.swing.JPanel; 34 34 import javax.swing.JSpinner; 35 import javax.swing.JTextField;36 35 import javax.swing.KeyStroke; 37 36 import javax.swing.SpinnerNumberModel; … … 50 49 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 51 50 import org.openstreetmap.josm.tools.ImageProvider; 51 import org.openstreetmap.josm.gui.widgets.JosmTextField; 52 52 53 53 /** … … 210 210 static public final String TILE_BOUNDS_PROP = TileGridInputPanel.class.getName() + ".tileBounds"; 211 211 212 private J TextField tfMaxY;213 private J TextField tfMinY;214 private J TextField tfMaxX;215 private J TextField tfMinX;212 private JosmTextField tfMaxY; 213 private JosmTextField tfMinY; 214 private JosmTextField tfMaxX; 215 private JosmTextField tfMinX; 216 216 private TileCoordinateValidator valMaxY; 217 217 private TileCoordinateValidator valMinY; … … 267 267 gc.gridx = 1; 268 268 gc.weightx = 0.5; 269 pnl.add(tfMinX = new J TextField(), gc);269 pnl.add(tfMinX = new JosmTextField(), gc); 270 270 valMinX = new TileCoordinateValidator(tfMinX); 271 271 SelectAllOnFocusGainedDecorator.decorate(tfMinX); … … 275 275 gc.gridx = 2; 276 276 gc.weightx = 0.5; 277 pnl.add(tfMaxX = new J TextField(), gc);277 pnl.add(tfMaxX = new JosmTextField(), gc); 278 278 valMaxX = new TileCoordinateValidator(tfMaxX); 279 279 SelectAllOnFocusGainedDecorator.decorate(tfMaxX); … … 288 288 gc.gridx = 1; 289 289 gc.weightx = 0.5; 290 pnl.add(tfMinY = new J TextField(), gc);290 pnl.add(tfMinY = new JosmTextField(), gc); 291 291 valMinY = new TileCoordinateValidator(tfMinY); 292 292 SelectAllOnFocusGainedDecorator.decorate(tfMinY); … … 296 296 gc.gridx = 2; 297 297 gc.weightx = 0.5; 298 pnl.add(tfMaxY = new J TextField(), gc);298 pnl.add(tfMaxY = new JosmTextField(), gc); 299 299 valMaxY = new TileCoordinateValidator(tfMaxY); 300 300 SelectAllOnFocusGainedDecorator.decorate(tfMaxY); … … 428 428 static public final String TILE_BOUNDS_PROP = TileAddressInputPanel.class.getName() + ".tileBounds"; 429 429 430 private J TextField tfTileAddress;430 private JosmTextField tfTileAddress; 431 431 private TileAddressValidator valTileAddress; 432 432 … … 452 452 gc.weightx = 1.0; 453 453 gc.gridx = 1; 454 pnl.add(tfTileAddress = new J TextField(), gc);454 pnl.add(tfTileAddress = new JosmTextField(), gc); 455 455 valTileAddress = new TileAddressValidator(tfTileAddress); 456 456 SelectAllOnFocusGainedDecorator.decorate(tfTileAddress); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditor.java
r5266 r5886 8 8 import javax.swing.AbstractCellEditor; 9 9 import javax.swing.JTable; 10 import javax.swing.JTextField;11 10 import javax.swing.table.TableCellEditor; 12 11 13 12 import org.openstreetmap.josm.data.osm.RelationMember; 13 import org.openstreetmap.josm.gui.widgets.JosmTextField; 14 14 15 15 16 /** … … 19 20 public class RelationMemberTableCellEditor extends AbstractCellEditor implements TableCellEditor{ 20 21 21 private final J TextField editor;22 private final JosmTextField editor; 22 23 24 /** 25 * Constructs a new {@code RelationMemberTableCellEditor}. 26 */ 23 27 public RelationMemberTableCellEditor() { 24 editor = new J TextField();28 editor = new JosmTextField(); 25 29 editor.addFocusListener( 26 30 new FocusAdapter() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r5539 r5886 17 17 import javax.swing.JScrollPane; 18 18 import javax.swing.JTabbedPane; 19 import javax.swing.JTextArea;20 19 import javax.swing.SingleSelectionModel; 21 20 import javax.swing.event.ChangeEvent; … … 46 45 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; 47 46 import org.openstreetmap.josm.gui.mappaint.xml.XmlStyleSource; 47 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 48 48 import org.openstreetmap.josm.tools.DateUtils; 49 49 import org.openstreetmap.josm.tools.GBC; … … 61 61 protected List<OsmPrimitive> primitives; 62 62 protected OsmDataLayer layer; 63 private J TextArea txtData;64 private J TextArea txtMappaint;63 private JosmTextArea txtData; 64 private JosmTextArea txtMappaint; 65 65 boolean mappaintTabLoaded; 66 66 … … 94 94 protected JPanel buildDataPanel() { 95 95 JPanel p = new JPanel(new GridBagLayout()); 96 txtData = new J TextArea();96 txtData = new JosmTextArea(); 97 97 txtData.setFont(new Font("Monospaced", txtData.getFont().getStyle(), txtData.getFont().getSize())); 98 98 txtData.setEditable(false); … … 321 321 protected void buildMapPaintPanel(JPanel p) { 322 322 p.setLayout(new GridBagLayout()); 323 txtMappaint = new J TextArea();323 txtMappaint = new JosmTextArea(); 324 324 txtMappaint.setFont(new Font("Monospaced", txtMappaint.getFont().getStyle(), txtMappaint.getFont().getSize())); 325 325 txtMappaint.setEditable(false); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r4314 r5886 7 7 import java.awt.Component; 8 8 import java.awt.GridBagLayout; 9 import java.awt.event.ActionEvent;10 9 import java.awt.event.FocusEvent; 11 10 import java.awt.event.FocusListener; 12 import java.awt.event.WindowAdapter;13 import java.awt.event.WindowEvent;14 11 import java.text.NumberFormat; 15 12 import java.text.ParsePosition; … … 20 17 import java.util.regex.Pattern; 21 18 22 import javax.swing.AbstractAction;23 19 import javax.swing.BorderFactory; 24 20 import javax.swing.JLabel; … … 26 22 import javax.swing.JSeparator; 27 23 import javax.swing.JTabbedPane; 28 import javax.swing.JTextField;29 24 import javax.swing.UIManager; 30 25 import javax.swing.event.ChangeEvent; … … 39 34 import org.openstreetmap.josm.gui.ExtendedDialog; 40 35 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 36 import org.openstreetmap.josm.gui.widgets.JosmTextField; 41 37 import org.openstreetmap.josm.tools.GBC; 42 import org.openstreetmap.josm.tools.ImageProvider;43 38 import org.openstreetmap.josm.tools.WindowGeometry; 44 39 … … 47 42 48 43 public JTabbedPane tabs; 49 private J TextField tfLatLon, tfEastNorth;44 private JosmTextField tfLatLon, tfEastNorth; 50 45 private LatLon latLonCoordinates; 51 46 private EastNorth eastNorthCoordinates; … … 77 72 78 73 pnl.add(new JLabel(tr("Coordinates:")), GBC.std().insets(0,10,5,0)); 79 tfLatLon = new J TextField(24);74 tfLatLon = new JosmTextField(24); 80 75 pnl.add(tfLatLon, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0)); 81 76 … … 129 124 130 125 pnl.add(new JLabel(tr("Projected coordinates:")), GBC.std().insets(0,10,5,0)); 131 tfEastNorth = new J TextField(24);126 tfEastNorth = new JosmTextField(24); 132 127 133 128 pnl.add(tfEastNorth, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0)); … … 208 203 } 209 204 210 protected void setErrorFeedback(J TextField tf, String message) {205 protected void setErrorFeedback(JosmTextField tf, String message) { 211 206 tf.setBorder(BorderFactory.createLineBorder(Color.RED, 1)); 212 207 tf.setToolTipText(message); … … 214 209 } 215 210 216 protected void clearErrorFeedback(J TextField tf, String message) {211 protected void clearErrorFeedback(JosmTextField tf, String message) { 217 212 tf.setBorder(UIManager.getBorder("TextField.border")); 218 213 tf.setToolTipText(message); … … 329 324 public void focusGained(FocusEvent e) { 330 325 Component c = e.getComponent(); 331 if (c instanceof J TextField) {332 J TextField tf = (JTextField)c;326 if (c instanceof JosmTextField) { 327 JosmTextField tf = (JosmTextField)c; 333 328 tf.selectAll(); 334 329 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r5519 r5886 35 35 import javax.swing.JSlider; 36 36 import javax.swing.JTable; 37 import javax.swing.JTextField;38 37 import javax.swing.JViewport; 39 38 import javax.swing.KeyStroke; … … 72 71 import org.openstreetmap.josm.tools.MultikeyShortcutAction.MultikeyInfo; 73 72 import org.openstreetmap.josm.tools.Shortcut; 73 import org.openstreetmap.josm.gui.widgets.JosmTextField; 74 74 75 75 /** … … 194 194 layerList.getColumnModel().getColumn(1).setResizable(false); 195 195 layerList.getColumnModel().getColumn(2).setCellRenderer(new LayerNameCellRenderer()); 196 layerList.getColumnModel().getColumn(2).setCellEditor(new LayerNameCellEditor(new J TextField()));196 layerList.getColumnModel().getColumn(2).setCellEditor(new LayerNameCellEditor(new JosmTextField())); 197 197 for (KeyStroke ks : new KeyStroke[] { 198 198 KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK), … … 1009 1009 1010 1010 private static class LayerNameCellEditor extends DefaultCellEditor { 1011 public LayerNameCellEditor(J TextField tf) {1011 public LayerNameCellEditor(JosmTextField tf) { 1012 1012 super(tf); 1013 1013 } … … 1015 1015 @Override 1016 1016 public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { 1017 J TextField tf = (JTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column);1017 JosmTextField tf = (JosmTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column); 1018 1018 tf.setText(value == null ? "" : ((Layer) value).getName()); 1019 1019 return tf; -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r5576 r5886 39 39 import javax.swing.JTabbedPane; 40 40 import javax.swing.JTable; 41 import javax.swing.JTextArea;42 41 import javax.swing.JViewport; 43 42 import javax.swing.ListSelectionModel; … … 72 71 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 73 72 import org.openstreetmap.josm.gui.widgets.JFileChooserManager; 73 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 74 74 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 75 75 import org.openstreetmap.josm.tools.GBC; … … 91 91 protected JCheckBox cbWireframe; 92 92 93 /** 94 * Constructs a new {@code MapPaintDialog}. 95 */ 93 96 public MapPaintDialog() { 94 97 super(tr("Map Paint Styles"), "mapstyle", tr("configure the map painting style"), … … 406 409 */ 407 410 public static class LaunchMapPaintPreferencesAction extends AbstractAction { 411 /** 412 * Constructs a new {@code LaunchMapPaintPreferencesAction}. 413 */ 408 414 public LaunchMapPaintPreferencesAction() { 409 415 putValue(NAME, tr("Preferences")); … … 652 658 653 659 private void buildSourcePanel(StyleSource s, JPanel p) { 654 J TextArea txtSource = new JTextArea();660 JosmTextArea txtSource = new JosmTextArea(); 655 661 txtSource.setFont(new Font("Monospaced", txtSource.getFont().getStyle(), txtSource.getFont().getSize())); 656 662 txtSource.setEditable(false); … … 673 679 674 680 private void buildErrorsPanel(StyleSource s, JPanel p) { 675 J TextArea txtErrors = new JTextArea();681 JosmTextArea txtErrors = new JosmTextArea(); 676 682 txtErrors.setFont(new Font("Monospaced", txtErrors.getFont().getStyle(), txtErrors.getFont().getSize())); 677 683 txtErrors.setEditable(false); … … 702 708 703 709 public class MapPaintPopup extends JPopupMenu { 710 /** 711 * Constructs a new {@code MapPaintPopup}. 712 */ 704 713 public MapPaintPopup() { 705 714 add(reloadAction); -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r5825 r5886 27 27 import javax.swing.JPopupMenu; 28 28 import javax.swing.JScrollPane; 29 import javax.swing.JTextField;30 29 import javax.swing.KeyStroke; 31 30 import javax.swing.ListSelectionModel; … … 76 75 import org.openstreetmap.josm.tools.Shortcut; 77 76 import org.openstreetmap.josm.tools.Utils; 77 import org.openstreetmap.josm.gui.widgets.JosmTextField; 78 78 79 79 /** … … 96 96 private final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu); 97 97 98 private final J TextField filter;98 private final JosmTextField filter; 99 99 100 100 // Actions … … 260 260 } 261 261 262 private J TextField setupFilter() {263 final J TextField f = new DisableShortcutsOnFocusGainedTextField();262 private JosmTextField setupFilter() { 263 final JosmTextField f = new DisableShortcutsOnFocusGainedTextField(); 264 264 f.setToolTipText(tr("Relation list filter")); 265 265 f.getDocument().addDocumentListener(new DocumentListener() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java
r5319 r5886 26 26 import javax.swing.JOptionPane; 27 27 import javax.swing.JPanel; 28 import javax.swing.JTextArea;29 import javax.swing.JTextField;30 28 import javax.swing.JToolBar; 31 29 … … 40 38 import org.openstreetmap.josm.gui.help.HelpUtil; 41 39 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 40 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 41 import org.openstreetmap.josm.gui.widgets.JosmTextField; 42 42 import org.openstreetmap.josm.tools.ImageProvider; 43 43 44 44 45 /** … … 49 50 public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener{ 50 51 51 private J TextField tfID;52 private J TextArea taComment;53 private J TextField tfOpen;54 private J TextField tfUser;55 private J TextField tfCreatedOn;56 private J TextField tfClosedOn;52 private JosmTextField tfID; 53 private JosmTextArea taComment; 54 private JosmTextField tfOpen; 55 private JosmTextField tfUser; 56 private JosmTextField tfCreatedOn; 57 private JosmTextField tfClosedOn; 57 58 private DonwloadChangesetContentAction actDownloadChangesetContent; 58 59 private UpdateChangesetAction actUpdateChangesets; … … 118 119 gc.weightx = 0.0; 119 120 gc.gridx = 1; 120 pnl.add(tfID = new J TextField(10), gc);121 pnl.add(tfID = new JosmTextField(10), gc); 121 122 tfID.setEditable(false); 122 123 … … 132 133 gc.weighty = 1.0; 133 134 gc.gridx = 1; 134 pnl.add(taComment= new J TextArea(5,40), gc);135 pnl.add(taComment= new JosmTextArea(5,40), gc); 135 136 taComment.setEditable(false); 136 137 … … 145 146 gc.fill = GridBagConstraints.HORIZONTAL; 146 147 gc.gridx = 1; 147 pnl.add(tfOpen= new J TextField(10), gc);148 pnl.add(tfOpen= new JosmTextField(10), gc); 148 149 tfOpen.setEditable(false); 149 150 … … 158 159 gc.weightx = 1.0; 159 160 gc.gridx = 1; 160 pnl.add(tfUser= new J TextField(""), gc);161 pnl.add(tfUser= new JosmTextField(""), gc); 161 162 tfUser.setEditable(false); 162 163 … … 170 171 gc.fill = GridBagConstraints.HORIZONTAL; 171 172 gc.gridx = 1; 172 pnl.add(tfCreatedOn= new J TextField(20), gc);173 pnl.add(tfCreatedOn= new JosmTextField(20), gc); 173 174 tfCreatedOn.setEditable(false); 174 175 … … 182 183 gc.fill = GridBagConstraints.HORIZONTAL; 183 184 gc.gridx = 1; 184 pnl.add(tfClosedOn= new J TextField(20), gc);185 pnl.add(tfClosedOn= new JosmTextField(20), gc); 185 186 tfClosedOn.setEditable(false); 186 187 … … 230 231 } 231 232 233 /** 234 * Constructs a new {@code ChangesetDetailPanel}. 235 */ 232 236 public ChangesetDetailPanel() { 233 237 build(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
r5266 r5886 25 25 import javax.swing.JRadioButton; 26 26 import javax.swing.JScrollPane; 27 import javax.swing.JTextField;28 27 import javax.swing.text.JTextComponent; 29 28 … … 39 38 import org.openstreetmap.josm.io.ChangesetQuery; 40 39 import org.openstreetmap.josm.tools.CheckParameterUtil; 40 import org.openstreetmap.josm.gui.widgets.JosmTextField; 41 41 42 42 43 /** … … 375 376 private JRadioButton rbRestrictToUid; 376 377 private JRadioButton rbRestrictToUserName; 377 private J TextField tfUid;378 private JosmTextField tfUid; 378 379 private UidInputFieldValidator valUid; 379 private J TextField tfUserName;380 private JosmTextField tfUserName; 380 381 private UserNameInputValidator valUserName; 381 382 private JMultilineLabel lblRestrictedToMyself; … … 390 391 391 392 gc.gridx = 1; 392 pnl.add(tfUid = new J TextField(10),gc);393 pnl.add(tfUid = new JosmTextField(10),gc); 393 394 SelectAllOnFocusGainedDecorator.decorate(tfUid); 394 395 valUid = UidInputFieldValidator.decorate(tfUid); … … 410 411 411 412 gc.gridx = 1; 412 pnl.add(tfUserName = new J TextField(10),gc);413 pnl.add(tfUserName = new JosmTextField(10),gc); 413 414 SelectAllOnFocusGainedDecorator.decorate(tfUserName); 414 415 valUserName = UserNameInputValidator.decorate(tfUserName); … … 635 636 private JRadioButton rbClosedAfter; 636 637 private JRadioButton rbClosedAfterAndCreatedBefore; 637 private J TextField tfClosedAfterDate1;638 private JosmTextField tfClosedAfterDate1; 638 639 private DateValidator valClosedAfterDate1; 639 private J TextField tfClosedAfterTime1;640 private JosmTextField tfClosedAfterTime1; 640 641 private TimeValidator valClosedAfterTime1; 641 private J TextField tfClosedAfterDate2;642 private JosmTextField tfClosedAfterDate2; 642 643 private DateValidator valClosedAfterDate2; 643 private J TextField tfClosedAfterTime2;644 private JosmTextField tfClosedAfterTime2; 644 645 private TimeValidator valClosedAfterTime2; 645 private J TextField tfCreatedBeforeDate;646 private JosmTextField tfCreatedBeforeDate; 646 647 private DateValidator valCreatedBeforeDate; 647 private J TextField tfCreatedBeforeTime;648 private JosmTextField tfCreatedBeforeTime; 648 649 private TimeValidator valCreatedBeforeTime; 649 650 … … 658 659 gc.gridx = 1; 659 660 gc.weightx = 0.7; 660 pnl.add(tfClosedAfterDate1 = new J TextField(),gc);661 pnl.add(tfClosedAfterDate1 = new JosmTextField(),gc); 661 662 SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate1); 662 663 valClosedAfterDate1 = DateValidator.decorate(tfClosedAfterDate1); … … 669 670 gc.gridx = 3; 670 671 gc.weightx = 0.3; 671 pnl.add(tfClosedAfterTime1 = new J TextField(),gc);672 pnl.add(tfClosedAfterTime1 = new JosmTextField(),gc); 672 673 SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime1); 673 674 valClosedAfterTime1 = TimeValidator.decorate(tfClosedAfterTime1); … … 692 693 gc.gridx = 2; 693 694 gc.weightx = 0.7; 694 pnl.add(tfClosedAfterDate2 = new J TextField(),gc);695 pnl.add(tfClosedAfterDate2 = new JosmTextField(),gc); 695 696 SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate2); 696 697 valClosedAfterDate2 = DateValidator.decorate(tfClosedAfterDate2); … … 702 703 gc.gridx = 4; 703 704 gc.weightx = 0.3; 704 pnl.add(tfClosedAfterTime2 = new J TextField(),gc);705 pnl.add(tfClosedAfterTime2 = new JosmTextField(),gc); 705 706 SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime2); 706 707 valClosedAfterTime2 = TimeValidator.decorate(tfClosedAfterTime2); … … 722 723 gc.gridx = 2; 723 724 gc.weightx = 0.7; 724 pnl.add(tfCreatedBeforeDate = new J TextField(),gc);725 pnl.add(tfCreatedBeforeDate = new JosmTextField(),gc); 725 726 SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeDate); 726 727 valCreatedBeforeDate = DateValidator.decorate(tfCreatedBeforeDate); … … 733 734 gc.gridx = 4; 734 735 gc.weightx = 0.3; 735 pnl.add(tfCreatedBeforeTime = new J TextField(),gc);736 pnl.add(tfCreatedBeforeTime = new JosmTextField(),gc); 736 737 SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeTime); 737 738 valCreatedBeforeTime = TimeValidator.decorate(tfCreatedBeforeTime); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r5266 r5886 16 16 import javax.swing.JLabel; 17 17 import javax.swing.JPanel; 18 import javax.swing.JTextField;19 18 import javax.swing.event.DocumentEvent; 20 19 import javax.swing.event.DocumentListener; … … 27 26 import org.openstreetmap.josm.io.ChangesetQuery.ChangesetQueryUrlException; 28 27 import org.openstreetmap.josm.tools.ImageProvider; 28 import org.openstreetmap.josm.gui.widgets.JosmTextField; 29 29 30 30 31 31 public class UrlBasedQueryPanel extends JPanel { 32 32 33 private J TextField tfUrl;33 private JosmTextField tfUrl; 34 34 private JLabel lblValid; 35 35 … … 45 45 gc.weightx = 1.0; 46 46 gc.fill = GridBagConstraints.HORIZONTAL; 47 pnl.add(tfUrl = new J TextField(), gc);47 pnl.add(tfUrl = new JosmTextField(), gc); 48 48 tfUrl.getDocument().addDocumentListener(new ChangetQueryUrlValidator()); 49 49 tfUrl.addFocusListener( -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r5773 r5886 42 42 import javax.swing.AbstractAction; 43 43 import javax.swing.Action; 44 import javax.swing.BorderFactory;45 44 import javax.swing.Box; 46 45 import javax.swing.DefaultListCellRenderer; … … 50 49 import javax.swing.JLabel; 51 50 import javax.swing.JList; 52 import javax.swing.JMenuItem;53 51 import javax.swing.JOptionPane; 54 52 import javax.swing.JPanel; … … 79 77 import org.openstreetmap.josm.tools.GBC; 80 78 import org.openstreetmap.josm.tools.Shortcut; 81 import org.openstreetmap.josm.tools.Utils;82 79 import org.openstreetmap.josm.tools.WindowGeometry; 83 80 … … 504 501 } 505 502 }); 506 JMenuItem pasteK = new JMenuItem(507 new AbstractAction(tr("Paste tag")){508 public void actionPerformed(ActionEvent e) {509 String buf = Utils.getClipboardContent().trim();510 if (buf.isEmpty()) return;511 keys.setSelectedItem(buf);512 }513 });514 JMenuItem pasteV = new JMenuItem(515 new AbstractAction(tr("Paste value")){516 public void actionPerformed(ActionEvent e) {517 String buf = Utils.getClipboardContent().trim();518 if (buf.isEmpty()) return;519 values.setSelectedItem(buf);520 }521 });522 523 503 { 524 add(pasteK);525 add(pasteV);526 addSeparator();527 504 add(fixTagLanguageCb); 528 505 fixTagLanguageCb.setState(PROPERTY_FIX_TAG_LOCALE.get()); 529 506 } 530 507 }; 531 532 508 } 533 509 -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r4420 r5886 17 17 import javax.swing.JPanel; 18 18 import javax.swing.JScrollPane; 19 import javax.swing.JTextArea;20 19 import javax.swing.SwingUtilities; 21 20 import javax.swing.event.ListSelectionEvent; … … 24 23 import org.openstreetmap.josm.Main; 25 24 import org.openstreetmap.josm.data.Bounds; 26 import org.openstreetmap.josm.data.coor.CoordinateFormat;27 25 import org.openstreetmap.josm.data.osm.BBox; 28 26 import org.openstreetmap.josm.gui.BookmarkList; 29 27 import org.openstreetmap.josm.gui.BookmarkList.Bookmark; 30 28 import org.openstreetmap.josm.gui.JMultilineLabel; 29 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 31 30 import org.openstreetmap.josm.tools.ImageProvider; 32 31 … … 50 49 /** displays information about the current download area */ 51 50 private JMultilineLabel lblCurrentDownloadArea; 52 final private J TextArea bboxDisplay = new JTextArea();51 final private JosmTextArea bboxDisplay = new JosmTextArea(); 53 52 /** the add action */ 54 53 private AddAction actAdd; -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r5124 r5886 23 23 import javax.swing.JPanel; 24 24 import javax.swing.JPopupMenu; 25 import javax.swing.JTextArea;26 import javax.swing.JTextField;27 25 import javax.swing.UIManager; 28 26 import javax.swing.border.Border; … … 34 32 import org.openstreetmap.josm.data.coor.CoordinateFormat; 35 33 import org.openstreetmap.josm.data.coor.LatLon; 34 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 import org.openstreetmap.josm.tools.GBC; 37 37 import org.openstreetmap.josm.tools.ImageProvider; … … 49 49 public class BoundingBoxSelection implements DownloadSelection { 50 50 51 private J TextField[] latlon = null;52 private final J TextArea tfOsmUrl = new JTextArea();53 private final J TextArea showUrl = new JTextArea();51 private JosmTextField[] latlon = null; 52 private final JosmTextArea tfOsmUrl = new JosmTextArea(); 53 private final JosmTextArea showUrl = new JosmTextArea(); 54 54 private DownloadDialog parent; 55 55 … … 63 63 64 64 protected void buildDownloadAreaInputFields() { 65 latlon = new J TextField[4];65 latlon = new JosmTextField[4]; 66 66 for(int i=0; i< 4; i++) { 67 latlon[i] = new J TextField(11);68 latlon[i].setMinimumSize(new Dimension(100,new J TextField().getMinimumSize().height));67 latlon[i] = new JosmTextField(11); 68 latlon[i].setMinimumSize(new Dimension(100,new JosmTextField().getMinimumSize().height)); 69 69 latlon[i].addFocusListener(new SelectAllOnFocusHandler(latlon[i])); 70 70 } … … 160 160 } 161 161 162 /** 163 * Replies the download area. 164 * @return The download area 165 */ 162 166 public Bounds getDownloadArea() { 163 167 double[] values = new double[4]; … … 191 195 latlon[2].setText(area.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES)); 192 196 latlon[3].setText(area.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)); 193 for (J TextField tf: latlon) {197 for (JosmTextField tf: latlon) { 194 198 resetErrorMessage(tf); 195 199 } … … 203 207 private Border errorBorder = BorderFactory.createLineBorder(Color.RED, 1); 204 208 205 protected void setErrorMessage(J TextField tf, String msg) {209 protected void setErrorMessage(JosmTextField tf, String msg) { 206 210 tf.setBorder(errorBorder); 207 211 tf.setToolTipText(msg); 208 212 } 209 213 210 protected void resetErrorMessage(J TextField tf) {214 protected void resetErrorMessage(JosmTextField tf) { 211 215 tf.setBorder(UIManager.getBorder("TextField.border")); 212 216 tf.setToolTipText(""); … … 214 218 215 219 class LatValueChecker extends FocusAdapter implements ActionListener{ 216 private J TextField tfLatValue;217 218 public LatValueChecker(J TextField tfLatValue) {220 private JosmTextField tfLatValue; 221 222 public LatValueChecker(JosmTextField tfLatValue) { 219 223 this.tfLatValue = tfLatValue; 220 224 } … … 246 250 247 251 class LonValueChecker extends FocusAdapter implements ActionListener { 248 private J TextField tfLonValue;249 250 public LonValueChecker(J TextField tfLonValue) {252 private JosmTextField tfLonValue; 253 254 public LonValueChecker(JosmTextField tfLonValue) { 251 255 this.tfLonValue = tfLonValue; 252 256 } -
trunk/src/org/openstreetmap/josm/gui/download/DownloadObjectDialog.java
r5786 r5886 22 22 import javax.swing.JOptionPane; 23 23 import javax.swing.JPanel; 24 import javax.swing.JTextField;25 24 import javax.swing.KeyStroke; 26 25 import javax.swing.border.EtchedBorder; … … 36 35 import org.openstreetmap.josm.gui.widgets.OsmPrimitiveTypesComboBox; 37 36 import org.openstreetmap.josm.tools.Utils; 37 import org.openstreetmap.josm.gui.widgets.JosmTextField; 38 38 39 39 /** … … 82 82 cbId.setEditor(new BasicComboBoxEditor() { 83 83 @Override 84 protected J TextField createEditorComponent() {84 protected JosmTextField createEditorComponent() { 85 85 return tfId; 86 86 } -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r5874 r5886 24 24 import javax.swing.JComponent; 25 25 import javax.swing.JDialog; 26 import javax.swing.JEditorPane;27 26 import javax.swing.JMenuItem; 28 27 import javax.swing.JOptionPane; … … 40 39 import javax.swing.text.Element; 41 40 import javax.swing.text.SimpleAttributeSet; 41 import javax.swing.text.html.HTML.Tag; 42 42 import javax.swing.text.html.HTMLDocument; 43 43 import javax.swing.text.html.HTMLEditorKit; 44 44 import javax.swing.text.html.StyleSheet; 45 import javax.swing.text.html.HTML.Tag;46 45 47 46 import org.openstreetmap.josm.Main; … … 49 48 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 50 49 import org.openstreetmap.josm.gui.MainMenu; 50 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 51 51 import org.openstreetmap.josm.tools.ImageProvider; 52 52 import org.openstreetmap.josm.tools.OpenBrowser; … … 106 106 107 107 /** the help browser */ 108 private J EditorPane help;108 private JosmEditorPane help; 109 109 110 110 /** the help browser history */ … … 166 166 167 167 protected void build() { 168 help = new J EditorPane();168 help = new JosmEditorPane(); 169 169 HTMLEditorKit kit = new HTMLEditorKit(); 170 170 kit.setStyleSheet(buildStyleSheet()); -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r5752 r5886 26 26 import javax.swing.JLabel; 27 27 import javax.swing.JPanel; 28 import javax.swing.JPasswordField;29 28 import javax.swing.JTextField; 30 29 import javax.swing.KeyStroke; … … 150 149 protected static class CredentialPanel extends JPanel { 151 150 protected JTextField tfUserName; 152 protected J PasswordField tfPassword;151 protected JosmPasswordField tfPassword; 153 152 protected JCheckBox cbSaveCredentials; 154 153 protected JMultilineLabel lblHeading; -
trunk/src/org/openstreetmap/josm/gui/io/FilenameCellEditor.java
r5266 r5886 18 18 import javax.swing.JPanel; 19 19 import javax.swing.JTable; 20 import javax.swing.JTextField;21 20 import javax.swing.event.CellEditorListener; 22 21 import javax.swing.event.ChangeEvent; … … 24 23 25 24 import org.openstreetmap.josm.actions.SaveActionBase; 25 import org.openstreetmap.josm.gui.widgets.JosmTextField; 26 26 27 27 /** … … 32 32 */ 33 33 class FilenameCellEditor extends JPanel implements TableCellEditor { 34 private J TextField tfFileName;34 private JosmTextField tfFileName; 35 35 private CopyOnWriteArrayList<CellEditorListener> listeners; 36 36 private File value; … … 47 47 gc.weightx = 1.0; 48 48 gc.weighty = 1.0; 49 add(tfFileName = new J TextField(), gc);49 add(tfFileName = new JosmTextField(), gc); 50 50 51 51 gc.gridx = 1; -
trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
r5463 r5886 22 22 import javax.swing.JPanel; 23 23 import javax.swing.JTable; 24 import javax.swing.JTextField;25 24 import javax.swing.event.CellEditorListener; 26 25 import javax.swing.event.ChangeEvent; … … 30 29 import org.openstreetmap.josm.actions.SaveActionBase; 31 30 import org.openstreetmap.josm.tools.GBC; 32 31 import org.openstreetmap.josm.gui.widgets.JosmTextField; 33 32 34 33 class LayerNameAndFilePathTableCell extends JPanel implements TableCellRenderer, TableCellEditor { … … 39 38 private final JLabel lblLayerName = new JLabel(); 40 39 private final JLabel lblFilename = new JLabel(""); 41 private final J TextField tfFilename = new JTextField();40 private final JosmTextField tfFilename = new JosmTextField(); 42 41 private final JButton btnFileChooser = new JButton(new LaunchFileChooserAction()); 43 42 -
trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
r4191 r5886 12 12 13 13 import javax.swing.BorderFactory; 14 import javax.swing.JEditorPane;15 14 import javax.swing.JLabel; 16 15 import javax.swing.JPanel; … … 22 21 23 22 import org.openstreetmap.josm.data.osm.Changeset; 23 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 24 24 import org.openstreetmap.josm.io.OsmApi; 25 25 import org.openstreetmap.josm.tools.ImageProvider; … … 28 28 private UploadStrategySpecification spec = new UploadStrategySpecification(); 29 29 private int numObjects; 30 private J EditorPane jepMessage;30 private JosmEditorPane jepMessage; 31 31 private JLabel lblWarning; 32 32 … … 103 103 104 104 protected void build() { 105 jepMessage = new J EditorPane("text/html", "");105 jepMessage = new JosmEditorPane("text/html", ""); 106 106 jepMessage.setOpaque(false); 107 107 jepMessage.setEditable(false); … … 142 142 } 143 143 144 /** 145 * Constructs a new {@code UploadParameterSummaryPanel}. 146 */ 144 147 public UploadParameterSummaryPanel() { 145 148 build(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r5266 r5886 25 25 import javax.swing.JPanel; 26 26 import javax.swing.JRadioButton; 27 import javax.swing.JTextField;28 27 import javax.swing.UIManager; 29 28 import javax.swing.event.DocumentEvent; … … 34 33 import org.openstreetmap.josm.io.OsmApi; 35 34 import org.openstreetmap.josm.tools.ImageProvider; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 37 37 /** … … 56 56 private Map<UploadStrategy, JLabel> lblNumRequests; 57 57 private Map<UploadStrategy, JMultilineLabel> lblStrategies; 58 private J TextField tfChunkSize;58 private JosmTextField tfChunkSize; 59 59 private JPanel pnlMultiChangesetPolicyPanel; 60 60 private JRadioButton rbFillOneChangeset; … … 136 136 gc.weighty = 0.0; 137 137 gc.gridwidth = 1; 138 pnl.add(tfChunkSize = new J TextField(4), gc);138 pnl.add(tfChunkSize = new JosmTextField(4), gc); 139 139 gc.gridx = 3; 140 140 gc.gridy = 2; … … 383 383 public void focusGained(FocusEvent e) { 384 384 Component c = e.getComponent(); 385 if (c instanceof J TextField) {386 J TextField tf = (JTextField)c;385 if (c instanceof JosmTextField) { 386 JosmTextField tf = (JosmTextField)c; 387 387 tf.selectAll(); 388 388 } … … 392 392 393 393 class ChunkSizeInputVerifier implements DocumentListener, PropertyChangeListener { 394 protected void setErrorFeedback(J TextField tf, String message) {394 protected void setErrorFeedback(JosmTextField tf, String message) { 395 395 tf.setBorder(BorderFactory.createLineBorder(Color.RED, 1)); 396 396 tf.setToolTipText(message); … … 398 398 } 399 399 400 protected void clearErrorFeedback(J TextField tf, String message) {400 protected void clearErrorFeedback(JosmTextField tf, String message) { 401 401 tf.setBorder(UIManager.getBorder("TextField.border")); 402 402 tf.setToolTipText(message); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r5869 r5886 38 38 import javax.swing.JPanel; 39 39 import javax.swing.JScrollPane; 40 import javax.swing.JTextArea;41 40 42 41 import org.openstreetmap.josm.Main; … … 79 78 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor; 80 79 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 80 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 81 81 import org.openstreetmap.josm.tools.DateUtils; 82 82 import org.openstreetmap.josm.tools.FilteredCollection; … … 697 697 JPanel p = new JPanel(new GridBagLayout()); 698 698 p.add(new JLabel(tr("Following problems found:")), GBC.eol()); 699 J TextArea info = new JTextArea(result, 20, 60);699 JosmTextArea info = new JosmTextArea(result, 20, 60); 700 700 info.setCaretPosition(0); 701 701 info.setEditable(false); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r5679 r5886 53 53 import javax.swing.JSeparator; 54 54 import javax.swing.JSlider; 55 import javax.swing.JTextField;56 55 import javax.swing.ListSelectionModel; 57 56 import javax.swing.SwingConstants; … … 81 80 import org.openstreetmap.josm.tools.PrimaryDateParser; 82 81 import org.xml.sax.SAXException; 82 import org.openstreetmap.josm.gui.widgets.JosmTextField; 83 83 84 84 /** This class displays the window to select the GPX file and the offset (timezone + delta). … … 119 119 JPanel outerPanel; 120 120 JosmComboBox cbGpx; 121 J TextField tfTimezone;122 J TextField tfOffset;121 JosmTextField tfTimezone; 122 JosmTextField tfOffset; 123 123 JCheckBox cbExifImg; 124 124 JCheckBox cbTaggedImg; … … 224 224 JPanel panel; 225 225 JLabel lbExifTime; 226 J TextField tfGpsTime;226 JosmTextField tfGpsTime; 227 227 JosmComboBox cbTimezones; 228 228 ImageDisplay imgDisp; … … 269 269 panelTf.add(new JLabel(tr("Gps time (read from the above photo): ")), gc); 270 270 271 tfGpsTime = new J TextField(12);271 tfGpsTime = new JosmTextField(12); 272 272 tfGpsTime.setEnabled(false); 273 273 tfGpsTime.setMinimumSize(new Dimension(155, tfGpsTime.getMinimumSize().height)); … … 495 495 } 496 496 497 tfTimezone = new J TextField(10);497 tfTimezone = new JosmTextField(10); 498 498 tfTimezone.setText(formatTimezone(timezone)); 499 499 … … 505 505 delta = delta / 1000; // milliseconds -> seconds 506 506 507 tfOffset = new J TextField(10);507 tfOffset = new JosmTextField(10); 508 508 tfOffset.setText(Long.toString(delta)); 509 509 -
trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java
r3530 r5886 11 11 import javax.swing.JLabel; 12 12 import javax.swing.JPanel; 13 import javax.swing.JTextField;14 13 15 14 import org.openstreetmap.josm.data.oauth.OAuthToken; 16 15 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; 16 import org.openstreetmap.josm.gui.widgets.JosmTextField; 17 17 18 18 /** … … 22 22 public class AccessTokenInfoPanel extends JPanel { 23 23 24 private J TextField tfAccessTokenKey;25 private J TextField tfAccessTokenSecret;24 private JosmTextField tfAccessTokenKey; 25 private JosmTextField tfAccessTokenSecret; 26 26 private JCheckBox cbSaveAccessTokenInPreferences; 27 27 … … 39 39 gc.gridx = 1; 40 40 gc.weightx = 1.0; 41 add(tfAccessTokenKey = new J TextField(), gc);41 add(tfAccessTokenKey = new JosmTextField(), gc); 42 42 tfAccessTokenKey.setEditable(false); 43 43 … … 51 51 gc.gridx = 1; 52 52 gc.weightx = 1.0; 53 add(tfAccessTokenSecret = new J TextField(), gc);53 add(tfAccessTokenSecret = new JosmTextField(), gc); 54 54 tfAccessTokenSecret.setEditable(false); 55 55 -
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r5422 r5886 15 15 import javax.swing.JLabel; 16 16 import javax.swing.JOptionPane; 17 import javax.swing.JTextField;18 17 19 18 import org.openstreetmap.josm.data.Preferences; … … 26 25 import org.openstreetmap.josm.tools.CheckParameterUtil; 27 26 import org.openstreetmap.josm.tools.ImageProvider; 27 import org.openstreetmap.josm.gui.widgets.JosmTextField; 28 28 29 29 /** … … 41 41 42 42 private JCheckBox cbUseDefaults; 43 private J TextField tfConsumerKey;44 private J TextField tfConsumerSecret;45 private J TextField tfRequestTokenURL;46 private J TextField tfAccessTokenURL;47 private J TextField tfAuthoriseURL;43 private JosmTextField tfConsumerKey; 44 private JosmTextField tfConsumerSecret; 45 private JosmTextField tfRequestTokenURL; 46 private JosmTextField tfAccessTokenURL; 47 private JosmTextField tfAuthoriseURL; 48 48 private UseDefaultItemListener ilUseDefault; 49 49 private String apiUrl; … … 70 70 gc.gridx = 1; 71 71 gc.weightx = 1.0; 72 add(tfConsumerKey = new J TextField(), gc);72 add(tfConsumerKey = new JosmTextField(), gc); 73 73 SelectAllOnFocusGainedDecorator.decorate(tfConsumerKey); 74 74 … … 81 81 gc.gridx = 1; 82 82 gc.weightx = 1.0; 83 add(tfConsumerSecret = new J TextField(), gc);83 add(tfConsumerSecret = new JosmTextField(), gc); 84 84 SelectAllOnFocusGainedDecorator.decorate(tfConsumerSecret); 85 85 … … 92 92 gc.gridx = 1; 93 93 gc.weightx = 1.0; 94 add(tfRequestTokenURL = new J TextField(), gc);94 add(tfRequestTokenURL = new JosmTextField(), gc); 95 95 SelectAllOnFocusGainedDecorator.decorate(tfRequestTokenURL); 96 96 … … 103 103 gc.gridx = 1; 104 104 gc.weightx = 1.0; 105 add(tfAccessTokenURL = new J TextField(), gc);105 add(tfAccessTokenURL = new JosmTextField(), gc); 106 106 SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenURL); 107 107 … … 115 115 gc.gridx = 1; 116 116 gc.weightx = 1.0; 117 add(tfAuthoriseURL = new J TextField(), gc);117 add(tfAuthoriseURL = new JosmTextField(), gc); 118 118 SelectAllOnFocusGainedDecorator.decorate(tfAuthoriseURL); 119 119 … … 177 177 protected void setChildComponentsEnabled(boolean enabled){ 178 178 for (Component c: getComponents()) { 179 if (c instanceof J TextField || c instanceof JLabel) {179 if (c instanceof JosmTextField || c instanceof JLabel) { 180 180 c.setEnabled(enabled); 181 181 } -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
r5752 r5886 13 13 import java.awt.event.ActionEvent; 14 14 import java.io.IOException; 15 import java.net.Authenticator.RequestorType; 15 16 import java.net.PasswordAuthentication; 16 import java.net.Authenticator.RequestorType;17 17 18 18 import javax.swing.AbstractAction; … … 21 21 import javax.swing.JOptionPane; 22 22 import javax.swing.JPanel; 23 import javax.swing.JPasswordField;24 23 import javax.swing.JTabbedPane; 25 import javax.swing.JTextField;26 24 import javax.swing.event.DocumentEvent; 27 25 import javax.swing.event.DocumentListener; … … 41 39 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 42 40 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 41 import org.openstreetmap.josm.gui.widgets.JosmTextField; 43 42 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 44 43 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel; … … 59 58 public class FullyAutomaticAuthorizationUI extends AbstractAuthorizationUI { 60 59 61 private J TextField tfUserName;62 private J PasswordField tfPassword;60 private JosmTextField tfUserName; 61 private JosmPasswordField tfPassword; 63 62 private UserNameValidator valUserName; 64 63 private PasswordValidator valPassword; … … 116 115 gc.gridx = 1; 117 116 gc.weightx = 1.0; 118 pnl.add(tfUserName = new J TextField(), gc);117 pnl.add(tfUserName = new JosmTextField(), gc); 119 118 SelectAllOnFocusGainedDecorator.decorate(tfUserName); 120 119 valUserName = new UserNameValidator(tfUserName); -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
r5752 r5886 12 12 import javax.swing.JLabel; 13 13 import javax.swing.JPanel; 14 import javax.swing.JPasswordField;15 import javax.swing.JTextField;16 14 import javax.swing.text.JTextComponent; 17 15 18 16 import org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator; 19 17 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 18 import org.openstreetmap.josm.gui.widgets.JosmTextField; 20 19 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 21 20 22 21 public class FullyAutomaticPropertiesPanel extends JPanel { 23 22 24 private J TextField tfUserName;25 private J PasswordField tfPassword;23 private JosmTextField tfUserName; 24 private JosmPasswordField tfPassword; 26 25 private UserNameValidator valUserName; 27 26 … … 43 42 gc.gridx = 1; 44 43 gc.weightx = 1.0; 45 pnl.add(tfUserName = new J TextField(), gc);44 pnl.add(tfUserName = new JosmTextField(), gc); 46 45 SelectAllOnFocusGainedDecorator.decorate(tfUserName); 47 46 valUserName = new UserNameValidator(tfUserName); -
trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
r5422 r5886 19 19 import javax.swing.JPanel; 20 20 import javax.swing.JTabbedPane; 21 import javax.swing.JTextField;22 21 import javax.swing.event.DocumentEvent; 23 22 import javax.swing.event.DocumentListener; … … 32 31 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 33 32 import org.openstreetmap.josm.tools.ImageProvider; 33 import org.openstreetmap.josm.gui.widgets.JosmTextField; 34 34 35 35 /** … … 41 41 public class ManualAuthorizationUI extends AbstractAuthorizationUI{ 42 42 43 private J TextField tfAccessTokenKey;43 private JosmTextField tfAccessTokenKey; 44 44 private AccessTokenKeyValidator valAccessTokenKey; 45 private J TextField tfAccessTokenSecret;45 private JosmTextField tfAccessTokenSecret; 46 46 private AccessTokenSecretValidator valAccessTokenSecret; 47 47 private JCheckBox cbSaveToPreferences; … … 76 76 gc.gridx = 1; 77 77 gc.weightx = 1.0; 78 pnl.add(tfAccessTokenKey = new J TextField(), gc);78 pnl.add(tfAccessTokenKey = new JosmTextField(), gc); 79 79 SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenKey); 80 80 valAccessTokenKey = new AccessTokenKeyValidator(tfAccessTokenKey); … … 90 90 gc.gridx = 1; 91 91 gc.weightx = 1.0; 92 pnl.add(tfAccessTokenSecret = new J TextField(), gc);92 pnl.add(tfAccessTokenSecret = new JosmTextField(), gc); 93 93 SelectAllOnFocusGainedDecorator.decorate(tfAccessTokenSecret); 94 94 valAccessTokenSecret = new AccessTokenSecretValidator(tfAccessTokenSecret); -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
r5422 r5886 20 20 import javax.swing.JLabel; 21 21 import javax.swing.JPanel; 22 import javax.swing.JTextField;23 22 import javax.swing.SwingUtilities; 24 23 … … 31 30 import org.openstreetmap.josm.tools.ImageProvider; 32 31 import org.openstreetmap.josm.tools.OpenBrowser; 32 import org.openstreetmap.josm.gui.widgets.JosmTextField; 33 33 34 34 /** … … 207 207 private class RetrieveAccessTokenPanel extends JPanel { 208 208 209 private J TextField tfAuthoriseUrl;209 private JosmTextField tfAuthoriseUrl; 210 210 211 211 protected JPanel buildTitlePanel() { … … 246 246 gc.gridx = 1; 247 247 gc.weightx = 1.0; 248 pnl.add(tfAuthoriseUrl = new J TextField(), gc);248 pnl.add(tfAuthoriseUrl = new JosmTextField(), gc); 249 249 tfAuthoriseUrl.setEditable(false); 250 250 -
trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java
r4976 r5886 10 10 import javax.swing.JLabel; 11 11 import javax.swing.JPanel; 12 import javax.swing.JTextField;13 12 14 13 import org.openstreetmap.josm.Main; 15 14 import org.openstreetmap.josm.tools.GBC; 15 import org.openstreetmap.josm.gui.widgets.JosmTextField; 16 16 17 17 /* … … 50 50 private JCheckBox audioMarkersFromStart = new JCheckBox(tr("Start of track (will always do this if no other markers available).")); 51 51 52 private J TextField audioLeadIn = new JTextField(8);53 private J TextField audioForwardBackAmount = new JTextField(8);54 private J TextField audioFastForwardMultiplier = new JTextField(8);55 private J TextField audioCalibration = new JTextField(8);52 private JosmTextField audioLeadIn = new JosmTextField(8); 53 private JosmTextField audioForwardBackAmount = new JosmTextField(8); 54 private JosmTextField audioFastForwardMultiplier = new JosmTextField(8); 55 private JosmTextField audioCalibration = new JosmTextField(8); 56 56 57 57 public void addGui(PreferenceTabbedPane gui) { -
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r5723 r5886 30 30 import javax.swing.JScrollPane; 31 31 import javax.swing.JTabbedPane; 32 import javax.swing.JTextField;33 32 import javax.swing.SwingUtilities; 34 33 import javax.swing.UIManager; … … 53 52 import org.openstreetmap.josm.tools.GBC; 54 53 import org.openstreetmap.josm.tools.ImageProvider; 54 import org.openstreetmap.josm.gui.widgets.JosmTextField; 55 55 56 56 public class PluginPreference extends DefaultTabPreferenceSetting { … … 98 98 } 99 99 100 private J TextField tfFilter;100 private JosmTextField tfFilter; 101 101 private PluginListPanel pnlPluginPreferences; 102 102 private PluginPreferencesModel model; … … 123 123 gc.gridx = 1; 124 124 gc.weightx = 1.0; 125 pnl.add(tfFilter = new J TextField(), gc);125 pnl.add(tfFilter = new JosmTextField(), gc); 126 126 tfFilter.setToolTipText(tr("Enter a search expression")); 127 127 SelectAllOnFocusGainedDecorator.decorate(tfFilter); -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r5874 r5886 59 59 import javax.swing.JSeparator; 60 60 import javax.swing.JTable; 61 import javax.swing.JTextField;62 61 import javax.swing.JToolBar; 63 62 import javax.swing.KeyStroke; … … 74 73 import javax.swing.table.DefaultTableCellRenderer; 75 74 import javax.swing.table.TableCellEditor; 76 import javax.swing.table.TableCellRenderer;77 75 78 76 import org.openstreetmap.josm.Main; … … 85 83 import org.openstreetmap.josm.gui.util.TableHelper; 86 84 import org.openstreetmap.josm.gui.widgets.JFileChooserManager; 85 import org.openstreetmap.josm.gui.widgets.JosmTextField; 87 86 import org.openstreetmap.josm.io.MirroredInputStream; 88 87 import org.openstreetmap.josm.io.OsmTransferException; … … 680 679 protected class EditSourceEntryDialog extends ExtendedDialog { 681 680 682 private J TextField tfTitle;683 private J TextField tfURL;681 private JosmTextField tfTitle; 682 private JosmTextField tfURL; 684 683 private JCheckBox cbActive; 685 684 … … 691 690 JPanel p = new JPanel(new GridBagLayout()); 692 691 693 tfTitle = new J TextField(60);692 tfTitle = new JosmTextField(60); 694 693 p.add(new JLabel(tr("Name (optional):")), GBC.std().insets(15, 0, 5, 5)); 695 694 p.add(tfTitle, GBC.eol().insets(0, 0, 5, 5)); 696 695 697 tfURL = new J TextField(60);696 tfURL = new JosmTextField(60); 698 697 p.add(new JLabel(tr("URL / File:")), GBC.std().insets(15, 0, 5, 0)); 699 698 p.add(tfURL, GBC.std().insets(0, 0, 5, 5)); … … 1318 1317 1319 1318 class FileOrUrlCellEditor extends JPanel implements TableCellEditor { 1320 private J TextField tfFileName;1319 private JosmTextField tfFileName; 1321 1320 private CopyOnWriteArrayList<CellEditorListener> listeners; 1322 1321 private String value; … … 1334 1333 gc.weightx = 1.0; 1335 1334 gc.weighty = 1.0; 1336 add(tfFileName = new J TextField(), gc);1335 add(tfFileName = new JosmTextField(), gc); 1337 1336 1338 1337 gc.gridx = 1; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r5590 r5886 34 34 import javax.swing.JScrollPane; 35 35 import javax.swing.JTable; 36 import javax.swing.JTextField;37 36 import javax.swing.event.DocumentEvent; 38 37 import javax.swing.event.DocumentListener; … … 56 55 import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory; 57 56 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 57 import org.openstreetmap.josm.gui.widgets.JosmTextField; 58 58 import org.openstreetmap.josm.tools.CheckParameterUtil; 59 59 import org.openstreetmap.josm.tools.GBC; … … 144 144 protected List<PrefEntry> data; 145 145 protected List<PrefEntry> displayData; 146 protected J TextField txtFilter;146 protected JosmTextField txtFilter; 147 147 148 148 public void addGui(final PreferenceTabbedPane gui) { 149 149 JPanel p = gui.createPreferenceTab(this); 150 150 151 txtFilter = new J TextField();151 txtFilter = new JosmTextField(); 152 152 JLabel lbFilter = new JLabel(tr("Search: ")); 153 153 lbFilter.setLabelFor(txtFilter); … … 453 453 private static class SettingCellEditor extends DefaultCellEditor { 454 454 public SettingCellEditor() { 455 super(new J TextField());455 super(new JosmTextField()); 456 456 } 457 457 … … 523 523 JPanel p = new JPanel(new GridBagLayout()); 524 524 p.add(new JLabel(tr("Key")), GBC.std().insets(0,0,5,0)); 525 J TextField tkey = new JTextField("", 50);525 JosmTextField tkey = new JosmTextField("", 50); 526 526 p.add(tkey, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL)); 527 527 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
r4634 r5886 14 14 import javax.swing.JScrollPane; 15 15 import javax.swing.JTable; 16 import javax.swing.JTextField;17 16 import javax.swing.table.AbstractTableModel; 18 17 … … 21 20 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 22 21 import org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference.PrefEntry; 22 import org.openstreetmap.josm.gui.widgets.JosmTextField; 23 23 import org.openstreetmap.josm.tools.GBC; 24 24 import org.openstreetmap.josm.tools.WindowGeometry; … … 55 55 table.setTableHeader(null); 56 56 57 DefaultCellEditor editor = new DefaultCellEditor(new J TextField());57 DefaultCellEditor editor = new DefaultCellEditor(new JosmTextField()); 58 58 editor.setClickCountToStart(1); 59 59 table.setDefaultEditor(table.getColumnClass(0), editor); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java
r4634 r5886 19 19 import javax.swing.JScrollPane; 20 20 import javax.swing.JTable; 21 import javax.swing.JTextField;22 21 import javax.swing.JToolBar; 23 22 import javax.swing.event.ListSelectionEvent; 24 23 import javax.swing.event.ListSelectionListener; 24 import javax.swing.table.AbstractTableModel; 25 25 import javax.swing.table.TableCellEditor; 26 import javax.swing.table.AbstractTableModel;27 26 28 27 import org.openstreetmap.josm.data.Preferences.ListListSetting; … … 30 29 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 31 30 import org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference.PrefEntry; 31 import org.openstreetmap.josm.gui.widgets.JosmTextField; 32 32 import org.openstreetmap.josm.tools.GBC; 33 33 import org.openstreetmap.josm.tools.ImageProvider; … … 95 95 table.setTableHeader(null); 96 96 97 DefaultCellEditor editor = new DefaultCellEditor(new J TextField());97 DefaultCellEditor editor = new DefaultCellEditor(new JosmTextField()); 98 98 editor.setClickCountToStart(1); 99 99 table.setDefaultEditor(table.getColumnClass(0), editor); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
r5590 r5886 23 23 import javax.swing.JScrollPane; 24 24 import javax.swing.JTable; 25 import javax.swing.JTextField;26 25 import javax.swing.JToolBar; 27 26 import javax.swing.event.ListSelectionEvent; 28 27 import javax.swing.event.ListSelectionListener; 28 import javax.swing.table.AbstractTableModel; 29 29 import javax.swing.table.TableCellEditor; 30 import javax.swing.table.AbstractTableModel;31 30 32 31 import org.openstreetmap.josm.data.Preferences.MapListSetting; … … 34 33 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 35 34 import org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference.PrefEntry; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 import org.openstreetmap.josm.tools.GBC; 37 37 import org.openstreetmap.josm.tools.ImageProvider; … … 117 117 table.getTableHeader().getColumnModel().getColumn(0).setHeaderValue(tr("Key")); 118 118 table.getTableHeader().getColumnModel().getColumn(1).setHeaderValue(tr("Value")); 119 DefaultCellEditor editor = new DefaultCellEditor(new J TextField());119 DefaultCellEditor editor = new DefaultCellEditor(new JosmTextField()); 120 120 editor.setClickCountToStart(1); 121 121 table.setDefaultEditor(table.getColumnClass(0), editor); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java
r4634 r5886 8 8 import javax.swing.JLabel; 9 9 import javax.swing.JPanel; 10 import javax.swing.JTextField;11 10 12 11 import org.openstreetmap.josm.data.Preferences.StringSetting; … … 14 13 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 15 14 import org.openstreetmap.josm.gui.preferences.advanced.AdvancedPreference.PrefEntry; 15 import org.openstreetmap.josm.gui.widgets.JosmTextField; 16 16 import org.openstreetmap.josm.tools.GBC; 17 17 … … 19 19 20 20 PrefEntry entry; 21 J TextField tvalue;21 JosmTextField tvalue; 22 22 23 23 public StringEditor(final PreferenceTabbedPane gui, PrefEntry entry, StringSetting setting) { … … 37 37 38 38 p.add(new JLabel(tr("Value: ")), GBC.std()); 39 tvalue = new J TextField(orig, 50);39 tvalue = new JosmTextField(orig, 50); 40 40 p.add(tvalue, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL)); 41 41 -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r5568 r5886 17 17 import javax.swing.JPanel; 18 18 import javax.swing.JRadioButton; 19 import javax.swing.JTextField;20 19 import javax.swing.event.ChangeEvent; 21 20 import javax.swing.event.ChangeListener; … … 30 29 import org.openstreetmap.josm.tools.template_engine.ParseError; 31 30 import org.openstreetmap.josm.tools.template_engine.TemplateParser; 31 import org.openstreetmap.josm.gui.widgets.JosmTextField; 32 32 33 33 public class GPXSettingsPanel extends JPanel implements ValidationListener { … … 45 45 private JRadioButton drawRawGpsLinesNone = new JRadioButton(tr("None")); 46 46 private ActionListener drawRawGpsLinesActionListener; 47 private J TextField drawRawGpsMaxLineLength = new JTextField(8);48 private J TextField drawRawGpsMaxLineLengthLocal = new JTextField(8);49 private J TextField drawLineWidth = new JTextField(2);47 private JosmTextField drawRawGpsMaxLineLength = new JosmTextField(8); 48 private JosmTextField drawRawGpsMaxLineLengthLocal = new JosmTextField(8); 49 private JosmTextField drawLineWidth = new JosmTextField(2); 50 50 private JCheckBox forceRawGpsLines = new JCheckBox(tr("Force lines if no segments imported")); 51 51 private JCheckBox largeGpsPoints = new JCheckBox(tr("Draw large GPS points")); … … 62 62 private JCheckBox drawGpsArrows = new JCheckBox(tr("Draw Direction Arrows")); 63 63 private JCheckBox drawGpsArrowsFast = new JCheckBox(tr("Fast drawing (looks uglier)")); 64 private J TextField drawGpsArrowsMinDist = new JTextField(8);64 private JosmTextField drawGpsArrowsMinDist = new JosmTextField(8); 65 65 private JCheckBox colorDynamic = new JCheckBox(tr("Dynamic color range based on data limits")); 66 66 private JosmComboBox waypointLabel = new JosmComboBox(LABEL_PATTERN_DESC); 67 private J TextField waypointLabelPattern = new JTextField();67 private JosmTextField waypointLabelPattern = new JosmTextField(); 68 68 private JosmComboBox audioWaypointLabel = new JosmComboBox(LABEL_PATTERN_DESC); 69 private J TextField audioWaypointLabelPattern = new JTextField();69 private JosmTextField audioWaypointLabelPattern = new JosmTextField(); 70 70 private JCheckBox useGpsAntialiasing = new JCheckBox(tr("Smooth GPX graphics (antialiasing)")); 71 71 … … 422 422 } 423 423 424 private void updateWaypointLabelCombobox(JosmComboBox cb, J TextField tf, TemplateEntryProperty property) {424 private void updateWaypointLabelCombobox(JosmComboBox cb, JosmTextField tf, TemplateEntryProperty property) { 425 425 String labelPattern = property.getAsString(); 426 426 boolean found = false; … … 439 439 } 440 440 441 private void updateWaypointPattern(JosmComboBox cb, J TextField tf) {441 private void updateWaypointPattern(JosmComboBox cb, JosmTextField tf) { 442 442 if (cb.getSelectedIndex() == WAYPOINT_LABEL_CUSTOM) { 443 443 tf.setEnabled(true); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
r5731 r5886 9 9 import javax.swing.AbstractButton; 10 10 import javax.swing.JPanel; 11 import javax.swing.JTextArea;12 import javax.swing.JTextField;13 11 import javax.swing.event.ChangeEvent; 14 12 import javax.swing.event.ChangeListener; … … 18 16 19 17 import org.openstreetmap.josm.data.imagery.ImageryInfo; 18 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 19 import org.openstreetmap.josm.gui.widgets.JosmTextField; 20 20 21 21 /** … … 27 27 public abstract class AddImageryPanel extends JPanel { 28 28 29 protected final J TextArea rawUrl = new JTextArea(3, 40);30 protected final J TextField name = new JTextField();29 protected final JosmTextArea rawUrl = new JosmTextArea(3, 40); 30 protected final JosmTextField name = new JosmTextField(); 31 31 32 32 protected final Collection<ContentValidationListener> listeners = new ArrayList<ContentValidationListener>(); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
r5731 r5886 10 10 11 11 import javax.swing.JLabel; 12 import javax.swing.JTextArea;13 import javax.swing.JTextField;14 12 import javax.swing.text.View; 15 13 16 14 import org.openstreetmap.josm.data.imagery.ImageryInfo; 15 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 16 import org.openstreetmap.josm.gui.widgets.JosmTextField; 17 17 import org.openstreetmap.josm.tools.GBC; 18 18 import org.openstreetmap.josm.tools.Utils; … … 20 20 public class AddTMSLayerPanel extends AddImageryPanel { 21 21 22 private final J TextField tmsZoom = new JTextField();23 private final J TextArea tmsUrl = new JTextArea(3, 40);22 private final JosmTextField tmsZoom = new JosmTextField(); 23 private final JosmTextArea tmsUrl = new JosmTextArea(3, 40); 24 24 private final KeyAdapter keyAdapter = new KeyAdapter() { 25 25 @Override … … 29 29 }; 30 30 31 /** 32 * Constructs a new {@code AddTMSLayerPanel}. 33 */ 31 34 public AddTMSLayerPanel() { 32 35 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r5731 r5886 18 18 import javax.swing.JOptionPane; 19 19 import javax.swing.JScrollPane; 20 import javax.swing.JTextArea;21 20 22 21 import org.openstreetmap.josm.data.imagery.ImageryInfo; 23 22 import org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser; 23 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 24 24 import org.openstreetmap.josm.io.imagery.WMSImagery; 25 25 import org.openstreetmap.josm.tools.GBC; … … 32 32 private final WMSLayerTree tree = new WMSLayerTree(); 33 33 private final JLabel wmsInstruction; 34 private final J TextArea wmsUrl = new JTextArea(3, 40);34 private final JosmTextArea wmsUrl = new JosmTextArea(3, 40); 35 35 private final JButton showBounds = new JButton(tr("Show bounds")); 36 36 37 /** 38 * Constructs a new {@code AddWMSLayerPanel}. 39 */ 37 40 public AddWMSLayerPanel() { 38 41 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r5733 r5886 29 29 import javax.swing.Box; 30 30 import javax.swing.JButton; 31 import javax.swing.JEditorPane;32 31 import javax.swing.JLabel; 33 32 import javax.swing.JOptionPane; … … 62 61 import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory; 63 62 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 63 import org.openstreetmap.josm.gui.widgets.JosmEditorPane; 64 64 import org.openstreetmap.josm.tools.GBC; 65 65 import org.openstreetmap.josm.tools.ImageProvider; … … 663 663 try { 664 664 url = new URL(eulaUrl.replaceAll("\\{lang\\}", LanguageInfo.getWikiLanguagePrefix())); 665 J EditorPane htmlPane = null;665 JosmEditorPane htmlPane = null; 666 666 try { 667 htmlPane = new J EditorPane(url);667 htmlPane = new JosmEditorPane(url); 668 668 } catch (IOException e1) { 669 669 // give a second chance with a default Locale 'en' 670 670 try { 671 671 url = new URL(eulaUrl.replaceAll("\\{lang\\}", "")); 672 htmlPane = new J EditorPane(url);672 htmlPane = new JosmEditorPane(url); 673 673 } catch (IOException e2) { 674 674 JOptionPane.showMessageDialog(gui ,tr("EULA license URL not available: {0}", eulaUrl)); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java
r5465 r5886 10 10 import javax.swing.JPanel; 11 11 import javax.swing.JSpinner; 12 import javax.swing.JTextField;13 12 import javax.swing.SpinnerNumberModel; 14 13 15 14 import org.openstreetmap.josm.gui.layer.TMSLayer; 16 15 import org.openstreetmap.josm.tools.GBC; 16 import org.openstreetmap.josm.gui.widgets.JosmTextField; 17 17 18 18 /** … … 28 28 private final JSpinner maxZoomLvl; 29 29 private final JCheckBox addToSlippyMapChosser = new JCheckBox(); 30 private final J TextField tilecacheDir = new JTextField();30 private final JosmTextField tilecacheDir = new JosmTextField(); 31 31 32 32 /** -
trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
r5631 r5886 15 15 import javax.swing.JScrollPane; 16 16 import javax.swing.JSeparator; 17 import javax.swing.JTextField;18 17 19 18 import org.openstreetmap.josm.data.AutosaveTask; … … 26 25 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel; 27 26 import org.openstreetmap.josm.tools.GBC; 27 import org.openstreetmap.josm.gui.widgets.JosmTextField; 28 28 29 29 public class BackupPreference implements SubPreferenceSetting { … … 38 38 private JCheckBox keepBackup; 39 39 private JCheckBox autosave; 40 private final J TextField autosaveInterval = new JTextField(8);41 private final J TextField backupPerLayer = new JTextField(8);40 private final JosmTextField autosaveInterval = new JosmTextField(8); 41 private final JosmTextField backupPerLayer = new JosmTextField(8); 42 42 43 43 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
r5511 r5886 15 15 import javax.swing.JPanel; 16 16 import javax.swing.JRadioButton; 17 import javax.swing.JTextField;18 17 import javax.swing.event.ChangeEvent; 19 18 import javax.swing.event.ChangeListener; … … 23 22 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 24 23 import org.openstreetmap.josm.plugins.PluginHandler; 24 import org.openstreetmap.josm.gui.widgets.JosmTextField; 25 25 26 26 /** … … 59 59 private Map<Policy, JRadioButton> rbVersionBasedUpatePolicy; 60 60 private Map<Policy, JRadioButton> rbTimeBasedUpatePolicy; 61 private J TextField tfUpdateInterval;61 private JosmTextField tfUpdateInterval; 62 62 private JLabel lblUpdateInterval; 63 63 … … 96 96 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT)); 97 97 pnl.add(lblUpdateInterval = new JLabel(tr("Update interval (in days):"))); 98 pnl.add(tfUpdateInterval = new J TextField(5));98 pnl.add(tfUpdateInterval = new JosmTextField(5)); 99 99 SelectAllOnFocusGainedDecorator.decorate(tfUpdateInterval); 100 100 return pnl; -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java
r5634 r5886 19 19 import javax.swing.JPanel; 20 20 import javax.swing.JScrollPane; 21 import javax.swing.JTextField;22 21 import javax.swing.event.DocumentEvent; 23 22 import javax.swing.event.DocumentListener; … … 28 27 import org.openstreetmap.josm.data.projection.Projections; 29 28 import org.openstreetmap.josm.tools.GBC; 29 import org.openstreetmap.josm.gui.widgets.JosmTextField; 30 30 31 31 /** … … 42 42 private class CodeSelectionPanel extends JPanel implements ListSelectionListener, DocumentListener { 43 43 44 public J TextField filter;44 public JosmTextField filter; 45 45 private ProjectionCodeListModel model; 46 46 public JList selectionList; … … 108 108 109 109 private void build() { 110 filter = new J TextField(30);110 filter = new JosmTextField(30); 111 111 filter.setColumns(10); 112 112 filter.getDocument().addDocumentListener(this); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r5634 r5886 21 21 import javax.swing.JLabel; 22 22 import javax.swing.JPanel; 23 import javax.swing.JTextField;24 23 import javax.swing.plaf.basic.BasicComboBoxEditor; 25 24 … … 37 36 import org.openstreetmap.josm.tools.ImageProvider; 38 37 import org.openstreetmap.josm.tools.Utils; 38 import org.openstreetmap.josm.gui.widgets.JosmTextField; 39 39 40 40 public class CustomProjectionChoice extends AbstractProjectionChoice implements SubPrefsOptions { … … 48 48 private static class PreferencePanel extends JPanel { 49 49 50 public J TextField input;50 public JosmTextField input; 51 51 private HistoryComboBox cbInput; 52 52 … … 56 56 57 57 private void build(String initialText, final ActionListener listener) { 58 input = new J TextField(30);58 input = new JosmTextField(30); 59 59 cbInput = new HistoryComboBox(); 60 60 cbInput.setPrototypeDisplayValue(new AutoCompletionListItem("xxxx")); 61 61 cbInput.setEditor(new BasicComboBoxEditor() { 62 62 @Override 63 protected J TextField createEditorComponent() {63 protected JosmTextField createEditorComponent() { 64 64 return input; 65 65 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java
r5752 r5886 8 8 import java.awt.GridBagLayout; 9 9 import java.awt.Insets; 10 import java.net.Authenticator.RequestorType; 10 11 import java.net.PasswordAuthentication; 11 import java.net.Authenticator.RequestorType;12 12 13 13 import javax.swing.BorderFactory; 14 14 import javax.swing.JLabel; 15 15 import javax.swing.JPanel; 16 import javax.swing.JPasswordField;17 import javax.swing.JTextField;18 16 19 17 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 18 import org.openstreetmap.josm.gui.widgets.JosmTextField; 20 19 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 20 import org.openstreetmap.josm.io.OsmApi; 21 21 import org.openstreetmap.josm.io.auth.CredentialsAgent; 22 22 import org.openstreetmap.josm.io.auth.CredentialsAgentException; 23 23 import org.openstreetmap.josm.io.auth.CredentialsManager; 24 import org.openstreetmap.josm.io.OsmApi;25 24 26 25 /** … … 32 31 33 32 /** the OSM user name */ 34 private J TextField tfOsmUserName;33 private JosmTextField tfOsmUserName; 35 34 private UserNameValidator valUserName; 36 35 /** the OSM password */ 37 private J PasswordField tfOsmPassword;36 private JosmPasswordField tfOsmPassword; 38 37 /** a panel with further information, e.g. some warnings */ 39 38 private JPanel decorationPanel; … … 56 55 gc.gridx = 1; 57 56 gc.weightx = 1.0; 58 add(tfOsmUserName = new J TextField(), gc);57 add(tfOsmUserName = new JosmTextField(), gc); 59 58 SelectAllOnFocusGainedDecorator.decorate(tfOsmUserName); 60 59 valUserName = new UserNameValidator(tfOsmUserName); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r5422 r5886 22 22 import javax.swing.JLabel; 23 23 import javax.swing.JPanel; 24 import javax.swing.JTextField;25 24 26 25 import org.openstreetmap.josm.Main; … … 34 33 import org.openstreetmap.josm.io.auth.CredentialsManager; 35 34 import org.openstreetmap.josm.tools.ImageProvider; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 37 37 /** … … 214 214 */ 215 215 private class AlreadyAuthorisedPanel extends JPanel { 216 private J TextField tfAccessTokenKey;217 private J TextField tfAccessTokenSecret;216 private JosmTextField tfAccessTokenKey; 217 private JosmTextField tfAccessTokenSecret; 218 218 219 219 protected void build() { … … 238 238 gc.gridx = 1; 239 239 gc.weightx = 1.0; 240 add(tfAccessTokenKey = new J TextField(), gc);240 add(tfAccessTokenKey = new JosmTextField(), gc); 241 241 tfAccessTokenKey.setEditable(false); 242 242 … … 250 250 gc.gridx = 1; 251 251 gc.weightx = 1.0; 252 add(tfAccessTokenSecret = new J TextField(), gc);252 add(tfAccessTokenSecret = new JosmTextField(), gc); 253 253 tfAccessTokenSecret.setEditable(false); 254 254 -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r5422 r5886 21 21 import javax.swing.JLabel; 22 22 import javax.swing.JPanel; 23 import javax.swing.JTextField;24 23 import javax.swing.SwingUtilities; 25 24 import javax.swing.event.DocumentEvent; … … 34 33 import org.openstreetmap.josm.io.OsmApi; 35 34 import org.openstreetmap.josm.tools.ImageProvider; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 37 37 public class OsmApiUrlInputPanel extends JPanel { … … 40 40 private JLabel lblValid; 41 41 private JLabel lblApiUrl; 42 private J TextField tfOsmServerUrl;42 private JosmTextField tfOsmServerUrl; 43 43 private ApiUrlValidator valOsmServerUrl; 44 44 private SideButton btnTest; … … 90 90 gc.gridx = 1; 91 91 gc.weightx = 1.0; 92 add(tfOsmServerUrl = new J TextField(), gc);92 add(tfOsmServerUrl = new JosmTextField(), gc); 93 93 SelectAllOnFocusGainedDecorator.decorate(tfOsmServerUrl); 94 94 valOsmServerUrl = new ApiUrlValidator(tfOsmServerUrl); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
r5752 r5886 12 12 import java.awt.event.ItemEvent; 13 13 import java.awt.event.ItemListener; 14 import java.net.Authenticator.RequestorType; 14 15 import java.net.PasswordAuthentication; 15 16 import java.net.ProxySelector; 16 import java.net.Authenticator.RequestorType;17 17 import java.util.HashMap; 18 18 import java.util.Map; … … 22 22 import javax.swing.JLabel; 23 23 import javax.swing.JPanel; 24 import javax.swing.JPasswordField;25 24 import javax.swing.JRadioButton; 26 import javax.swing.JTextField;27 25 28 26 import org.openstreetmap.josm.Main; … … 30 28 import org.openstreetmap.josm.gui.help.HelpUtil; 31 29 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 30 import org.openstreetmap.josm.gui.widgets.JosmTextField; 32 31 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel; 33 32 import org.openstreetmap.josm.io.DefaultProxySelector; … … 75 74 private ButtonGroup bgProxyPolicy; 76 75 private Map<ProxyPolicy, JRadioButton> rbProxyPolicy; 77 private J TextField tfProxyHttpHost;78 private J TextField tfProxyHttpPort;79 private J TextField tfProxySocksHost;80 private J TextField tfProxySocksPort;81 private J TextField tfProxyHttpUser;82 private J PasswordField tfProxyHttpPassword;76 private JosmTextField tfProxyHttpHost; 77 private JosmTextField tfProxyHttpPort; 78 private JosmTextField tfProxySocksHost; 79 private JosmTextField tfProxySocksPort; 80 private JosmTextField tfProxyHttpUser; 81 private JosmPasswordField tfProxyHttpPassword; 83 82 84 83 private JPanel pnlHttpProxyConfigurationPanel; … … 107 106 gc.gridx = 1; 108 107 gc.weightx = 1.0; 109 pnl.add(tfProxyHttpHost = new J TextField(),gc);108 pnl.add(tfProxyHttpHost = new JosmTextField(),gc); 110 109 111 110 gc.gridy = 1; … … 117 116 gc.gridx = 1; 118 117 gc.weightx = 1.0; 119 pnl.add(tfProxyHttpPort = new J TextField(5),gc);118 pnl.add(tfProxyHttpPort = new JosmTextField(5),gc); 120 119 tfProxyHttpPort.setMinimumSize(tfProxyHttpPort.getPreferredSize()); 121 120 … … 137 136 gc.gridx = 1; 138 137 gc.weightx = 1.0; 139 pnl.add(tfProxyHttpUser = new J TextField(20),gc);138 pnl.add(tfProxyHttpUser = new JosmTextField(20),gc); 140 139 tfProxyHttpUser.setMinimumSize(tfProxyHttpUser.getPreferredSize()); 141 140 … … 182 181 gc.gridx = 1; 183 182 gc.weightx = 1.0; 184 pnl.add(tfProxySocksHost = new J TextField(20),gc);183 pnl.add(tfProxySocksHost = new JosmTextField(20),gc); 185 184 186 185 gc.gridy = 1; … … 192 191 gc.gridx = 1; 193 192 gc.weightx = 1.0; 194 pnl.add(tfProxySocksPort = new J TextField(5), gc);193 pnl.add(tfProxySocksPort = new JosmTextField(5), gc); 195 194 tfProxySocksPort.setMinimumSize(tfProxySocksPort.getPreferredSize()); 196 195 -
trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
r5429 r5886 29 29 import javax.swing.JScrollPane; 30 30 import javax.swing.JTable; 31 import javax.swing.JTextField;32 31 import javax.swing.KeyStroke; 33 32 import javax.swing.ListSelectionModel; … … 48 47 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 49 48 import org.openstreetmap.josm.tools.Shortcut; 49 import org.openstreetmap.josm.gui.widgets.JosmTextField; 50 50 51 51 /** … … 138 138 JTable shortcutTable = new JTable(); 139 139 140 private J TextField filterField = new JTextField();140 private JosmTextField filterField = new JosmTextField(); 141 141 142 142 /** Creates new form prefJPanel */ -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r5874 r5886 46 46 import javax.swing.JPanel; 47 47 import javax.swing.JScrollPane; 48 import javax.swing.JTextField;49 48 import javax.swing.JToggleButton; 50 49 import javax.swing.ListCellRenderer; … … 92 91 import org.openstreetmap.josm.tools.template_engine.TemplateParser; 93 92 import org.xml.sax.SAXException; 93 import org.openstreetmap.josm.gui.widgets.JosmTextField; 94 94 95 95 96 /** … … 522 523 if (comp instanceof JosmComboBox) { 523 524 return ((JosmComboBox) comp).getEditor().getItem().toString(); 524 } else if (comp instanceof J TextField) {525 return ((J TextField) comp).getText();525 } else if (comp instanceof JosmTextField) { 526 return ((JosmTextField) comp).getText(); 526 527 } else if (comp instanceof JPanel) { 527 528 return getValue(((JPanel)comp).getComponent(0)); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSearchDialog.java
r5196 r5886 31 31 import javax.swing.JPanel; 32 32 import javax.swing.JScrollPane; 33 import javax.swing.JTextField;34 33 import javax.swing.event.DocumentEvent; 35 34 import javax.swing.event.DocumentListener; … … 50 49 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Role; 51 50 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Roles; 51 import org.openstreetmap.josm.gui.widgets.JosmTextField; 52 52 53 53 54 public class TaggingPresetSearchDialog extends ExtendedDialog implements SelectionChangedListener { … … 192 193 } 193 194 194 private J TextField edSearchText;195 private JosmTextField edSearchText; 195 196 private JList lsResult; 196 197 private JCheckBox ckOnlyApplicable; … … 239 240 content.setLayout(new BorderLayout()); 240 241 241 edSearchText = new J TextField();242 edSearchText = new JosmTextField(); 242 243 edSearchText.getDocument().addDocumentListener(new DocumentListener() { 243 244 -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
r5579 r5886 11 11 import javax.swing.ComboBoxEditor; 12 12 import javax.swing.JTable; 13 import javax.swing.JTextField;14 13 import javax.swing.event.CellEditorListener; 15 14 import javax.swing.table.TableCellEditor; … … 22 21 import org.openstreetmap.josm.Main; 23 22 import org.openstreetmap.josm.gui.util.TableCellEditorSupport; 23 import org.openstreetmap.josm.gui.widgets.JosmTextField; 24 24 25 25 26 /** … … 32 33 * 33 34 */ 34 public class AutoCompletingTextField extends J TextField implements ComboBoxEditor, TableCellEditor {35 public class AutoCompletingTextField extends JosmTextField implements ComboBoxEditor, TableCellEditor { 35 36 36 37 private Integer maxChars; -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java
r5765 r5886 2 2 package org.openstreetmap.josm.gui.widgets; 3 3 4 import javax.swing.JTextField;5 4 import javax.swing.text.JTextComponent; 6 5 6 import org.openstreetmap.josm.gui.widgets.JosmTextField; 7 7 import org.openstreetmap.josm.tools.Utils; 8 8 … … 13 13 * @since 5765 14 14 */ 15 public abstract class AbstractIdTextField<T extends AbstractTextComponentValidator> extends J TextField {15 public abstract class AbstractIdTextField<T extends AbstractTextComponentValidator> extends JosmTextField { 16 16 17 17 protected final T validator; -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
r5266 r5886 11 11 12 12 import javax.swing.BorderFactory; 13 import javax.swing.JTextField;14 13 import javax.swing.UIManager; 15 14 import javax.swing.border.Border; … … 20 19 import org.openstreetmap.josm.tools.CheckParameterUtil; 21 20 import org.openstreetmap.josm.tools.Utils; 21 import org.openstreetmap.josm.gui.widgets.JosmTextField; 22 22 23 23 /** … … 110 110 } 111 111 if (addActionListener) { 112 if (tc instanceof J TextField) {113 J TextField tf = (JTextField)tc;112 if (tc instanceof JosmTextField) { 113 JosmTextField tf = (JosmTextField)tc; 114 114 tf.addActionListener(this); 115 115 } -
trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
r5544 r5886 19 19 import javax.swing.JPanel; 20 20 import javax.swing.JPopupMenu; 21 import javax.swing.JTextField;22 21 import javax.swing.event.DocumentEvent; 23 22 import javax.swing.event.DocumentListener; … … 32 31 import org.openstreetmap.josm.tools.OsmUrlToBounds; 33 32 import org.openstreetmap.josm.tools.Utils; 33 import org.openstreetmap.josm.gui.widgets.JosmTextField; 34 34 35 35 /** … … 39 39 public class BoundingBoxSelectionPanel extends JPanel { 40 40 41 private J TextField[] tfLatLon = null;42 private final J TextField tfOsmUrl = new JTextField();41 private JosmTextField[] tfLatLon = null; 42 private final JosmTextField tfOsmUrl = new JosmTextField(); 43 43 44 44 protected void buildInputFields() { 45 tfLatLon = new J TextField[4];45 tfLatLon = new JosmTextField[4]; 46 46 for(int i=0; i< 4; i++) { 47 tfLatLon[i] = new J TextField(11);48 tfLatLon[i].setMinimumSize(new Dimension(100,new J TextField().getMinimumSize().height));47 tfLatLon[i] = new JosmTextField(11); 48 tfLatLon[i].setMinimumSize(new Dimension(100,new JosmTextField().getMinimumSize().height)); 49 49 SelectAllOnFocusGainedDecorator.decorate(tfLatLon[i]); 50 50 } -
trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java
r5696 r5886 12 12 import javax.swing.JMenu; 13 13 import javax.swing.JMenuItem; 14 import javax.swing.JTextField;15 14 import javax.swing.KeyStroke; 16 15 import javax.swing.text.Document; … … 20 19 import org.openstreetmap.josm.tools.Pair; 21 20 import org.openstreetmap.josm.tools.Shortcut; 21 import org.openstreetmap.josm.gui.widgets.JosmTextField; 22 22 23 23 /** … … 27 27 * @since 5696 28 28 */ 29 public class DisableShortcutsOnFocusGainedTextField extends J TextField implements FocusListener {29 public class DisableShortcutsOnFocusGainedTextField extends JosmTextField implements FocusListener { 30 30 31 31 /** -
trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java
r5881 r5886 22 22 */ 23 23 public class HtmlPanel extends JPanel { 24 private J EditorPane jepMessage;24 private JosmEditorPane jepMessage; 25 25 26 26 protected void build() { 27 27 setLayout(new BorderLayout()); 28 jepMessage = new J EditorPane("text/html", "");28 jepMessage = new JosmEditorPane("text/html", ""); 29 29 jepMessage.setOpaque(false); 30 30 jepMessage.setEditable(false); … … 57 57 } 58 58 59 /** 60 * Constructs a new {@code HtmlPanel}. 61 */ 59 62 public HtmlPanel() { 60 63 build(); 61 64 } 62 65 66 /** 67 * Constructs a new {@code HtmlPanel} with the given HTML text. 68 * @param text the text to display 69 */ 63 70 public HtmlPanel(String text) { 64 71 this(); -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r5558 r5886 5 5 import java.awt.Dimension; 6 6 import java.awt.Toolkit; 7 import java.awt.event.MouseAdapter; 8 import java.awt.event.MouseEvent; 9 import java.beans.PropertyChangeEvent; 10 import java.beans.PropertyChangeListener; 7 11 import java.util.ArrayList; 8 12 import java.util.Arrays; … … 16 20 import javax.swing.JList; 17 21 import javax.swing.plaf.basic.ComboPopup; 22 import javax.swing.text.JTextComponent; 18 23 19 24 /** … … 185 190 setMaximumRowCount(Math.max(getMaximumRowCount(), maxsize)); 186 191 } 192 // Handle text contextual menus for editable comboboxes 193 ContextMenuHandler handler = new ContextMenuHandler(); 194 addPropertyChangeListener("editable", handler); 195 addPropertyChangeListener("editor", handler); 196 } 197 198 protected class ContextMenuHandler extends MouseAdapter implements PropertyChangeListener { 199 200 private JTextComponent component; 201 private PopupMenuLauncher launcher; 202 203 @Override public void propertyChange(PropertyChangeEvent evt) { 204 if (evt.getPropertyName().equals("editable")) { 205 if (evt.getNewValue().equals(true)) { 206 enableMenu(); 207 } else { 208 disableMenu(); 209 } 210 } else if (evt.getPropertyName().equals("editor")) { 211 disableMenu(); 212 if (isEditable()) { 213 enableMenu(); 214 } 215 } 216 } 217 218 private void enableMenu() { 219 if (launcher == null) { 220 Component editorComponent = getEditor().getEditorComponent(); 221 if (editorComponent instanceof JTextComponent) { 222 component = (JTextComponent) editorComponent; 223 component.addMouseListener(this); 224 launcher = TextContextualPopupMenu.enableMenuFor(component); 225 } 226 } 227 } 228 229 private void disableMenu() { 230 if (launcher != null) { 231 TextContextualPopupMenu.disableMenuFor(component, launcher); 232 launcher = null; 233 component.removeMouseListener(this); 234 component = null; 235 } 236 } 237 238 @Override public void mousePressed(MouseEvent e) { processEvent(e); } 239 @Override public void mouseClicked(MouseEvent e) { processEvent(e); } 240 @Override public void mouseReleased(MouseEvent e) { processEvent(e); } 241 242 private void processEvent(MouseEvent e) { 243 if (launcher != null && !e.isPopupTrigger()) { 244 if (launcher.getMenu().isShowing()) { 245 launcher.getMenu().setVisible(false); 246 } 247 } 248 } 187 249 } 188 250 -
trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java
r5884 r5886 2 2 package org.openstreetmap.josm.gui.widgets; 3 3 4 import java.awt.Component; 5 import java.awt.event.FocusEvent; 6 import java.awt.event.FocusListener; 4 7 import java.awt.event.MouseAdapter; 5 8 import java.awt.event.MouseEvent; … … 13 16 public class PopupMenuLauncher extends MouseAdapter { 14 17 private final JPopupMenu menu; 18 private final boolean checkEnabled; 15 19 16 20 /** … … 28 32 */ 29 33 public PopupMenuLauncher(JPopupMenu menu) { 30 this .menu = menu;34 this(menu, false); 31 35 } 32 36 33 @Override 34 public void mousePressed(MouseEvent e) { 35 if (e.isPopupTrigger()) { 36 launch(e); 37 } 37 /** 38 * Creates a new {@link PopupMenuLauncher} with the given menu. 39 * @param menu The popup menu to display 40 * @param checkEnabled if {@code true}, the popup menu will only be displayed if the component triggering the mouse event is enabled 41 * @since 5885 42 */ 43 public PopupMenuLauncher(JPopupMenu menu, boolean checkEnabled) { 44 this.menu = menu; 45 this.checkEnabled = checkEnabled; 38 46 } 39 47 40 @Override 41 public void mouseClicked(MouseEvent e) { 42 if (e.isPopupTrigger()) { 43 launch(e); 44 } 45 } 46 47 @Override 48 public void mouseReleased(MouseEvent e) { 49 if (e.isPopupTrigger()) { 48 @Override public void mousePressed(MouseEvent e) { processEvent(e); } 49 @Override public void mouseClicked(MouseEvent e) { processEvent(e); } 50 @Override public void mouseReleased(MouseEvent e) { processEvent(e); } 51 52 private void processEvent(MouseEvent e) { 53 if (e.isPopupTrigger() && (!checkEnabled || e.getComponent().isEnabled())) { 50 54 launch(e); 51 55 } … … 57 61 * @param evt A mouse event 58 62 */ 59 public void launch( MouseEvent evt) {63 public void launch(final MouseEvent evt) { 60 64 if (menu != null) { 61 menu.show(evt.getComponent(), evt.getX(), evt.getY()); 65 final Component component = evt.getComponent(); 66 if (component != null && component.isFocusable() && !component.hasFocus() && component.requestFocusInWindow()) { 67 component.addFocusListener(new FocusListener() { 68 @Override public void focusLost(FocusEvent e) {} 69 @Override public void focusGained(FocusEvent e) { 70 menu.show(component, evt.getX(), evt.getY()); 71 component.removeFocusListener(this); 72 } 73 }); 74 } else { 75 menu.show(component, evt.getX(), evt.getY()); 76 } 62 77 } 63 78 } 64 79 65 80 /** 66 81 * @return the popup menu if defined, {@code null} otherwise. -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r5874 r5886 22 22 import javax.swing.JPanel; 23 23 import javax.swing.JScrollPane; 24 import javax.swing.JTextArea;25 import javax.swing.JTextField;26 24 import javax.swing.ListSelectionModel; 27 25 … … 34 32 import org.openstreetmap.josm.gui.layer.Layer; 35 33 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 34 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 35 import org.openstreetmap.josm.gui.widgets.JosmTextField; 36 36 import org.openstreetmap.josm.tools.CheckParameterUtil; 37 37 import org.openstreetmap.josm.tools.GBC; … … 42 42 + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>"; 43 43 44 /** 45 * Constructs a new {@code GpxExporter}. 46 */ 44 47 public GpxExporter() { 45 48 super(GpxImporter.FILE_FILTER); … … 81 84 82 85 p.add(new JLabel(tr("GPS track description")), GBC.eol()); 83 J TextArea desc = new JTextArea(3, 40);86 JosmTextArea desc = new JosmTextArea(3, 40); 84 87 desc.setWrapStyleWord(true); 85 88 desc.setLineWrap(true); … … 91 94 JLabel nameLabel = new JLabel(tr("Real name")); 92 95 p.add(nameLabel, GBC.std().insets(10, 0, 5, 0)); 93 J TextField authorName = new JTextField();96 JosmTextField authorName = new JosmTextField(); 94 97 p.add(authorName, GBC.eol().fill(GBC.HORIZONTAL)); 95 98 JLabel emailLabel = new JLabel(tr("E-Mail")); 96 99 p.add(emailLabel, GBC.std().insets(10, 0, 5, 0)); 97 J TextField email = new JTextField();100 JosmTextField email = new JosmTextField(); 98 101 p.add(email, GBC.eol().fill(GBC.HORIZONTAL)); 99 102 JLabel copyrightLabel = new JLabel(tr("Copyright (URL)")); 100 103 p.add(copyrightLabel, GBC.std().insets(10, 0, 5, 0)); 101 J TextField copyright = new JTextField();104 JosmTextField copyright = new JosmTextField(); 102 105 p.add(copyright, GBC.std().fill(GBC.HORIZONTAL)); 103 106 JButton predefined = new JButton(tr("Predefined")); … … 105 108 JLabel copyrightYearLabel = new JLabel(tr("Copyright year")); 106 109 p.add(copyrightYearLabel, GBC.std().insets(10, 0, 5, 5)); 107 J TextField copyrightYear = new JTextField("");110 JosmTextField copyrightYear = new JosmTextField(""); 108 111 p.add(copyrightYear, GBC.eol().fill(GBC.HORIZONTAL)); 109 112 JLabel warning = new JLabel("<html><font size='-2'> </html"); … … 113 116 114 117 p.add(new JLabel(tr("Keywords")), GBC.eol()); 115 J TextField keywords = new JTextField();118 JosmTextField keywords = new JosmTextField(); 116 119 keywords.setText((String) gpxData.attr.get(META_KEYWORDS)); 117 120 p.add(keywords, GBC.eop().fill(GBC.HORIZONTAL)); … … 184 187 } 185 188 186 private static void enableCopyright(final GpxData data, final J TextField copyright, final JButton predefined,187 final J TextField copyrightYear, final JLabel copyrightLabel, final JLabel copyrightYearLabel,189 private static void enableCopyright(final GpxData data, final JosmTextField copyright, final JButton predefined, 190 final JosmTextField copyrightYear, final JLabel copyrightLabel, final JLabel copyrightYearLabel, 188 191 final JLabel warning, boolean enable) { 189 192 copyright.setEnabled(enable); … … 227 230 final GpxData data, 228 231 final JCheckBox author, 229 final J TextField authorName,230 final J TextField email,231 final J TextField copyright,232 final JosmTextField authorName, 233 final JosmTextField email, 234 final JosmTextField copyright, 232 235 final JButton predefined, 233 final J TextField copyrightYear,236 final JosmTextField copyrightYear, 234 237 final JLabel nameLabel, 235 238 final JLabel emailLabel, -
trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
r5501 r5886 30 30 import javax.swing.JPanel; 31 31 import javax.swing.JRadioButton; 32 import javax.swing.JTextField;33 32 import javax.swing.SwingConstants; 34 33 … … 36 35 import org.openstreetmap.josm.gui.layer.Layer; 37 36 import org.openstreetmap.josm.gui.util.GuiHelper; 37 import org.openstreetmap.josm.gui.widgets.JosmTextField; 38 38 import org.openstreetmap.josm.io.GpxWriter; 39 39 import org.openstreetmap.josm.io.session.SessionWriter.ExportSupport; … … 79 79 final File file = layer.getAssociatedFile(); 80 80 if (file != null) { 81 J TextField tf = new JTextField();81 JosmTextField tf = new JosmTextField(); 82 82 tf.setText(file.getPath()); 83 83 tf.setEditable(false); -
trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
r5684 r5886 32 32 import javax.swing.JPanel; 33 33 import javax.swing.JRadioButton; 34 import javax.swing.JTextField;35 34 import javax.swing.SwingConstants; 36 35 … … 41 40 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 42 41 import org.openstreetmap.josm.gui.util.GuiHelper; 42 import org.openstreetmap.josm.gui.widgets.JosmTextField; 43 43 import org.openstreetmap.josm.io.OsmWriter; 44 44 import org.openstreetmap.josm.io.OsmWriterFactory; … … 109 109 final JButton save = new JButton(saveAction); 110 110 if (file != null) { 111 J TextField tf = new JTextField();111 JosmTextField tf = new JosmTextField(); 112 112 tf.setText(file.getPath()); 113 113 tf.setEditable(false); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r5857 r5886 45 45 import javax.swing.JPanel; 46 46 import javax.swing.JScrollPane; 47 import javax.swing.JTextArea;48 47 import javax.swing.UIManager; 49 48 … … 59 58 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 60 59 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 60 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 61 61 import org.openstreetmap.josm.tools.CheckParameterUtil; 62 62 import org.openstreetmap.josm.tools.GBC; … … 1200 1200 b.append("\n"); 1201 1201 } 1202 J TextArea a = new JTextArea(10, 40);1202 JosmTextArea a = new JosmTextArea(10, 40); 1203 1203 a.setEditable(false); 1204 1204 a.setText(b.toString()); … … 1209 1209 }), GBC.eol()); 1210 1210 1211 J TextArea description = new JTextArea((info.description == null ? tr("no description available")1211 JosmTextArea description = new JosmTextArea((info.description == null ? tr("no description available") 1212 1212 : info.description)); 1213 1213 description.setEditable(false); -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r5874 r5886 19 19 import javax.swing.JPanel; 20 20 import javax.swing.JScrollPane; 21 import javax.swing.JTextArea;22 21 import javax.swing.SwingUtilities; 23 22 … … 26 25 import org.openstreetmap.josm.gui.ExtendedDialog; 27 26 import org.openstreetmap.josm.gui.JMultilineLabel; 27 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 28 28 import org.openstreetmap.josm.plugins.PluginHandler; 29 29 … … 151 151 } 152 152 153 J TextArea info = new JTextArea(text, 18, 60);153 JosmTextArea info = new JosmTextArea(text, 18, 60); 154 154 info.setCaretPosition(0); 155 155 info.setEditable(false);
Note:
See TracChangeset
for help on using the changeset viewer.