Skip to content

Commit

Permalink
Add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Oct 15, 2023
1 parent 8f74436 commit c4ec970
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/bdv/ui/settings/SettingsPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ public void removePage( final String path )
pages.repaint();
}

/**
* Shows the settings page with the specified path. Does nothing if there is
* no settings page for the path. If (any part of) the path is collapsed in
* the tree, it is expanded.
*
* @param path
* the path of the settings page to remove. Example:
* {@code "Analyze > Tables"}
*/
public void showPage( final String path )
{
final TreeNode current = getSettingsPageNode( path, false );
Expand Down Expand Up @@ -345,6 +354,16 @@ public void mouseClicked( final MouseEvent e )
breadcrumbs.repaint();
}

/**
* Get the TreeNode for a given settings page path.
*
* @param path
* the path of the settings page to remove. Example: {@code "Analyze > Tables"}
* @param createIfNotExists
* if {@code true}, nodes for non-existing pages are created.
*
* @return TreeNode corresponding to {@code path}, or {@code null} if there is no such page.
*/
private DefaultMutableTreeNode getSettingsPageNode( final String path, final boolean createIfNotExists )
{
final String[] parts = path.split( ">" );
Expand Down

0 comments on commit c4ec970

Please sign in to comment.