source: josm/trunk/src/org/openstreetmap/josm/gui/preferences/TabPreferenceSetting.java@ 13265

Last change on this file since 13265 was 8512, checked in by Don-vip, 9 years ago

checkstyle: redundant modifiers

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.preferences;
3
4import java.awt.Component;
5
6/**
7 * Preference settings, that display a top level tab.
8 *
9 * This preference setting's addGui method is called after the user clicked the tab.
10 */
11public interface TabPreferenceSetting extends PreferenceSetting {
12
13 /**
14 * Called during preferences dialog initialization to display the preferences tab with the returned icon.
15 * @return The icon name in the preferences folder.
16 */
17 String getIconName();
18
19 /**
20 * Called during preferences tab initialization to display its title.
21 * @return The title of this preferences tab.
22 */
23 String getTitle();
24
25 /**
26 * Called during preferences dialog initialization to display the preferences tab with the returned tooltip.
27 * @return The tooltip of this preferences tab.
28 */
29 String getTooltip();
30
31 /**
32 * Called during preferences tab initialization to display a description in one sentence for this tab.
33 * Will be displayed in italic under the title.
34 * @return The description of this preferences tab.
35 */
36 String getDescription();
37
38 /**
39 * Adds a new sub preference settings tab with the given title and component.
40 * @param sub The new sub preference settings.
41 * @param title The tab title.
42 * @param component The tab component.
43 * @since 5631
44 */
45 void addSubTab(SubPreferenceSetting sub, String title, Component component);
46
47 /**
48 * Adds a new sub preference settings tab with the given title, component and tooltip.
49 * @param sub The new sub preference settings.
50 * @param title The tab title.
51 * @param component The tab component.
52 * @param tip The tab tooltip.
53 * @since 5631
54 */
55 void addSubTab(SubPreferenceSetting sub, String title, Component component, String tip);
56
57 /**
58 * Registers a sub preference settings to an existing tab component.
59 * @param sub The new sub preference settings.
60 * @param component The component for which a tab already exists.
61 * @since 5631
62 */
63 void registerSubTab(SubPreferenceSetting sub, Component component);
64
65 /**
66 * Returns the tab component related to the specified sub preference settings
67 * @param sub The requested sub preference settings.
68 * @return The component related to the specified sub preference settings, or null.
69 * @since 5631
70 */
71 Component getSubTab(SubPreferenceSetting sub);
72
73 /**
74 * Selects the specified sub preference settings, if applicable. Not all Tab preference settings need to implement this.
75 * @param subPref The sub preference settings to be selected.
76 * @return true if the specified preference settings have been selected, false otherwise.
77 * @since 5631
78 */
79 boolean selectSubTab(SubPreferenceSetting subPref);
80}
Note: See TracBrowser for help on using the repository browser.