Sfoglia il codice sorgente

Issue 1737

git-svn-id: http://svn.dmdirc.com/trunk@4641 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6.3m1rc1
Chris Smith 16 anni fa
parent
commit
b407fcf478

+ 2
- 1
src/com/dmdirc/addons/dcc/DCCPlugin.java Vedi File

465
 		defaults.setOption(MY_DOMAIN, "firewall.ports.endPort", "11019");
465
 		defaults.setOption(MY_DOMAIN, "firewall.ports.endPort", "11019");
466
 		
466
 		
467
 		final String url = "plugin://dcc:com/dmdirc/addons/dcc/res/";
467
 		final String url = "plugin://dcc:com/dmdirc/addons/dcc/res/";
468
+        defaults.setOption("icon", "category-dcc", url + "transfers.png");
468
 		defaults.setOption("icon", "dcc", url + "transfers.png");
469
 		defaults.setOption("icon", "dcc", url + "transfers.png");
469
 		defaults.setOption("icon", "dcc-chat-active", url + "chat.png");
470
 		defaults.setOption("icon", "dcc-chat-active", url + "chat.png");
470
 		defaults.setOption("icon", "dcc-chat-inactive", url + "chat-inactive.png");
471
 		defaults.setOption("icon", "dcc-chat-inactive", url + "chat-inactive.png");
554
 	/** {@inheritDoc} */
555
 	/** {@inheritDoc} */
555
 	@Override
556
 	@Override
556
 	public void showConfig(final PreferencesManager manager) {
557
 	public void showConfig(final PreferencesManager manager) {
557
-		final PreferencesCategory general = new PreferencesCategory("DCC", "");
558
+		final PreferencesCategory general = new PreferencesCategory("DCC", "", "category-dcc");
558
 		final PreferencesCategory firewall = new PreferencesCategory("Firewall", "");
559
 		final PreferencesCategory firewall = new PreferencesCategory("Firewall", "");
559
 		final PreferencesCategory sending = new PreferencesCategory("Sending", "");
560
 		final PreferencesCategory sending = new PreferencesCategory("Sending", "");
560
 		final PreferencesCategory receiving = new PreferencesCategory("Receiving", "");
561
 		final PreferencesCategory receiving = new PreferencesCategory("Receiving", "");

+ 4
- 2
src/com/dmdirc/addons/mediasource_vlc/VlcMediaSourcePlugin.java Vedi File

188
     /** {@inheritDoc} */
188
     /** {@inheritDoc} */
189
     @Override    
189
     @Override    
190
     public void onLoad() {
190
     public void onLoad() {
191
-        // Do nothing
191
+        IdentityManager.getAddonIdentity().setOption("icon", "category-vlc",
192
+                "plugin://vlcmediasource:com/dmdirc/addons/mediasource_vlc/vlc.png");
192
     }
193
     }
193
 
194
 
194
     /** {@inheritDoc} */
195
     /** {@inheritDoc} */
200
     /** {@inheritDoc} */
201
     /** {@inheritDoc} */
201
     @Override
202
     @Override
202
     public void showConfig(final PreferencesManager manager) {
203
     public void showConfig(final PreferencesManager manager) {
203
-        final PreferencesCategory general = new PreferencesCategory("VLC Media Source", "");
204
+        final PreferencesCategory general = new PreferencesCategory("VLC Media Source",
205
+                "", "category-vlc");
204
         final PreferencesCategory instr = new PreferencesCategory("Instructions",
206
         final PreferencesCategory instr = new PreferencesCategory("Instructions",
205
                 "", new InstructionsPanel());
207
                 "", new InstructionsPanel());
206
         
208
         

BIN
src/com/dmdirc/addons/mediasource_vlc/vlc.png Vedi File


+ 4
- 1
src/com/dmdirc/addons/nowplaying/NowPlayingPlugin.java Vedi File

73
         
73
         
74
         ActionManager.addListener(this, CoreActionType.PLUGIN_LOADED,
74
         ActionManager.addListener(this, CoreActionType.PLUGIN_LOADED,
75
                 CoreActionType.PLUGIN_UNLOADED);
75
                 CoreActionType.PLUGIN_UNLOADED);
76
+
77
+        IdentityManager.getConfigIdentity().setOption("icon", "category-nowplaying",
78
+                "plugin://nowplaying:com/dmdirc/addons/nowplaying/nowplaying.png");
76
         
79
         
77
         for (PluginInfo target : PluginManager.getPluginManager().getPluginInfos()) {
80
         for (PluginInfo target : PluginManager.getPluginManager().getPluginInfos()) {
78
             if (target.isLoaded()) {
81
             if (target.isLoaded()) {
98
         final ConfigPanel configPanel = new ConfigPanel(this, order);
101
         final ConfigPanel configPanel = new ConfigPanel(this, order);
99
         
102
         
100
         final PreferencesCategory category = new PreferencesCategory("Now Playing",
103
         final PreferencesCategory category = new PreferencesCategory("Now Playing",
101
-                "", configPanel);
104
+                "", "category-nowplaying", configPanel);
102
         manager.getCategory("Plugins").addSubCategory(category);
105
         manager.getCategory("Plugins").addSubCategory(category);
103
     }
106
     }
104
     
107
     

BIN
src/com/dmdirc/addons/nowplaying/nowplaying.png Vedi File


+ 80
- 0
src/com/dmdirc/addons/nowplaying/nowplaying.svg Vedi File

1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+<svg
4
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
5
+   xmlns:cc="http://creativecommons.org/ns#"
6
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7
+   xmlns:svg="http://www.w3.org/2000/svg"
8
+   xmlns="http://www.w3.org/2000/svg"
9
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11
+   width="16px"
12
+   height="16px"
13
+   id="svg2450"
14
+   sodipodi:version="0.32"
15
+   inkscape:version="0.46"
16
+   sodipodi:docname="nowplaying.svg"
17
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
18
+  <defs
19
+     id="defs2452">
20
+    <inkscape:perspective
21
+       sodipodi:type="inkscape:persp3d"
22
+       inkscape:vp_x="0 : 8 : 1"
23
+       inkscape:vp_y="0 : 1000 : 0"
24
+       inkscape:vp_z="16 : 8 : 1"
25
+       inkscape:persp3d-origin="8 : 5.3333333 : 1"
26
+       id="perspective2458" />
27
+  </defs>
28
+  <sodipodi:namedview
29
+     id="base"
30
+     pagecolor="#ffffff"
31
+     bordercolor="#666666"
32
+     borderopacity="1.0"
33
+     inkscape:pageopacity="0.0"
34
+     inkscape:pageshadow="2"
35
+     inkscape:zoom="22.197802"
36
+     inkscape:cx="5.5386024"
37
+     inkscape:cy="8"
38
+     inkscape:current-layer="layer1"
39
+     showgrid="true"
40
+     inkscape:grid-bbox="true"
41
+     inkscape:document-units="px"
42
+     inkscape:window-width="1151"
43
+     inkscape:window-height="654"
44
+     inkscape:window-x="0"
45
+     inkscape:window-y="295">
46
+    <inkscape:grid
47
+       type="xygrid"
48
+       id="grid2460" />
49
+  </sodipodi:namedview>
50
+  <metadata
51
+     id="metadata2455">
52
+    <rdf:RDF>
53
+      <cc:Work
54
+         rdf:about="">
55
+        <dc:format>image/svg+xml</dc:format>
56
+        <dc:type
57
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
58
+      </cc:Work>
59
+    </rdf:RDF>
60
+  </metadata>
61
+  <g
62
+     id="layer1"
63
+     inkscape:label="Layer 1"
64
+     inkscape:groupmode="layer">
65
+    <path
66
+       sodipodi:type="arc"
67
+       style="opacity:1;fill:#800080;fill-opacity:1;fill-rule:evenodd;stroke:#800080;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
68
+       id="path2462"
69
+       sodipodi:cx="6.3519802"
70
+       sodipodi:cy="11.112128"
71
+       sodipodi:rx="2.7930694"
72
+       sodipodi:ry="2.8155942"
73
+       d="M 9.1450496,11.112128 A 2.7930694,2.8155942 0 1 1 3.5589108,11.112128 A 2.7930694,2.8155942 0 1 1 9.1450496,11.112128 z"
74
+       transform="translate(-0.9460396,0.3603961)" />
75
+    <path
76
+       style="fill:none;fill-rule:evenodd;stroke:#800080;stroke-width:1.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
77
+       d="M 7.1915538,12.286342 L 8.1736822,3.1003096 C 8.1736822,3.1003096 11.2885,7.0470597 13.585397,4.4414127"
78
+       id="path2464" />
79
+  </g>
80
+</svg>

+ 11
- 1
src/com/dmdirc/config/defaults/default/defaults Vedi File

16
   popups
16
   popups
17
   protocol
17
   protocol
18
   plugin-addonid
18
   plugin-addonid
19
+  icon
19
 
20
 
20
 identity:
21
 identity:
21
   name=DMDirc default settings
22
   name=DMDirc default settings
211
   timeplugin=6
212
   timeplugin=6
212
   urlcatcher=25
213
   urlcatcher=25
213
   userlevel=21
214
   userlevel=21
214
-  windowstatus=13
215
+  windowstatus=13
216
+
217
+icon:
218
+  category-addons=dmdirc://com/dmdirc/res/addon.png
219
+  category-advanced=dmdirc://com/dmdirc/res/cog.png
220
+  category-connection=dmdirc://com/dmdirc/res/server.png
221
+  category-gui=dmdirc://com/dmdirc/res/monitor.png
222
+  category-messages=dmdirc://com/dmdirc/res/feedback.png
223
+  category-updates=dmdirc://com/dmdirc/res/update.png
224
+  category-urlhandlers=dmdirc://com/dmdirc/res/urls.png

+ 44
- 3
src/com/dmdirc/config/prefs/PreferencesCategory.java Vedi File

40
     
40
     
41
     /** A description of this category. */
41
     /** A description of this category. */
42
     private final String description;
42
     private final String description;
43
+
44
+    /** The icon to use for this category. */
45
+    private final String icon;
43
     
46
     
44
     /** Whether or not this category is inline. */
47
     /** Whether or not this category is inline. */
45
     private boolean isInline = false;
48
     private boolean isInline = false;
66
      * @param description The description of this category
69
      * @param description The description of this category
67
      */
70
      */
68
     public PreferencesCategory(final String title, final String description) {
71
     public PreferencesCategory(final String title, final String description) {
69
-        this(title, description, null);
72
+        this(title, description, null, null);
70
     }
73
     }
71
-    
74
+
75
+    /**
76
+     * Creates a new preferences category that contains settings.
77
+     *
78
+     * @since 0.6.3
79
+     * @param title The title of this preferences category
80
+     * @param description The description of this category
81
+     * @param icon The icon to use for this category
82
+     */
83
+    public PreferencesCategory(final String title, final String description,
84
+            final String icon) {
85
+        this(title, description, icon, null);
86
+    }
87
+
72
     /**
88
     /**
73
      * Creates a new preferences category that contains an object.
89
      * Creates a new preferences category that contains an object.
74
-     * 
90
+     *
75
      * @param title The title of this preferences category
91
      * @param title The title of this preferences category
76
      * @param description The description of this category
92
      * @param description The description of this category
77
      * @param object The replacement object for this category
93
      * @param object The replacement object for this category
78
      */
94
      */
79
     public PreferencesCategory(final String title, final String description,
95
     public PreferencesCategory(final String title, final String description,
80
             final PreferencesInterface object) {
96
             final PreferencesInterface object) {
97
+        this(title, description, null, object);
98
+    }
99
+    
100
+    /**
101
+     * Creates a new preferences category that contains an object.
102
+     *
103
+     * @since 0.6.3
104
+     * @param title The title of this preferences category
105
+     * @param description The description of this category
106
+     * @param icon The icon to use for this category
107
+     * @param object The replacement object for this category
108
+     */
109
+    public PreferencesCategory(final String title, final String description,
110
+            final String icon, final PreferencesInterface object) {
81
         this.title = title;
111
         this.title = title;
82
         this.description = description;
112
         this.description = description;
113
+        this.icon = icon;
83
         this.object = object;
114
         this.object = object;
84
     }
115
     }
85
     
116
     
186
     public String getTitle() {
217
     public String getTitle() {
187
         return title;
218
         return title;
188
     }
219
     }
220
+
221
+    /**
222
+     * Retrieves the icon to use for this category.
223
+     *
224
+     * @return This category's icon
225
+     * @since 0.6.3
226
+     */
227
+    public String getIcon() {
228
+        return icon;
229
+    }
189
     
230
     
190
     /**
231
     /**
191
      * Determines if this category has a replacement object.
232
      * Determines if this category has a replacement object.

+ 15
- 8
src/com/dmdirc/config/prefs/PreferencesManager.java Vedi File

161
      * Creates and adds the "Connection" category.
161
      * Creates and adds the "Connection" category.
162
      */
162
      */
163
     private void addConnectionCategory() {
163
     private void addConnectionCategory() {
164
-        final PreferencesCategory category = new PreferencesCategory("Connection", "");
164
+        final PreferencesCategory category = new PreferencesCategory("Connection",
165
+                "", "category-connection");
165
 
166
 
166
         category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
167
         category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
167
                 "general", "closechannelsonquit", "false", "Close channels on quit",
168
                 "general", "closechannelsonquit", "false", "Close channels on quit",
201
      * Creates and adds the "Messages" category.
202
      * Creates and adds the "Messages" category.
202
      */
203
      */
203
     private void addMessagesCategory() {
204
     private void addMessagesCategory() {
204
-        final PreferencesCategory category = new PreferencesCategory("Messages", "");
205
+        final PreferencesCategory category = new PreferencesCategory("Messages",
206
+                "", "category-messages");
205
 
207
 
206
         category.addSetting(new PreferencesSetting(PreferencesType.TEXT,
208
         category.addSetting(new PreferencesSetting(PreferencesType.TEXT,
207
                 "general", "closemessage", "DMDirc exiting",
209
                 "general", "closemessage", "DMDirc exiting",
298
      * Creates and adds the "Advanced" category.
300
      * Creates and adds the "Advanced" category.
299
      */
301
      */
300
     private void addAdvancedCategory() {
302
     private void addAdvancedCategory() {
301
-        final PreferencesCategory category = new PreferencesCategory("Advanced", "");
303
+        final PreferencesCategory category = new PreferencesCategory("Advanced", 
304
+                "", "category-advanced");
302
 
305
 
303
         category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
306
         category.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
304
                 "browser", "userlaunchdelay", "false", "Use browser launch delay",
307
                 "browser", "userlaunchdelay", "false", "Use browser launch delay",
337
         final Map<String, String> lafs = new HashMap<String, String>();
340
         final Map<String, String> lafs = new HashMap<String, String>();
338
         final Map<String, String> framemanagers = new HashMap<String, String>();
341
         final Map<String, String> framemanagers = new HashMap<String, String>();
339
         final Map<String, String> fmpositions = new HashMap<String, String>();
342
         final Map<String, String> fmpositions = new HashMap<String, String>();
340
-        final PreferencesCategory category = new PreferencesCategory("GUI", "");
343
+        final PreferencesCategory category = new PreferencesCategory("GUI", "",
344
+                "category-gui");
341
 
345
 
342
         framemanagers.put("treeview", "Treeview");
346
         framemanagers.put("treeview", "Treeview");
343
         framemanagers.put("buttonbar", "Button bar");
347
         framemanagers.put("buttonbar", "Button bar");
414
     private void addThemesCategory(final PreferencesCategory parent) {
418
     private void addThemesCategory(final PreferencesCategory parent) {
415
         // TODO: Abstract the panel
419
         // TODO: Abstract the panel
416
 
420
 
417
-        parent.addSubCategory(new PreferencesCategory("Themes", "", new ThemePanel()));        
421
+        parent.addSubCategory(new PreferencesCategory("Themes", "",
422
+                "category-addons", new ThemePanel()));
418
     }
423
     }
419
 
424
 
420
     /**
425
     /**
486
     private void addPluginsCategory() {
491
     private void addPluginsCategory() {
487
         // TODO: Abstract the panel
492
         // TODO: Abstract the panel
488
 
493
 
489
-        addCategory(new PreferencesCategory("Plugins", "", new PluginPanel()));
494
+        addCategory(new PreferencesCategory("Plugins", "", "category-addons",
495
+                new PluginPanel()));
490
     }
496
     }
491
 
497
 
492
     /**
498
     /**
495
     private void addUpdatesCategory() {
501
     private void addUpdatesCategory() {
496
         // TODO: Abstract the panel
502
         // TODO: Abstract the panel
497
 
503
 
498
-        addCategory(new PreferencesCategory("Updates", "", new UpdateConfigPanel()));
504
+        addCategory(new PreferencesCategory("Updates", "", "category-updates",
505
+                new UpdateConfigPanel()));
499
     }
506
     }
500
 
507
 
501
     /**
508
     /**
506
 
513
 
507
         addCategory(new PreferencesCategory("URL Handlers",
514
         addCategory(new PreferencesCategory("URL Handlers",
508
                 "Configure how DMDirc handles different types of URLs",
515
                 "Configure how DMDirc handles different types of URLs",
509
-                new URLConfigPanel()));
516
+                "category-urlhandlers", new URLConfigPanel()));
510
     }
517
     }
511
 
518
 
512
     /**
519
     /**

BIN
src/com/dmdirc/res/addon.png Vedi File


BIN
src/com/dmdirc/res/cog.png Vedi File


BIN
src/com/dmdirc/res/monitor.png Vedi File


BIN
src/com/dmdirc/res/urls.png Vedi File


+ 4
- 19
src/com/dmdirc/ui/IconManager.java Vedi File

135
         //Get the url for the speficied path
135
         //Get the url for the speficied path
136
         URL imageURL = URLBuilder.buildURL(path);
136
         URL imageURL = URLBuilder.buildURL(path);
137
         
137
         
138
-        try {
139
-            //if the path didnt exist see if its a file
140
-            if (imageURL == null) {
141
-                final File file = new File(path);
142
-                if (file.exists()) {
143
-                    imageURL = file.toURI().toURL();
144
-                } else {
145
-                    imageURL = defaultURL;
146
-                }
147
-            }
148
-            
149
-            //check if the url has content
150
-            if (imageURL == null || imageURL.getContent() == null)  {
151
-                imageURL = defaultURL;
152
-            }
153
-        } catch (IOException ex) {
154
-            imageURL = defaultURL;
138
+        if (imageURL == null && defaultURL != null) {
139
+           imageURL = defaultURL;
155
         }
140
         }
156
-        
157
-        if (imageURL == null) {
141
+
142
+        if (imageURL == null && defaultURL == null) {
158
             imageURL = cldr.getResource("com/dmdirc/res/icon.png");
143
             imageURL = cldr.getResource("com/dmdirc/res/icon.png");
159
             
144
             
160
             if (imageURL == null) {
145
             if (imageURL == null) {

+ 1
- 1
src/com/dmdirc/ui/swing/components/renderers/ProfileListCellRenderer.java Vedi File

22
 
22
 
23
 package com.dmdirc.ui.swing.components.renderers;
23
 package com.dmdirc.ui.swing.components.renderers;
24
 
24
 
25
-import com.dmdirc.ui.swing.dialogs.profiles.Profile;
25
+import com.dmdirc.config.Profile;
26
 
26
 
27
 import java.awt.Component;
27
 import java.awt.Component;
28
 
28
 

+ 14
- 5
src/com/dmdirc/ui/swing/dialogs/prefs/PreferencesTreeCellRenderer.java Vedi File

22
 
22
 
23
 package com.dmdirc.ui.swing.dialogs.prefs;
23
 package com.dmdirc.ui.swing.dialogs.prefs;
24
 
24
 
25
+import com.dmdirc.config.prefs.PreferencesCategory;
26
+import com.dmdirc.ui.IconManager;
25
 import java.awt.Component;
27
 import java.awt.Component;
26
 import java.awt.Dimension;
28
 import java.awt.Dimension;
27
 import java.awt.Font;
29
 import java.awt.Font;
29
 import javax.swing.BorderFactory;
31
 import javax.swing.BorderFactory;
30
 import javax.swing.JLabel;
32
 import javax.swing.JLabel;
31
 import javax.swing.JTree;
33
 import javax.swing.JTree;
34
+import javax.swing.tree.DefaultMutableTreeNode;
32
 import javax.swing.tree.TreeCellRenderer;
35
 import javax.swing.tree.TreeCellRenderer;
33
 
36
 
34
 import net.miginfocom.layout.PlatformDefaults;
37
 import net.miginfocom.layout.PlatformDefaults;
63
     public final Component getTreeCellRendererComponent(final JTree tree,
66
     public final Component getTreeCellRendererComponent(final JTree tree,
64
             final Object value, final boolean sel, final boolean expanded,
67
             final Object value, final boolean sel, final boolean expanded,
65
             final boolean leaf, final int row, final boolean focused) {
68
             final boolean leaf, final int row, final boolean focused) {
66
-        setPreferredSize(new Dimension(100000,
67
-                getFont().getSize() + padding));
68
-        setBorder(BorderFactory.createEmptyBorder(0, 0, padding,
69
-                padding));
70
-        setText(value.toString());
69
+        if (((DefaultMutableTreeNode) value).getUserObject() instanceof PreferencesCategory) {
70
+            final PreferencesCategory cat = (PreferencesCategory)
71
+                    ((DefaultMutableTreeNode) value).getUserObject();
72
+
73
+            setText(cat.getTitle());
74
+            setIcon(IconManager.getIconManager().getIcon(cat.getIcon()));
75
+        }
76
+
77
+        setPreferredSize(new Dimension(100000, Math.max(16,
78
+                getFont().getSize()) + padding));
79
+        setBorder(BorderFactory.createEmptyBorder(0, 0, padding, padding));
71
         setBackground(tree.getBackground());
80
         setBackground(tree.getBackground());
72
         setForeground(tree.getForeground());
81
         setForeground(tree.getForeground());
73
         setOpaque(true);
82
         setOpaque(true);

+ 31
- 7
src/com/dmdirc/ui/swing/dialogs/prefs/SwingPreferencesDialog.java Vedi File

230
 
230
 
231
     /**
231
     /**
232
      * Resets the content of the tooltip.
232
      * Resets the content of the tooltip.
233
+     *
234
+     * @since 0.6.3
233
      */
235
      */
234
     protected void resetTooltip() {
236
     protected void resetTooltip() {
235
         tooltip.setFont(tooltip.getFont().deriveFont(Font.ITALIC));
237
         tooltip.setFont(tooltip.getFont().deriveFont(Font.ITALIC));
240
      * Sets the content of the tooltip area to the specified text.
242
      * Sets the content of the tooltip area to the specified text.
241
      *
243
      *
242
      * @param text The text to be displayed
244
      * @param text The text to be displayed
245
+     * @since 0.6.3
243
      */
246
      */
244
     protected void setTooltip(final String text) {
247
     protected void setTooltip(final String text) {
245
         tooltip.setFont(tooltip.getFont().deriveFont(Font.PLAIN));
248
         tooltip.setFont(tooltip.getFont().deriveFont(Font.PLAIN));
251
      * listeners to any {@link JComponent} with a tooltip set.
254
      * listeners to any {@link JComponent} with a tooltip set.
252
      *
255
      *
253
      * @param components The components to iterate over
256
      * @param components The components to iterate over
257
+     * @since 0.6.3
254
      */
258
      */
255
     protected void addMouseListeners(final Component[] components) {
259
     protected void addMouseListeners(final Component[] components) {
256
         for (Component component : components) {
260
         for (Component component : components) {
349
         final String path = namePrefix + "/" + category.getTitle();
353
         final String path = namePrefix + "/" + category.getTitle();
350
         DefaultMutableTreeNode newNode;
354
         DefaultMutableTreeNode newNode;
351
 
355
 
352
-        newNode = new DefaultMutableTreeNode(category.getTitle());
356
+        newNode = new DefaultMutableTreeNode(category);
353
 
357
 
354
         categories.put(category, panel);
358
         categories.put(category, panel);
355
         nodes.put(newNode, path);
359
         nodes.put(newNode, path);
360
 
364
 
361
         mainPanel.add(scrollPane, path);
365
         mainPanel.add(scrollPane, path);
362
         ((DefaultTreeModel) tabList.getModel()).insertNodeInto(newNode,
366
         ((DefaultTreeModel) tabList.getModel()).insertNodeInto(newNode,
363
-                parentNode, parentNode.getChildCount());
367
+                rootNode, parentNode.getChildCount());
364
         tabList.scrollPathToVisible(new TreePath(newNode.getPath()));
368
         tabList.scrollPathToVisible(new TreePath(newNode.getPath()));
365
 
369
 
366
         initCategory(category, panel, newNode, path);
370
         initCategory(category, panel, newNode, path);
531
         }
535
         }
532
     }
536
     }
533
 
537
 
534
-    /** {@inheritDoc} */
538
+    /**
539
+     * {@inheritDoc}
540
+     *
541
+     * @since 0.6.3
542
+     */
535
     @Override
543
     @Override
536
     public void mouseClicked(final MouseEvent e) {
544
     public void mouseClicked(final MouseEvent e) {
537
         // Not used
545
         // Not used
538
     }
546
     }
539
 
547
 
540
-    /** {@inheritDoc} */
548
+    /**
549
+     * {@inheritDoc}
550
+     *
551
+     * @since 0.6.3
552
+     */
541
     @Override
553
     @Override
542
     public void mousePressed(final MouseEvent e) {
554
     public void mousePressed(final MouseEvent e) {
543
         // Not used
555
         // Not used
544
     }
556
     }
545
 
557
 
546
-    /** {@inheritDoc} */
558
+    /**
559
+     * {@inheritDoc}
560
+     *
561
+     * @since 0.6.3
562
+     */
547
     @Override
563
     @Override
548
     public void mouseReleased(final MouseEvent e) {
564
     public void mouseReleased(final MouseEvent e) {
549
         // Not used
565
         // Not used
550
     }
566
     }
551
 
567
 
552
-    /** {@inheritDoc} */
568
+    /**
569
+     * {@inheritDoc}
570
+     *
571
+     * @since 0.6.3
572
+     */
553
     @Override
573
     @Override
554
     public void mouseEntered(final MouseEvent e) {
574
     public void mouseEntered(final MouseEvent e) {
555
         setTooltip(tooltips.get(e.getComponent()));
575
         setTooltip(tooltips.get(e.getComponent()));
556
     }
576
     }
557
 
577
 
558
-    /** {@inheritDoc} */
578
+    /**
579
+     * {@inheritDoc}
580
+     *
581
+     * @since 0.6.3
582
+     */
559
     @Override
583
     @Override
560
     public void mouseExited(final MouseEvent e) {
584
     public void mouseExited(final MouseEvent e) {
561
         resetTooltip();
585
         resetTooltip();

Loading…
Annulla
Salva