/// <summary> /// Register a child of a JScrollPane (only JList or JTree supported /// for now) which should show helper tooltips. Should be called /// from the component's addNotify() method. /// </summary> public static void register(JComponent comp) { if (INSTANCE == null) { INSTANCE = new ViewTooltips(); } INSTANCE.attachTo(comp); }
/// <summary> /// Unregister a child of a JScrollPane (only JList or JTree supported /// for now) which should show helper tooltips. Should be called /// from the component's removeNotify() method. /// </summary> public static void unregister(JComponent comp) { System.Diagnostics.Debug.Assert(INSTANCE != null, "Unregister asymmetrically called"); if (null != INSTANCE && INSTANCE.detachFrom(comp) == 0) { INSTANCE.hide(); INSTANCE = null; } }