public class ConfigurationDialog
extends javafx.stage.Stage
To create a custom ConfigurationDialog
, in the containing class,
list out what properties the user may configure. In most cases, the containing
class will be of type BaseGraphApp
, and the supported property types are
Then find the appropriate method and add that property to the configuration dialog. For some properties such as the interpolation scheme and number color mapping, the user cannot choose anything s/he wants. Therefore, a list of allowed properties is also required
For example, to allow a NumberColorMap
property to be configured,
simply use the code
Property< NumberColorMap > p = ...
NumberColorMap[] allowedNumberColorMaps = ...
configurationDialog.addNumberColorMapListProperty( p );
Constructor and Description |
---|
ConfigurationDialog()
Creates a default configuration dialog with no configurations available
|
Modifier and Type | Method and Description |
---|---|
void |
addBooleanProperty(String name,
javafx.beans.property.BooleanProperty p)
Adds the given boolean property as something the user may configure.
|
void |
addInterpolationSchemeListProperty(String name,
javafx.beans.property.Property<InterpolationScheme> p,
InterpolationScheme[] allowedInterpolations)
Adds the given interpolation scheme property as something the user may
configure.
|
void |
addNumberColorMapListProperty(String name,
javafx.beans.property.Property<NumberColorMap> p,
NumberColorMap[] allowedMappings)
Adds the given number-color mapping property as something the user may
configure.
|
void |
addStringProperty(String name,
javafx.beans.property.StringProperty p)
Adds the given string property as something the user may configure.
|
void |
cancelChanges()
Discards the user's current configurations and reverts to the previous
saved configuration state
|
void |
loadSaved()
Loads the previously saved configuration state, discarding any
configurations that may currently exist.
|
void |
open()
Opens this configuration dialog.
|
void |
saveChanges()
Saves the current configuration state so that the user may revert to it
later if necessary
|
alwaysOnTopProperty, close, fullScreenExitHintProperty, fullScreenExitKeyProperty, fullScreenProperty, getFullScreenExitHint, getFullScreenExitKeyCombination, getIcons, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getModality, getOwner, getStyle, getTitle, iconifiedProperty, impl_getMXWindowType, impl_setImportant, impl_setPrimary, impl_visibleChanged, impl_visibleChanging, initModality, initOwner, initStyle, isAlwaysOnTop, isFullScreen, isIconified, isMaximized, isResizable, maxHeightProperty, maximizedProperty, maxWidthProperty, minHeightProperty, minWidthProperty, resizableProperty, setAlwaysOnTop, setFullScreen, setFullScreenExitHint, setFullScreenExitKeyCombination, setIconified, setMaxHeight, setMaximized, setMaxWidth, setMinHeight, setMinWidth, setResizable, setScene, setTitle, show, showAndWait, titleProperty, toBack, toFront
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getProperties, getScene, getUserData, getWidth, getX, getY, hasProperties, heightProperty, hide, impl_getPeer, impl_getWindows, isFocused, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, removeEventFilter, removeEventHandler, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setFocused, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setUserData, setWidth, setX, setY, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
public ConfigurationDialog()
public void addStringProperty(String name, javafx.beans.property.StringProperty p)
name
- the textual name of the property (e.g. "X Column")p
- the string property that the user may modifypublic void addBooleanProperty(String name, javafx.beans.property.BooleanProperty p)
name
- the textual name of the property (e.g. "X Column")p
- the boolean property that the user may modifypublic void addInterpolationSchemeListProperty(String name, javafx.beans.property.Property<InterpolationScheme> p, InterpolationScheme[] allowedInterpolations)
name
- the textual name of the property (e.g. "X Column")p
- the interpolation scheme property that the user may modifyallowedInterpolations
- the list of allowed interpolation schemespublic void addNumberColorMapListProperty(String name, javafx.beans.property.Property<NumberColorMap> p, NumberColorMap[] allowedMappings)
name
- the textual name of the property (e.g. "X Column")p
- the number-color mapping property that the user may modifyallowedMappings
- the list of allowed number-color mappingspublic void saveChanges()
public void cancelChanges()
public void loadSaved()
public void open()
Copyright © 2015. All rights reserved.