Package dk.gtz.graphedit.viewmodel
Record Class ViewModelEditorSettings
java.lang.Object
java.lang.Record
dk.gtz.graphedit.viewmodel.ViewModelEditorSettings
- Record Components:
gridSizeX
- Width of snapgrid cellsgridSizeY
- Height of snapgrid cellsgridSnap
- When true, vertices will snap to the griduseLightTheme
- When true, the editor will use a light color schemeautoOpenLastProject
- When true, the last opened project will be automatically opened next time you start the editorshowInspectorPane
- (Deprecated) doesn't do anything anymoreshowInfoToasts
- When true, will display toasts on logger.info callsshowWarnToasts
- When true, will display toasts on logger.warn callsshowErrorToasts
- When true, will display toasts on logger.error callsshowTraceToasts
- When true, will display toasts on logger.trace callslastOpenedProject
- Filepath to the last opened graphedit project filerecentProjects
- List of filepaths that have been recently openeddisabledPlugins
- List of plugin names that are loaded, but not initializedtipIndex
- Index of the last shown tipshowTips
- When true, will show tips on startup
public record ViewModelEditorSettings(javafx.beans.property.DoubleProperty gridSizeX, javafx.beans.property.DoubleProperty gridSizeY, javafx.beans.property.BooleanProperty gridSnap, javafx.beans.property.BooleanProperty useLightTheme, javafx.beans.property.BooleanProperty autoOpenLastProject, javafx.beans.property.BooleanProperty showInspectorPane, javafx.beans.property.BooleanProperty showInfoToasts, javafx.beans.property.BooleanProperty showWarnToasts, javafx.beans.property.BooleanProperty showErrorToasts, javafx.beans.property.BooleanProperty showTraceToasts, javafx.beans.property.StringProperty lastOpenedProject, javafx.beans.property.ListProperty<String> recentProjects, javafx.beans.property.ListProperty<String> disabledPlugins, javafx.beans.property.IntegerProperty tipIndex, javafx.beans.property.BooleanProperty showTips)
extends Record
View model representation of the global editor settings
-
Constructor Summary
ConstructorsConstructorDescriptionViewModelEditorSettings
(double gridSizeX, double gridSizeY, boolean gridSnap, boolean useLightTheme, boolean autoOpenLastProject, boolean showInspectorPane, boolean showInfoToasts, boolean showWarnToasts, boolean showErrorToasts, boolean showTraceToasts, String lastOpenedProject, List<String> recentProjects, List<String> disabledPlugins, int tipIndex, boolean showTips) Construct a new instanceViewModelEditorSettings
(ModelEditorSettings settings) Construct a new instanceViewModelEditorSettings
(javafx.beans.property.DoubleProperty gridSizeX, javafx.beans.property.DoubleProperty gridSizeY, javafx.beans.property.BooleanProperty gridSnap, javafx.beans.property.BooleanProperty useLightTheme, javafx.beans.property.BooleanProperty autoOpenLastProject, javafx.beans.property.BooleanProperty showInspectorPane, javafx.beans.property.BooleanProperty showInfoToasts, javafx.beans.property.BooleanProperty showWarnToasts, javafx.beans.property.BooleanProperty showErrorToasts, javafx.beans.property.BooleanProperty showTraceToasts, javafx.beans.property.StringProperty lastOpenedProject, javafx.beans.property.ListProperty<String> recentProjects, javafx.beans.property.ListProperty<String> disabledPlugins, javafx.beans.property.IntegerProperty tipIndex, javafx.beans.property.BooleanProperty showTips) Creates an instance of aViewModelEditorSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.BooleanProperty
Returns the value of theautoOpenLastProject
record component.javafx.beans.property.ListProperty<String>
Returns the value of thedisabledPlugins
record component.final boolean
Indicates whether some other object is "equal to" this one.javafx.beans.property.DoubleProperty
Returns the value of thegridSizeX
record component.javafx.beans.property.DoubleProperty
Returns the value of thegridSizeY
record component.javafx.beans.property.BooleanProperty
gridSnap()
Returns the value of thegridSnap
record component.final int
hashCode()
Returns a hash code value for this object.javafx.beans.property.StringProperty
Returns the value of thelastOpenedProject
record component.javafx.beans.property.ListProperty<String>
Returns the value of therecentProjects
record component.javafx.beans.property.BooleanProperty
Returns the value of theshowErrorToasts
record component.javafx.beans.property.BooleanProperty
Returns the value of theshowInfoToasts
record component.javafx.beans.property.BooleanProperty
Deprecated.javafx.beans.property.BooleanProperty
showTips()
Returns the value of theshowTips
record component.javafx.beans.property.BooleanProperty
Returns the value of theshowTraceToasts
record component.javafx.beans.property.BooleanProperty
Returns the value of theshowWarnToasts
record component.javafx.beans.property.IntegerProperty
tipIndex()
Returns the value of thetipIndex
record component.final String
toString()
Returns a string representation of this record class.javafx.beans.property.BooleanProperty
Returns the value of theuseLightTheme
record component.
-
Constructor Details
-
ViewModelEditorSettings
Construct a new instance- Parameters:
settings
- The settings model object to base on
-
ViewModelEditorSettings
public ViewModelEditorSettings(double gridSizeX, double gridSizeY, boolean gridSnap, boolean useLightTheme, boolean autoOpenLastProject, @Deprecated boolean showInspectorPane, boolean showInfoToasts, boolean showWarnToasts, boolean showErrorToasts, boolean showTraceToasts, String lastOpenedProject, List<String> recentProjects, List<String> disabledPlugins, int tipIndex, boolean showTips) Construct a new instance- Parameters:
gridSizeX
- Width of snapgrid cellsgridSizeY
- Height of snapgrid cellsgridSnap
- When true, vertices will snap to the griduseLightTheme
- When true, the editor will use a light color schemeautoOpenLastProject
- When true, the last opened project will be automatically opened next time you start the editorshowInspectorPane
- (Deprecated) doesn't do anything anymoreshowInfoToasts
- When true, will display toasts on logger.info callsshowWarnToasts
- When true, will display toasts on logger.warn callsshowErrorToasts
- When true, will display toasts on logger.error callsshowTraceToasts
- When true, will display toasts on logger.trace callslastOpenedProject
- Filepath to the last opened graphedit project filerecentProjects
- List of filepaths that have been recently openeddisabledPlugins
- List of plugin names that are loaded, but not initializedtipIndex
- Index of the last shown tipshowTips
- When true, will show tips on startup
-
ViewModelEditorSettings
public ViewModelEditorSettings(javafx.beans.property.DoubleProperty gridSizeX, javafx.beans.property.DoubleProperty gridSizeY, javafx.beans.property.BooleanProperty gridSnap, javafx.beans.property.BooleanProperty useLightTheme, javafx.beans.property.BooleanProperty autoOpenLastProject, @Deprecated javafx.beans.property.BooleanProperty showInspectorPane, javafx.beans.property.BooleanProperty showInfoToasts, javafx.beans.property.BooleanProperty showWarnToasts, javafx.beans.property.BooleanProperty showErrorToasts, javafx.beans.property.BooleanProperty showTraceToasts, javafx.beans.property.StringProperty lastOpenedProject, javafx.beans.property.ListProperty<String> recentProjects, javafx.beans.property.ListProperty<String> disabledPlugins, javafx.beans.property.IntegerProperty tipIndex, javafx.beans.property.BooleanProperty showTips) Creates an instance of aViewModelEditorSettings
record class.- Parameters:
gridSizeX
- the value for thegridSizeX
record componentgridSizeY
- the value for thegridSizeY
record componentgridSnap
- the value for thegridSnap
record componentuseLightTheme
- the value for theuseLightTheme
record componentautoOpenLastProject
- the value for theautoOpenLastProject
record componentshowInspectorPane
- the value for theshowInspectorPane
record componentshowInfoToasts
- the value for theshowInfoToasts
record componentshowWarnToasts
- the value for theshowWarnToasts
record componentshowErrorToasts
- the value for theshowErrorToasts
record componentshowTraceToasts
- the value for theshowTraceToasts
record componentlastOpenedProject
- the value for thelastOpenedProject
record componentrecentProjects
- the value for therecentProjects
record componentdisabledPlugins
- the value for thedisabledPlugins
record componenttipIndex
- the value for thetipIndex
record componentshowTips
- the value for theshowTips
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
gridSizeX
public javafx.beans.property.DoubleProperty gridSizeX()Returns the value of thegridSizeX
record component.- Returns:
- the value of the
gridSizeX
record component
-
gridSizeY
public javafx.beans.property.DoubleProperty gridSizeY()Returns the value of thegridSizeY
record component.- Returns:
- the value of the
gridSizeY
record component
-
gridSnap
public javafx.beans.property.BooleanProperty gridSnap()Returns the value of thegridSnap
record component.- Returns:
- the value of the
gridSnap
record component
-
useLightTheme
public javafx.beans.property.BooleanProperty useLightTheme()Returns the value of theuseLightTheme
record component.- Returns:
- the value of the
useLightTheme
record component
-
autoOpenLastProject
public javafx.beans.property.BooleanProperty autoOpenLastProject()Returns the value of theautoOpenLastProject
record component.- Returns:
- the value of the
autoOpenLastProject
record component
-
showInspectorPane
Deprecated.Returns the value of theshowInspectorPane
record component.- Returns:
- the value of the
showInspectorPane
record component
-
showInfoToasts
public javafx.beans.property.BooleanProperty showInfoToasts()Returns the value of theshowInfoToasts
record component.- Returns:
- the value of the
showInfoToasts
record component
-
showWarnToasts
public javafx.beans.property.BooleanProperty showWarnToasts()Returns the value of theshowWarnToasts
record component.- Returns:
- the value of the
showWarnToasts
record component
-
showErrorToasts
public javafx.beans.property.BooleanProperty showErrorToasts()Returns the value of theshowErrorToasts
record component.- Returns:
- the value of the
showErrorToasts
record component
-
showTraceToasts
public javafx.beans.property.BooleanProperty showTraceToasts()Returns the value of theshowTraceToasts
record component.- Returns:
- the value of the
showTraceToasts
record component
-
lastOpenedProject
public javafx.beans.property.StringProperty lastOpenedProject()Returns the value of thelastOpenedProject
record component.- Returns:
- the value of the
lastOpenedProject
record component
-
recentProjects
Returns the value of therecentProjects
record component.- Returns:
- the value of the
recentProjects
record component
-
disabledPlugins
Returns the value of thedisabledPlugins
record component.- Returns:
- the value of the
disabledPlugins
record component
-
tipIndex
public javafx.beans.property.IntegerProperty tipIndex()Returns the value of thetipIndex
record component.- Returns:
- the value of the
tipIndex
record component
-
showTips
public javafx.beans.property.BooleanProperty showTips()Returns the value of theshowTips
record component.- Returns:
- the value of the
showTips
record component
-