java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.scene.input.InputEvent
com.flexganttfx.view.graphics.LassoEvent
- All Implemented Interfaces:
Serializable
,Cloneable
public class LassoEvent extends InputEvent
Lasso events are being fired whenever the user uses the lasso tool to select
a time interval on one or more rows.
Code Example 1
GanttChart gantt = new GanttChart(); GraphicsView graphics = gantt.getGraphics(); graphics.setOnLassoSelectionStarted(evt -> handleChange(evt));
Code Example 2
GanttChart gantt = new GanttChart(); GraphicsView graphics = gantt.getGraphics(); graphics.addEventHandler(LassoEvent.SELECTION_STARTED, evt -> handleChange(evt));
- Since:
- 1.0
- See Also:
GraphicsBase.setOnLassoSelectionStarted(javafx.event.EventHandler)
, Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LassoEvent.LassoInfo
Stores information about the last lasso operation performed by the user. -
Field Summary
Fields Modifier and Type Field Description static EventType<LassoEvent>
ALL
The parent event type of all other lasso event types.static EventType<LassoEvent>
SELECTION_FINISHED
An event type used when the user finishes a selection with the lasso.static EventType<LassoEvent>
SELECTION_ONGOING
An event type used while the user is using the lasso to perform a selection.static EventType<LassoEvent>
SELECTION_STARTED
An event type used when the user starts a selection with the lasso.Fields inherited from class javafx.scene.input.InputEvent
ANY
Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
Constructors Constructor Description LassoEvent(GraphicsBase<?> target, EventType<? extends LassoEvent> eventType, LassoEvent.LassoInfo info)
Constructs a new event object. -
Method Summary
Modifier and Type Method Description LassoEvent.LassoInfo
getInfo()
Returns the detailed information about the lasso operation (selected rows, selected time interval, etc...).String
toString()
Methods inherited from class javafx.scene.input.InputEvent
getEventType
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getTarget, isConsumed
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
ALL
The parent event type of all other lasso event types. Gets fired whenever anything changes.- Since:
- 1.0
-
SELECTION_STARTED
An event type used when the user starts a selection with the lasso.- Since:
- 1.0
-
SELECTION_FINISHED
An event type used when the user finishes a selection with the lasso.- Since:
- 1.0
-
SELECTION_ONGOING
An event type used while the user is using the lasso to perform a selection.- Since:
- 1.0
-
-
Constructor Details
-
LassoEvent
public LassoEvent(GraphicsBase<?> target, EventType<? extends LassoEvent> eventType, LassoEvent.LassoInfo info)Constructs a new event object.- Parameters:
target
- the graphics control where the event originatedeventType
- the type of the eventinfo
- detailed information about the lasso operation (selected rows, selected time interval, etc...)
-
-
Method Details
-
getInfo
Returns the detailed information about the lasso operation (selected rows, selected time interval, etc...).- Returns:
- the lasso event information
-
toString
- Overrides:
toString
in classEventObject
-