Class AbstractWelcomePart
java.lang.Object
com.amalgamasimulation.desktop.appelements.parts.AbstractWelcomePart
Base part for the welcome page of an application. The part draws its content in an
SWT2DAnimationView that fills the part. A subclass defines the content in createContent with
WelcomeContent: an image and sections with text, links and lists of recent files. The part builds
the content again on the NEW_SCENARIO, NEW_STUDY_LOADED and NEW_STUDY_SAVED messages from
PlatformTopics.
- Author:
- Ionov Ivan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.amalgamasimulation.desktop.utils.MessageManagerprotected org.eclipse.swt.widgets.Shell -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcreateContent(WelcomeContent content) Adds the content of the welcome page to the given WelcomeContent.existingFiles(String[] paths) Returns the paths of the files that exist, in the same order.voidpostConstruct(org.eclipse.swt.widgets.Composite parent) Creates the drawing area in the parent, subscribes to the messages and builds the content.voidrefresh()Builds the content again: removes the old content and calls createContent.
-
Field Details
-
messageManager
@Inject protected com.amalgamasimulation.desktop.utils.MessageManager messageManager -
shell
@Inject protected org.eclipse.swt.widgets.Shell shell
-
-
Constructor Details
-
AbstractWelcomePart
public AbstractWelcomePart()
-
-
Method Details
-
postConstruct
@PostConstruct public void postConstruct(org.eclipse.swt.widgets.Composite parent) Creates the drawing area in the parent, subscribes to the messages and builds the content. If a subclass must prepare something before the first build, it overrides this method and calls super.postConstruct(parent) at the end. -
createContent
Adds the content of the welcome page to the given WelcomeContent. The part calls this method on every build, and each time the WelcomeContent is new and empty. -
refresh
public void refresh()Builds the content again: removes the old content and calls createContent. -
existingFiles
Returns the paths of the files that exist, in the same order. Leaves out blank paths and paths to missing files.
-