livespace.ui.dashboard
Class DashboardService

java.lang.Object
  extended by livespace.ui.dashboard.DashboardService
All Implemented Interfaces:
EventListener, IDashboard, org.eclipse.swt.widgets.Listener, org.osgi.framework.ServiceListener

public class DashboardService
extends Object
implements IDashboard, org.eclipse.swt.widgets.Listener, org.osgi.framework.ServiceListener

The default dashboard service implementation.

Author:
Matthew Phillips

Field Summary
protected  org.osgi.framework.BundleContext bundleContext
           
protected  Properties config
           
protected  org.eclipse.swt.graphics.Image connectedImage
           
protected  org.eclipse.swt.widgets.Shell dashboardShell
           
protected  org.eclipse.swt.graphics.Image disconnectedImage
           
protected  org.eclipse.swt.widgets.Menu menu
           
protected  org.eclipse.swt.widgets.Button menuButton
           
protected  org.eclipse.swt.widgets.Shell menuShell
           
protected  org.eclipse.swt.widgets.TrayItem menuTrayItem
           
protected  CommandView menuView
           
protected  SWTRuntime swt
           
 
Constructor Summary
DashboardService(SWTRuntime swt, org.osgi.framework.BundleContext bundleContext, Properties config)
           
 
Method Summary
protected  void activatePanel(org.osgi.framework.ServiceReference serviceRef)
          Activate the panel in a service ref.
 org.osgi.framework.Bundle activatePanel(String bundleName)
           
 void asyncExec(IDelegate delegate)
           
 void dispose()
           
protected  void disposeUI()
           
 org.osgi.framework.BundleContext getBundleContext()
           
 org.eclipse.swt.widgets.Shell getDashboardShell()
           
 org.eclipse.swt.widgets.Display getDisplay()
           
 void handleEvent(org.eclipse.swt.widgets.Event e)
           
protected  void initUI()
           
 void serviceChanged(org.osgi.framework.ServiceEvent e)
           
 void setConnected(boolean elvinStatus)
           
 void syncExec(IDelegate delegate)
           
 void updateContainerFromUI(EntityContainer container)
          Directs property updates to occur within the UI thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swt

protected SWTRuntime swt

menuTrayItem

protected org.eclipse.swt.widgets.TrayItem menuTrayItem

dashboardShell

protected org.eclipse.swt.widgets.Shell dashboardShell

menu

protected org.eclipse.swt.widgets.Menu menu

menuView

protected CommandView menuView

bundleContext

protected org.osgi.framework.BundleContext bundleContext

config

protected Properties config

menuShell

protected org.eclipse.swt.widgets.Shell menuShell

connectedImage

protected org.eclipse.swt.graphics.Image connectedImage

disconnectedImage

protected org.eclipse.swt.graphics.Image disconnectedImage

menuButton

protected org.eclipse.swt.widgets.Button menuButton
Constructor Detail

DashboardService

public DashboardService(SWTRuntime swt,
                        org.osgi.framework.BundleContext bundleContext,
                        Properties config)
Method Detail

getBundleContext

public org.osgi.framework.BundleContext getBundleContext()
Specified by:
getBundleContext in interface IDashboard

dispose

public void dispose()

getDisplay

public org.eclipse.swt.widgets.Display getDisplay()
Specified by:
getDisplay in interface IDashboard

getDashboardShell

public org.eclipse.swt.widgets.Shell getDashboardShell()
Specified by:
getDashboardShell in interface IDashboard

asyncExec

public void asyncExec(IDelegate delegate)
Specified by:
asyncExec in interface IDashboard

syncExec

public void syncExec(IDelegate delegate)
Specified by:
syncExec in interface IDashboard

updateContainerFromUI

public void updateContainerFromUI(EntityContainer container)
Description copied from interface: IDashboard
Directs property updates to occur within the UI thread. This will eliminate the issue of thread safety for GUI clients that only access entities in the UI thread. This method is usually sa delegate to SWTRuntime#updateContainerFromUI(EntityContainer).

Specified by:
updateContainerFromUI in interface IDashboard

activatePanel

public org.osgi.framework.Bundle activatePanel(String bundleName)
                                        throws IllegalArgumentException
Throws:
IllegalArgumentException

setConnected

public void setConnected(boolean elvinStatus)

activatePanel

protected void activatePanel(org.osgi.framework.ServiceReference serviceRef)
Activate the panel in a service ref. Does nothing if ref is not for a dashboard panel.


initUI

protected void initUI()

disposeUI

protected void disposeUI()

handleEvent

public void handleEvent(org.eclipse.swt.widgets.Event e)
Specified by:
handleEvent in interface org.eclipse.swt.widgets.Listener

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent e)
Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener


Copyright © 2008 Commonwealth of Australia