001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.tagging.presets.items;
003
004import static org.openstreetmap.josm.tools.I18n.tr;
005
006import java.util.Collection;
007
008import javax.swing.JLabel;
009import javax.swing.JPanel;
010
011import org.openstreetmap.josm.data.osm.OsmPrimitive;
012import org.openstreetmap.josm.tools.GBC;
013
014/**
015 * Used to group optional attributes.
016 * @since 8863
017 */
018public class Optional extends TextItem {
019
020    // TODO: Draw a box around optional stuff
021    @Override
022    public boolean addToPanel(JPanel p, Collection<OsmPrimitive> sel, boolean presetInitiallyMatches) {
023        initializeLocaleText(tr("Optional Attributes:"));
024        p.add(new JLabel(" "), GBC.eol()); // space
025        p.add(new JLabel(locale_text), GBC.eol());
026        p.add(new JLabel(" "), GBC.eol()); // space
027        return false;
028    }
029}