T - type of thing being edited, e.g., TrackSchemeStyle.public class SelectAndEditProfileSettingsPage<T extends SelectAndEditProfileSettingsPage.Profile> extends Object implements SettingsPage
SettingsPage for the following common scenario: There are multiple
"profiles" (e.g., keymaps, trackscheme styles, ...) to select from, and its
possible to edit each individual profile.
To instantiate such a SettingsPage, a ProfileManager and a
ProfileEditPanel have to be provided. The SelectAndEditProfileSettingsPage.ProfileManager is
responsible for selecting/renaming/etc profile. The SelectAndEditProfileSettingsPage.ProfileEditPanel
is responsible for editing an individual profile.
The SelectAndEditProfileSettingsPage provides UI for selecting,
duplicating, renaming, and deleting profiles. If a Profile is
built-in it is unmodifiable. When the user edits
it, a duplicate is made automatically.
| Modifier and Type | Class and Description |
|---|---|
static interface |
SelectAndEditProfileSettingsPage.Profile
Interface for the objects that are edited and selected in a
SelectAndEditProfileSettingsPage. |
static interface |
SelectAndEditProfileSettingsPage.ProfileEditPanel<T>
Class that edits a profile of type
T in a JPanel. |
static interface |
SelectAndEditProfileSettingsPage.ProfileManager<T extends SelectAndEditProfileSettingsPage.Profile>
Interface for classes that manage a collection of profiles.
|
| Constructor and Description |
|---|
SelectAndEditProfileSettingsPage(String treePath,
SelectAndEditProfileSettingsPage.ProfileManager<T> profileManager,
SelectAndEditProfileSettingsPage.ProfileEditPanel<T> profileEditPanel)
Creates a new
SelectAndEditProfileSettingsPage for the specified
profile manager and the specified editor panel. |
| Modifier and Type | Method and Description |
|---|---|
void |
apply()
Called by the
SettingsPanel if user presses "OK" or "Apply". |
void |
cancel()
Called by the
SettingsPanel if user presses "Cancel". |
static <M extends StyleManager<M,S>,S extends Style<S>> |
forStyle(M manager,
M editingManager,
SelectAndEditProfileSettingsPage.ProfileEditPanel<StyleProfile<S>> settingsPage,
String treePath) |
JPanel |
getJPanel() |
String |
getTreePath()
Get the path of this page in the settings tree.
|
org.scijava.listeners.Listeners<ModificationListener> |
modificationListeners() |
public SelectAndEditProfileSettingsPage(String treePath, SelectAndEditProfileSettingsPage.ProfileManager<T> profileManager, SelectAndEditProfileSettingsPage.ProfileEditPanel<T> profileEditPanel)
SelectAndEditProfileSettingsPage for the specified
profile manager and the specified editor panel.treePath - path of this page in the settings tree.profileManager - the profile manager.profileEditPanel - the profile edit panel.public static <M extends StyleManager<M,S>,S extends Style<S>> SelectAndEditProfileSettingsPage<StyleProfile<S>> forStyle(M manager, M editingManager, SelectAndEditProfileSettingsPage.ProfileEditPanel<StyleProfile<S>> settingsPage, String treePath)
public String getTreePath()
SettingsPage
The path is split at ">" to get the nodes along the settings tree
branch.
getTreePath in interface SettingsPagepublic JPanel getJPanel()
getJPanel in interface SettingsPagepublic org.scijava.listeners.Listeners<ModificationListener> modificationListeners()
modificationListeners in interface SettingsPagepublic void apply()
SettingsPageSettingsPanel if user presses "OK" or "Apply".
Should commit any modified state.apply in interface SettingsPagepublic void cancel()
SettingsPageSettingsPanel if user presses "Cancel". Should
restore any modified state to the original state.cancel in interface SettingsPageCopyright © 2012–2025 BigDataViewer. All rights reserved.