Package dk.gtz.graphedit.viewmodel
Class ViewModelLint
java.lang.Object
dk.gtz.graphedit.viewmodel.ViewModelLint
- All Implemented Interfaces:
IFocusable
Viewmodel representation of
ModelLint
.
A Lint is a special kind of diagnostic annotation that can provide smart meta-insights about sections of a graph.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFocusListener
(Runnable focusEventHandler) Add an event listener for when the focus is stolenjavafx.beans.property.ListProperty<UUID>
Get the list of affected vertices or edges.javafx.beans.property.ListProperty<javafx.beans.property.ListProperty<ViewModelPoint>>
Get the list of affected regions.void
focus()
Steal the focusjavafx.beans.property.StringProperty
Get the unique identifier of the lint.javafx.beans.property.StringProperty
message()
Get the lint's display message.javafx.beans.property.ObjectProperty<ModelLintSeverity>
severity()
Get the severity level of the lintjavafx.beans.property.StringProperty
title()
Get the brief headline describing the lint.
-
Constructor Details
-
ViewModelLint
Construct a new viewmodel lint.- Parameters:
lint
- The model lint to base on
-
-
Method Details
-
lintIdentifier
public javafx.beans.property.StringProperty lintIdentifier()Get the unique identifier of the lint.- Returns:
- A string property with the lint's unique identifier.
-
severity
Get the severity level of the lint- Returns:
- An object property with the severity level enumeration.
-
title
public javafx.beans.property.StringProperty title()Get the brief headline describing the lint.- Returns:
- A string property with the lint's title.
-
message
public javafx.beans.property.StringProperty message()Get the lint's display message.- Returns:
- A string property with the lint's display message.
-
affectedElements
Get the list of affected vertices or edges.- Returns:
- A list property with the uuids of the affected syntactic elements.
-
affectedRegions
public javafx.beans.property.ListProperty<javafx.beans.property.ListProperty<ViewModelPoint>> affectedRegions()Get the list of affected regions.- Returns:
- A list property of lists of clock-wise sorted points, each representing a polygon region.
-
addFocusListener
Description copied from interface:IFocusable
Add an event listener for when the focus is stolen- Specified by:
addFocusListener
in interfaceIFocusable
- Parameters:
focusEventHandler
- the handler to call
-
focus
public void focus()Description copied from interface:IFocusable
Steal the focus- Specified by:
focus
in interfaceIFocusable
-