WindowManager

public class WindowManager

Main GUI class for the Mastodon Mamut application.

It controls the creation of new views, and maintain a list of currently opened views. It has a getProjectManager() instance that can be used to open or create Mastodon projects. It has also the main app-model for the session.

Author:

Tobias Pietzsch, Jean-Yves Tinevez

Methods

closeAllWindows

public void closeAllWindows()

Close all opened views and dialogs.

computeFeatures

public void computeFeatures()

Displays the feature computation dialog.

createBigDataViewer

public MamutViewBdv createBigDataViewer()

Creates and displays a new BDV view, with default display settings.

createBigDataViewer

public MamutViewBdv createBigDataViewer(Map<String, Object> guiState)

Creates and displays a new BDV view, using a map to specify the display settings.

The display settings are specified as a map of strings to objects. The accepted key and value types are:

  • 'FramePosition' → an int[] array of 4 elements: x, y, width and height.

  • 'LockGroupId' → an integer that specifies the lock group id.

  • 'SettingsPanelVisible' → a boolean that specifies whether the settings panel is visible on this view.

  • 'BdvState' → a XML Element that specifies the BDV window state. See ViewerPanel.stateToXml() and ViewerPanel.stateFromXml(org.jdom2.Element) for more information.

  • 'BdvTransform' → an AffineTransform3D that specifies the view point.

  • 'NoColoring' → a boolean; if true, the feature or tag coloring will be ignored.

  • 'TagSet' → a string specifying the name of the tag-set to use for coloring. If not null, the coloring will be done using the tag-set.

  • 'FeatureColorMode' → a String specifying the name of the feature color mode to use for coloring. If not null, the coloring will be done using the feature color mode.

  • 'ColorbarVisible' → a boolean specifying whether the colorbar is visible for tag-set and feature-based coloring.

  • 'ColorbarPosition' → a Position specifying the position of the colorbar.

Parameters:
  • guiState – the map of settings.

createBranchBigDataViewer

public MamutBranchViewBdv createBranchBigDataViewer()

Creates and displays a new Branch-BDV view, with default display settings. The branch version of this view displays the branch graph.

createBranchBigDataViewer

public MamutBranchViewBdv createBranchBigDataViewer(Map<String, Object> guiState)

Creates and displays a new Branch-BDV view, using a map to specify the display settings.

Parameters:
  • guiState – the settings map.

See also: .createBigDataViewer(Map)

createBranchTrackScheme

public MamutBranchViewTrackScheme createBranchTrackScheme()

Creates and displays a new Branch-TrackScheme view, with default display settings. The branch version of this view displays the branch graph.

createBranchTrackScheme

public MamutBranchViewTrackScheme createBranchTrackScheme(Map<String, Object> guiState)

Creates and displays a new Branch-TrackScheme view, using a map to specify the display settings.

Parameters:
  • guiState – the settings map.

See also: .createTrackScheme(Map)

createGrapher

public MamutViewGrapher createGrapher()

Creates and displays a new Grapher view, with default display settings.

createGrapher

public MamutViewGrapher createGrapher(Map<String, Object> guiState)

Creates and displays a new Grapher view, using a map to specify the display settings.

The display settings are specified as a map of strings to objects. The accepted key and value types are:

  • 'FramePosition' → an int[] array of 4 elements: x, y, width and height.

  • 'LockGroupId' → an integer that specifies the lock group id.

  • 'SettingsPanelVisible' → a boolean that specifies whether the settings panel is visible on this view.

  • 'NoColoring' → a boolean; if true, the feature or tag coloring will be ignored.

  • 'TagSet' → a string specifying the name of the tag-set to use for coloring. If not null, the coloring will be done using the tag-set.

  • 'FeatureColorMode' → a @link String specifying the name of the feature color mode to use for coloring. If not null, the coloring will be done using the feature color mode.

  • 'ColorbarVisible' → a boolean specifying whether the colorbar is visible for tag-set and feature-based coloring.

  • 'ColorbarPosition' → a Position specifying the position of the colorbar.

  • 'GrapherTransform' → a org.mastodon.views.grapher.datagraph.ScreenTransform specifying the region to initially zoom on the XY plot.

Parameters:
  • guiState – the map of settings.

createHierarchyTrackScheme

public MamutBranchViewTrackScheme createHierarchyTrackScheme()

Creates and displays a new Hierarchy-TrackScheme view, with default display settings.

createHierarchyTrackScheme

public MamutBranchViewTrackScheme createHierarchyTrackScheme(Map<String, Object> guiState)

Creates and displays a new Hierarchy-TrackScheme view, using a map to specify the display settings.

Parameters:
  • guiState – the settings map.

See also: .createTrackScheme(Map)

createTable

public MamutViewTable createTable(Map<String, Object> guiState)

Creates and displays a new Table or a Selection Table view, using a map to specify the display settings.

The display settings are specified as a map of strings to objects. The accepted key and value types are:

  • 'TableSelectionOnly' → a boolean specifying whether the table to create will be a selection table of a full table. If true, the table will only display the current content of the selection, and will listen to its changes. If false, the table will display the full graph content, listen to its changes, and will be able to edit the selection.

  • 'FramePosition' → an int[] array of 4 elements: x, y, width and height.

  • 'LockGroupId' → an integer that specifies the lock group id.

  • 'SettingsPanelVisible' → a boolean that specifies whether the settings panel is visible on this view.

  • 'NoColoring' → a boolean; if true, the feature or tag coloring will be ignored.

  • 'TagSet' → a string specifying the name of the tag-set to use for coloring. If not null, the coloring will be done using the tag-set.

  • 'FeatureColorMode' → a @link String specifying the name of the feature color mode to use for coloring. If not null, the coloring will be done using the feature color mode.

  • 'ColorbarVisible' → a boolean specifying whether the colorbar is visible for tag-set and feature-based coloring.

  • 'ColorbarPosition' → a Position specifying the position of the colorbar.

Parameters:
  • guiState – the map of settings.

createTable

public MamutViewTable createTable(boolean selectionOnly)

Creates and display a new Table or Selection Table view with default settings.

Parameters:
  • selectionOnly – if true, the table will only display the current content of the selection, and will listen to its changes. If false, the table will display the full graph content, listen to its changes, and will be able to edit the selection.

Returns:

a new table view.

createTrackScheme

public MamutViewTrackScheme createTrackScheme()

Creates and displays a new TrackScheme view, with default display settings.

createTrackScheme

public MamutViewTrackScheme createTrackScheme(Map<String, Object> guiState)

Creates and displays a new BDV view, using a map to specify the display settings.

The display settings are specified as a map of strings to objects. The accepted key and value types are:

  • 'FramePosition' → an int[] array of 4 elements: x, y, width and height.

  • 'LockGroupId' → an integer that specifies the lock group id.

  • 'SettingsPanelVisible' → a boolean that specifies whether the settings panel is visible on this view.

  • 'TrackSchemeTransform' → a ScreenTransform that defines the starting view zone in TrackScheme.

  • 'NoColoring' → a boolean; if true, the feature or tag coloring will be ignored.

  • 'TagSet' → a string specifying the name of the tag-set to use for coloring. If not null, the coloring will be done using the tag-set.

  • 'FeatureColorMode' → a @link String specifying the name of the feature color mode to use for coloring. If not null, the coloring will be done using the feature color mode.

  • 'ColorbarVisible' → a boolean specifying whether the colorbar is visible for tag-set and feature-based coloring.

  • 'ColorbarPosition' → a Position specifying the position of the colorbar.

Parameters:
  • guiState – the map of settings.

editTagSets

public void editTagSets()

Displays the tag-set editor dialog.

forEachBdvView

public void forEachBdvView(Consumer<? super MamutViewBdv> action)

Executes the specified action for all the currently opened BDV views.

Parameters:
  • action – the action to execute.

forEachBranchTrackSchemeView

public void forEachBranchTrackSchemeView(Consumer<? super MamutBranchViewTrackScheme> action)

Executes the specified action for all the currently opened Branch-TrackScheme views.

Parameters:
  • action – the action to execute.

forEachBranchView

public void forEachBranchView(Consumer<? super MamutBranchView<?, ?, ?>> action)

Executes the specified action for all the currently opened branch-graph views.

Parameters:
  • action – the action to execute.

forEachGrapherView

public void forEachGrapherView(Consumer<? super MamutViewGrapher> action)

Executes the specified action for all the currently opened Grapher views.

Parameters:
  • action – the action to execute.

forEachTableView

public void forEachTableView(Consumer<? super MamutViewTable> action)

Executes the specified action for all the currently opened Table views.

Parameters:
  • action – the action to execute.

forEachTrackSchemeView

public void forEachTrackSchemeView(Consumer<? super MamutViewTrackScheme> action)

Executes the specified action for all the currently opened TrackScheme views.

Parameters:
  • action – the action to execute.

forEachView

public void forEachView(Consumer<? super MamutView<?, ?, ?>> action)

Executes the specified action for all the currently opened views.

Parameters:
  • action – the action to execute.

getBdvWindows

public List<MamutViewBdv> getBdvWindows()

Exposes currently open BigDataViewer windows.

Returns:

a List of MamutViewBdv.

openOnlineDocumentation

public void openOnlineDocumentation()

Opens the online documentation in a browser window.