source: josm/trunk/src/org/openstreetmap/josm/gui/preferences/ExtensibleTabPreferenceSetting.java@ 17314

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

see #7548 - make clear which preferences settings allow new tabs from plugins. Make color preferences extensible. Hide tab area if a single tab is defined.

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.preferences;
3
4import static java.awt.GridBagConstraints.BOTH;
5
6import org.openstreetmap.josm.gui.widgets.HideableTabbedPane;
7import org.openstreetmap.josm.tools.GBC;
8
9/**
10 * Abstract base class for {@link TabPreferenceSetting} implementations extensible solely by inner tabs.
11 *
12 * Support for common functionality, like icon, title and adding a tab ({@link SubPreferenceSetting}).
13 * @since 17314
14 */
15public abstract class ExtensibleTabPreferenceSetting extends DefaultTabPreferenceSetting {
16
17 /**
18 * Constructs a new {@code ExtensibleTabPreferenceSetting}.
19 */
20 protected ExtensibleTabPreferenceSetting() {
21 this(null, null, null);
22 }
23
24 protected ExtensibleTabPreferenceSetting(String iconName, String title, String description) {
25 this(iconName, title, description, false);
26 }
27
28 protected ExtensibleTabPreferenceSetting(String iconName, String title, String description, boolean isExpert) {
29 super(iconName, title, description, isExpert, new HideableTabbedPane());
30 }
31
32 @Override
33 public void addGui(PreferenceTabbedPane gui) {
34 gui.createPreferenceTab(this).add(getTabPane(), GBC.eol().fill(BOTH));
35 }
36}
Note: See TracBrowser for help on using the repository browser.