public abstract class AbstractEntryPoint extends java.lang.Object implements EntryPoint, StartupParameters
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.
Constructor and Description |
---|
AbstractEntryPoint() |
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getParameter(java.lang.String name)
Returns the value of a named entrypoint startup parameter.
|
java.util.Collection<java.lang.String> |
getParameterNames()
Returns the names of the entrypoint startup parameters.
|
java.util.List<java.lang.String> |
getParameterValues(java.lang.String name)
Returns a list with values of a named entrypoint startup parameter.
|
protected Shell |
getShell()
Returns the main shell for this entrypoint.
|
public int createUI()
createContents(Composite)
instead of overriding this method.createUI
in interface EntryPoint
public java.util.Collection<java.lang.String> getParameterNames()
getParameterNames
in interface StartupParameters
public java.lang.String getParameter(java.lang.String name)
getParameterValues(java.lang.String)
.
If you use this method with a multivalued parameter, the value returned is equal to the first
value in the list returned by getParameterValues
.getParameter
in interface StartupParameters
name
- the name of the parameternull
if the parameter does not existpublic java.util.List<java.lang.String> getParameterValues(java.lang.String name)
getParameterValues
in interface StartupParameters
name
- the name of the parameternull
if the parameter does not existprotected Shell getShell()
null
if the shell is not created yetprotected abstract void createContents(Composite parent)
An implementation must not create an SWT event loop. This is done by the base class as needed.
parent
- the parent composite to contain the contentprotected Shell createShell(Display display)
display
- the display to create the shell on
Copyright (c) EclipseSource and others 2002, 2016.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0