Package net.sf.gridarta.gui.misc
Class MainView
- java.lang.Object
-
- net.sf.gridarta.gui.misc.MainView
-
public class MainView extends java.lang.ObjectMain window of the level editor. Contains the desktop for the map windows (internal frames) and the tools.
-
-
Constructor Summary
Constructors Constructor Description 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)Constructs the main view and registers the given main controller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTab(@NotNull Tab tab)Adds a tab.@Nullable TabgetActiveTab(@NotNull Location location, boolean alternativeLocation)voidhandleThrowable(java.lang.Throwable t)This implementation displays the exception in a modal message dialog.
-
-
-
Constructor Detail
-
MainView
public MainView(@NotNull @NotNull javax.swing.JFrame frame, @NotNull @NotNull java.awt.event.ActionListener exitAction, @NotNull @NotNull java.awt.Component mapDesktop, @Nullable @Nullable javax.swing.ImageIcon icon, @NotNull @NotNull Exiter exiter)Constructs the main view and registers the given main controller.- Parameters:
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 ornullfor defaultexiter- the exiter instance
-
-
Method Detail
-
addTab
public void addTab(@NotNull @NotNull Tab tab)Adds a tab.- Parameters:
tab- the tab
-
getActiveTab
@Nullable public @Nullable Tab getActiveTab(@NotNull @NotNull Location location, boolean alternativeLocation)
- Parameters:
location- the locationalternativeLocation- whether the alternative location should be checked- Returns:
- the tab or
nullif no active tab exists
-
handleThrowable
public void handleThrowable(java.lang.Throwable t)
This implementation displays the exception in a modal message dialog.
-
-