Eclipse Remote Application Platform

org.eclipse.rap.rwt.application
Class AbstractEntryPoint

java.lang.Object
  extended by org.eclipse.rap.rwt.application.AbstractEntryPoint
All Implemented Interfaces:
EntryPoint

public abstract class AbstractEntryPoint
extends java.lang.Object
implements EntryPoint

This class provides a skeletal implementation of the EntryPoint interface, to minimize the effort required to implement this interface.

By default, this implementation creates a maximized main shell without any trimmings. Subclasses must implement createContents to create the contents of the main shell. In case a different type of main shell is required, subclasses may also override createShell.

This class is compatible with all operation modes of RWT. It is recommended to extend this base class rather than to implement the EntryPoint interface itself.

Since:
2.0

Constructor Summary
AbstractEntryPoint()
           
 
Method Summary
protected abstract  void createContents(Composite parent)
          Creates the controls that constitute the UI for this entrypoint.
protected  Shell createShell(Display display)
          Creates the main shell for this entrypoint.
 int createUI()
          This method is called by the framework to initialize the UI.
protected  Shell getShell()
          Returns the main shell for this entrypoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEntryPoint

public AbstractEntryPoint()
Method Detail

createUI

public int createUI()
This method is called by the framework to initialize the UI. Subclasses should implement createContents(Composite) instead of overriding this method.

Specified by:
createUI in interface EntryPoint
Returns:
exit status, reserved for future use

getShell

protected Shell getShell()
Returns the main shell for this entrypoint.

Returns:
the main shell, or null if the shell is not created yet

createContents

protected abstract void createContents(Composite parent)
Creates the controls that constitute the UI for this entrypoint. Subclasses must implement this method and set the parent's layout as needed.

An implementation must not create an SWT event loop. This is done by the base class as needed.

Parameters:
parent - the parent composite to contain the content

createShell

protected Shell createShell(Display display)
Creates the main shell for this entrypoint. The default implementation creates a maximized shell without any trimmings. Subclasses may override this method in order to create a different kind of shell.

Parameters:
display - the display to create the shell on
Returns:
the created shell

Eclipse Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0