public class MainView
extends java.lang.Object
Constructor and Description |
---|
MainView(javax.swing.JFrame frame,
java.awt.event.ActionListener exitAction,
java.awt.Component mapDesktop,
javax.swing.ImageIcon icon,
Exiter exiter)
Constructs the main view and registers the given main controller.
|
Modifier and Type | Method and Description |
---|---|
void |
addTab(Tab tab)
Adds a tab.
|
Tab |
getActiveTab(Location location,
boolean alternativeLocation)
|
void |
handleThrowable(java.lang.Throwable t)
This implementation displays the exception in a modal message dialog.
|
public MainView(@NotNull javax.swing.JFrame frame, @NotNull java.awt.event.ActionListener exitAction, @NotNull java.awt.Component mapDesktop, @Nullable javax.swing.ImageIcon icon, @NotNull Exiter exiter)
frame
- the main window of the editorexitAction
- the action to execute when the window is closedmapDesktop
- the map desktop to showicon
- the application's icon or null
for defaultexiter
- the exiter instancepublic void addTab(@NotNull Tab tab)
tab
- the tab@Nullable public Tab getActiveTab(@NotNull Location location, boolean alternativeLocation)
location
- the locationalternativeLocation
- whether the alternative location should be
checkednull
if no active tab existspublic void handleThrowable(java.lang.Throwable t)