Last change
on this file was 18221, checked in by Don-vip, 3 years ago |
fix #21319 - Refactoring of class hierarchy around JosmComboBox / AutoCompComboBox (patch by marcello):
- Code reuse: JosmComboBox now uses a JosmTextField as editor
- Code reuse: AutoCompComboBox now uses AutoCompTextField as editor
- JosmComboBox uses more of the original L&F
- JosmComboBox lists now expand all the way to the bottom or the top of the screen
- Variable height items in combobox lists now work, see #19321
- Autocomplete uses different algorithm, fix #21290
- editable="false" comboboxes in Presets now work, fix #6157 see #11024 see #18714
- The user may toggle LTR-RTL script in JosmTextField (menu and ctrl+space)
- LTR-RTL automatically toggles according to key in AddTag and EditTag dialogs, fix #16163
|
File size:
713 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.tagging.presets.items;
|
---|
3 |
|
---|
4 | import javax.swing.JLabel;
|
---|
5 | import javax.swing.JPanel;
|
---|
6 |
|
---|
7 | import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
|
---|
8 | import org.openstreetmap.josm.tools.GBC;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Label type.
|
---|
12 | */
|
---|
13 | public class Label extends TextItem {
|
---|
14 |
|
---|
15 | @Override
|
---|
16 | public boolean addToPanel(JPanel p, TaggingPresetItemGuiSupport support) {
|
---|
17 | initializeLocaleText(null);
|
---|
18 | JLabel label = new JLabel(locale_text);
|
---|
19 | addIcon(label);
|
---|
20 | label.applyComponentOrientation(support.getDefaultComponentOrientation());
|
---|
21 | p.add(label, GBC.eol().fill(GBC.HORIZONTAL));
|
---|
22 | return true;
|
---|
23 | }
|
---|
24 |
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.