source: josm/trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Optional.java@ 9492

Last change on this file since 9492 was 9492, checked in by Don-vip, 8 years ago

presets items: fix sonar issues, add javadoc

File size: 879 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.tagging.presets.items;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.util.Collection;
7
8import javax.swing.JLabel;
9import javax.swing.JPanel;
10
11import org.openstreetmap.josm.data.osm.OsmPrimitive;
12import org.openstreetmap.josm.tools.GBC;
13
14/**
15 * Used to group optional attributes.
16 * @since 8863
17 */
18public class Optional extends TextItem {
19
20 // TODO: Draw a box around optional stuff
21 @Override
22 public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel, boolean presetInitiallyMatches) {
23 initializeLocaleText(tr("Optional Attributes:"));
24 p.add(new JLabel(" "), GBC.eol()); // space
25 p.add(new JLabel(locale_text), GBC.eol());
26 p.add(new JLabel(" "), GBC.eol()); // space
27 return false;
28 }
29}
Note: See TracBrowser for help on using the repository browser.