01: package com.umlet.help;
02:
03: import java.awt.event.ContainerEvent;
04: import java.awt.event.ContainerListener;
05:
06: import com.umlet.control.Umlet;
07:
08: @SuppressWarnings("serial")
09: public class StartUpHelpLabel extends HelpLabel implements
10: ContainerListener {
11:
12: public void componentAdded(ContainerEvent e) {
13: if (!this .equals(e.getChild()))
14: this .setInvisible();
15: }
16:
17: public void componentRemoved(ContainerEvent e) {
18: if (e.getContainer().getComponentCount() < 1
19: && !this .equals(e.getChild()))
20: this .setVisible();
21: //System.out.println("r(" + e.getContainer().getComponentCount() + "): " + e.getChild().getClass().getName());
22: }
23:
24: private static StartUpHelpLabel window;
25:
26: public static StartUpHelpLabel getInstance() {
27: if (window == null)
28: window = new StartUpHelpLabel();
29: return window;
30: }
31:
32: @Override
33: protected String getStartUpFileName() {
34: return Umlet.getInstance().getHomePath()
35: + "html/startuphelp.html";
36: }
37: }
|