public class SimpleSettingsPage extends Object implements SettingsPage
JPanel as a page into a
SettingsPanel.
Call notifyModified() when edits were made in your panel. (This will
trigger correct "Cancel", "Apply", and "OK" behaviour by the
SettingsPanel.)
To specify what should happen on "Apply" (propagate panel edits to your data
model) add a #runOnApply callback. To specify what should happen on
"Cancel" (reset panel contents to your data model) add a #runOnCancel
callback.
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<Runnable> |
runOnApply |
protected ArrayList<Runnable> |
runOnCancel |
| Constructor and Description |
|---|
SimpleSettingsPage(String treePath,
JPanel 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". |
JPanel |
getJPanel() |
String |
getTreePath()
Get the path of this page in the settings tree.
|
org.scijava.listeners.Listeners<ModificationListener> |
modificationListeners() |
void |
notifyModified() |
void |
onApply(Runnable runnable) |
void |
onCancel(Runnable runnable) |
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 void notifyModified()
public org.scijava.listeners.Listeners<ModificationListener> modificationListeners()
modificationListeners in interface SettingsPagepublic void onApply(Runnable runnable)
public void onCancel(Runnable runnable)
public void cancel()
SettingsPageSettingsPanel if user presses "Cancel". Should
restore any modified state to the original state.cancel in interface SettingsPagepublic void apply()
SettingsPageSettingsPanel if user presses "OK" or "Apply".
Should commit any modified state.apply in interface SettingsPageCopyright © 2012–2024 BigDataViewer. All rights reserved.