livespace.ui.dashboard
Class AbstractDashboardPanel

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by dsto.dfc.swt.controls.NiceWindow
          extended by livespace.ui.dashboard.AbstractDashboardPanel
All Implemented Interfaces:
IDashboardPanel, org.eclipse.jface.window.IShellProvider

public abstract class AbstractDashboardPanel
extends NiceWindow
implements IDashboardPanel

Base class for dashboard panels using the JFace Window class as a basis. Allows dashboard.window.trim, dashboard.window.size,dashboard.window.on_top and dashboard.window.on_screen as config items.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
protected  IDashboard dashboard
           
protected  String panelId
           
 
Fields inherited from class dsto.dfc.swt.controls.NiceWindow
GLOBAL_PREFERENCES, locationProperty, preferences, sizeProperty
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
AbstractDashboardPanel(IDashboard dashboard, String panelId)
           
AbstractDashboardPanel(IDashboard dashboard, String panelId, IDataBean preferences)
           
 
Method Summary
 void activate()
          Default activation method is to simply call open ().
 void create()
           
protected  org.eclipse.swt.graphics.Rectangle getConstrainedShellBounds(org.eclipse.swt.graphics.Rectangle preferredSize)
          Allow full screen windows.
protected  org.eclipse.swt.graphics.Point getDefaultInitialLocation(org.eclipse.swt.graphics.Point initialSize)
          Subclasses may override.
protected  org.eclipse.swt.graphics.Point getDefaultInitialSize()
          Subclasses may override.
protected  org.eclipse.swt.graphics.Point getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
          Allow dashboard.window.on_screen setting to override default.
protected  org.eclipse.swt.graphics.Point getInitialSize()
          Subclasses should override getDefaultInitialSize().
protected  int getShellStyle()
          Subclasses should use setShellStyle(int).
 void setShellStyle(int style)
           
 
Methods inherited from class dsto.dfc.swt.controls.NiceWindow
close, getDefaultLocation, initializeBounds, savePreferences
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createContents, createShell, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dashboard

protected IDashboard dashboard

panelId

protected String panelId
Constructor Detail

AbstractDashboardPanel

public AbstractDashboardPanel(IDashboard dashboard,
                              String panelId)

AbstractDashboardPanel

public AbstractDashboardPanel(IDashboard dashboard,
                              String panelId,
                              IDataBean preferences)
Method Detail

setShellStyle

public void setShellStyle(int style)
Overrides:
setShellStyle in class org.eclipse.jface.window.Window

activate

public void activate()
Default activation method is to simply call open (). Subclasses may override.

Specified by:
activate in interface IDashboardPanel

create

public void create()
Overrides:
create in class org.eclipse.jface.window.Window

getShellStyle

protected final int getShellStyle()
Subclasses should use setShellStyle(int).

Overrides:
getShellStyle in class org.eclipse.jface.window.Window

getDefaultInitialSize

protected org.eclipse.swt.graphics.Point getDefaultInitialSize()
Subclasses may override.


getInitialSize

protected final org.eclipse.swt.graphics.Point getInitialSize()
Subclasses should override getDefaultInitialSize().

Overrides:
getInitialSize in class NiceWindow

getDefaultInitialLocation

protected org.eclipse.swt.graphics.Point getDefaultInitialLocation(org.eclipse.swt.graphics.Point initialSize)
Subclasses may override.


getInitialLocation

protected final org.eclipse.swt.graphics.Point getInitialLocation(org.eclipse.swt.graphics.Point initialSize)
Allow dashboard.window.on_screen setting to override default. Subclasses should override getDefaultInitialLocation(Point).

Overrides:
getInitialLocation in class NiceWindow

getConstrainedShellBounds

protected final org.eclipse.swt.graphics.Rectangle getConstrainedShellBounds(org.eclipse.swt.graphics.Rectangle preferredSize)
Allow full screen windows.

Overrides:
getConstrainedShellBounds in class org.eclipse.jface.window.Window


Copyright © 2008 Commonwealth of Australia