Class WelcomeContent
java.lang.Object
com.amalgamasimulation.desktop.appelements.parts.WelcomeContent
Content of the welcome page that AbstractWelcomePart passes to createContent. The methods add
elements from top to bottom in the order of the calls: an image, sections, lines of text, links
and lists of files. Each method returns this WelcomeContent, so the calls can be chained.
- Author:
- Ionov Ivan
-
Method Summary
Modifier and TypeMethodDescriptionAdds one link for each path.fileSection(org.eclipse.swt.graphics.Image icon, String title, List<String> paths, Consumer<String> open) Adds a section with the icon, a line with the title and links to the files, as files does.image(org.eclipse.swt.graphics.Image image) Adds an image at the left edge.Adds a line with a link to the current section.section()Starts a section without an icon.section(org.eclipse.swt.graphics.Image icon) Starts a section.Adds a line of text to the current section.
-
Method Details
-
image
Adds an image at the left edge. The next element starts below the image, after a gap. -
section
Starts a section without an icon. A section is a group of lines with a gap before it when it follows another section. -
section
Starts a section. If the icon is not null, the page draws it to the left of the first line of the section. -
text
Adds a line of text to the current section. -
link
Adds a line with a link to the current section. If the user clicks the link, the page runs the action. -
files
Adds one link for each path. If a path is longer than 60 characters, an ellipsis replaces its middle. If the user clicks a link, open receives the full path. -
fileSection
public WelcomeContent fileSection(org.eclipse.swt.graphics.Image icon, String title, List<String> paths, Consumer<String> open) Adds a section with the icon, a line with the title and links to the files, as files does. If the list of paths is empty, adds nothing.
-