livespace.ui.dashboard
Class Dashboard

java.lang.Object
  extended by livespace.ui.dashboard.Dashboard

public class Dashboard
extends Object


Constructor Summary
Dashboard()
           
 
Method Summary
static org.osgi.framework.ServiceRegistration autoRegisterPanel(org.osgi.framework.BundleContext context, String panelId, AbstractDashboardPanel panel)
          Register panel as a dashboard panel OSGi service.
static org.osgi.framework.ServiceRegistration registerPanel(org.osgi.framework.BundleContext context, String panelId, IDashboardPanel panel)
          Register panel as a dashboard panel OSGi service.
static void stopBundleOnClose(org.osgi.framework.BundleContext context, org.eclipse.swt.widgets.Shell shell)
          Trigger the dashboard bundle to stop when this panel is closed (e.g.
static void stopBundleOnClose(org.osgi.framework.BundleContext context, org.eclipse.jface.window.Window window)
          Trigger the dashboard bundle to stop when this panel is closed (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dashboard

public Dashboard()
Method Detail

stopBundleOnClose

public static void stopBundleOnClose(org.osgi.framework.BundleContext context,
                                     org.eclipse.jface.window.Window window)
Trigger the dashboard bundle to stop when this panel is closed (e.g. by clicking its close button). Panels with a single window should ideally stop on close to avoid using resources when not in use. TODO: calling this after registerPanel(org.osgi.framework.BundleContext, java.lang.String, livespace.ui.dashboard.IDashboardPanel) does not seem to work (listener never called, window becomes unclosable).

Parameters:
context - The OSGi bundle context.
window - The dashboard window to be monitored for close events.

stopBundleOnClose

public static void stopBundleOnClose(org.osgi.framework.BundleContext context,
                                     org.eclipse.swt.widgets.Shell shell)
Trigger the dashboard bundle to stop when this panel is closed (e.g. by clicking its close button). Panels with a single window should ideally stop on close to avoid using resources when not in use. TODO: calling this after registerPanel(org.osgi.framework.BundleContext, java.lang.String, livespace.ui.dashboard.IDashboardPanel) does not seem to work (listener never called, window becomes unclosable).

Parameters:
context - The OSGi bundle context.
shell - The dashboard shell to be monitored for close events.

registerPanel

public static org.osgi.framework.ServiceRegistration registerPanel(org.osgi.framework.BundleContext context,
                                                                   String panelId,
                                                                   IDashboardPanel panel)
Register panel as a dashboard panel OSGi service.

Parameters:
context - The panel's bundle context.
panelId - The ID for the panel.
panel - The panel itself.
Returns:
The service registration.
See Also:
autoRegisterPanel(BundleContext, String, AbstractDashboardPanel)

autoRegisterPanel

public static org.osgi.framework.ServiceRegistration autoRegisterPanel(org.osgi.framework.BundleContext context,
                                                                       String panelId,
                                                                       AbstractDashboardPanel panel)
Register panel as a dashboard panel OSGi service. Also arranges for registration to be automatically removed when panel is closed.

Parameters:
context - The panel's bundle context.
panelId - The ID for the panel.
panel - The panel itself. The panel window will be created if it's not already.
Returns:
The service registration.
See Also:
registerPanel(BundleContext, String, IDashboardPanel)


Copyright © 2008 Commonwealth of Australia