Changeset 4215 in josm
- Timestamp:
- 2011-07-08T22:50:35+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r4191 r4215 33 33 import javax.swing.AbstractAction; 34 34 import javax.swing.BorderFactory; 35 import javax.swing.DefaultCellEditor; 35 36 import javax.swing.JComponent; 36 37 import javax.swing.JLabel; … … 40 41 import javax.swing.JSplitPane; 41 42 import javax.swing.JTabbedPane; 43 import javax.swing.JTextField; 42 44 import javax.swing.JToolBar; 43 45 import javax.swing.KeyStroke; … … 276 278 memberTable.addMouseListener(new MemberTableDblClickAdapter()); 277 279 memberTableModel.addMemberModelListener(memberTable); 280 // setup a cell editor with a small border 281 final JTextField cellEditorTextField = new JTextField(); 282 cellEditorTextField.setBorder(BorderFactory.createEmptyBorder(1,1,1,1)); 283 cellEditorTextField.addFocusListener( 284 new FocusAdapter() { 285 @Override public void focusGained(FocusEvent e) { 286 cellEditorTextField.selectAll(); 287 } 288 } 289 ); 290 DefaultCellEditor cellEditor = new DefaultCellEditor(cellEditorTextField); 291 cellEditor.setClickCountToStart(1); 292 memberTable.getColumnModel().getColumn(0).setCellEditor(cellEditor); 293 memberTable.setRowHeight(cellEditorTextField.getPreferredSize().height); 278 294 279 295 final JScrollPane scrollPane = new JScrollPane(memberTable); … … 344 360 ); 345 361 tfRole.setEnabled(memberTable.getSelectedRowCount() > 0); 346 memberTable.setRowHeight(tfRole.getPreferredSize().height);347 362 SideButton btnApply = new SideButton(setRoleAction); 348 363 btnApply.setPreferredSize(new Dimension(20,20)); -
trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java
r4191 r4215 5 5 6 6 import javax.swing.AbstractCellEditor; 7 import javax.swing.BorderFactory; 7 8 import javax.swing.JTable; 8 9 import javax.swing.table.TableCellEditor; … … 33 34 public TagCellEditor() { 34 35 editor = new AutoCompletingTextField(); 36 editor.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); 35 37 } 36 38
Note:
See TracChangeset
for help on using the changeset viewer.