public class EventSelectionHandler extends Object
EventPlotInfo
.Constructor and Description |
---|
EventSelectionHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addEventSelectionListener(EventSelectionListener listener) |
void |
addSelectedEvent(Event event) |
void |
clearSelectedEvents() |
float[] |
getSelectedEventBackgroundColor() |
float[] |
getSelectedEventBorderColor() |
float |
getSelectedEventBorderThickness() |
Set<Event> |
getSelectedEvents() |
boolean |
isAllowMouseEventSelection() |
boolean |
isAllowMultipleEventSelection() |
boolean |
isClearSelectionOnClick() |
boolean |
isEventSelected(Event event) |
boolean |
isHighlightSelectedEvents() |
void |
removeEventSelectionListener(EventSelectionListener listener) |
void |
removeSelectedEvent(Event event) |
void |
setAllowMouseEventSelection(boolean allowSelection)
If true, Events are automatically selected when users click inside or near
them with the mouse (unless they are set as unselectable via
Event.setSelectable(boolean) . |
void |
setAllowMultipleEventSelection(boolean allowMultiple)
If true, multiple events may be selected by holding down the ctrl key while
clicking them.
|
void |
setClearSelectionOnClick(boolean clear)
If true, the set of selected events is cleared when the user clicks
on an area of the timeline which contains no events.
|
void |
setHighlightSelectedEvents(boolean highlight) |
void |
setSelectedEventBackgroundColor(float[] color) |
void |
setSelectedEventBorderColor(float[] color) |
void |
setSelectedEventBorderThickness(float thickness) |
void |
setSelectedEvents(Set<Event> newEvents) |
public void addEventSelectionListener(EventSelectionListener listener)
public void removeEventSelectionListener(EventSelectionListener listener)
public void setAllowMultipleEventSelection(boolean allowMultiple)
public boolean isAllowMultipleEventSelection()
public void setClearSelectionOnClick(boolean clear)
clear
- public boolean isClearSelectionOnClick()
EventPlotInfo#setClearSelectionOnClick(boolean)
public void setAllowMouseEventSelection(boolean allowSelection)
If true, Events are automatically selected when users click inside or near
them with the mouse (unless they are set as unselectable via
Event.setSelectable(boolean)
. Clicking one event removes all other
selected events unless the ctrl key is held down, in which case the clicked
event is added or removed from the set of selected Events.
If custom selection semmantics are required (only selecting events
when their icon is clicked, for example), then
setAllowMouseEventSelection(boolean)
can be set to false and client
code can attach a custom EventPlotListener
or GlimpseMouseListener
which calls setSelectedEvents(Set)
as desired based on user clicks.
allowSelection
- public boolean isAllowMouseEventSelection()
public void clearSelectedEvents()
public void addSelectedEvent(Event event)
public void removeSelectedEvent(Event event)
public boolean isEventSelected(Event event)
public float[] getSelectedEventBorderColor()
public float[] getSelectedEventBackgroundColor()
public float getSelectedEventBorderThickness()
public boolean isHighlightSelectedEvents()
public void setSelectedEventBorderColor(float[] color)
public void setSelectedEventBackgroundColor(float[] color)
public void setSelectedEventBorderThickness(float thickness)
public void setHighlightSelectedEvents(boolean highlight)
Copyright © 2018 Metron, Inc.. All rights reserved.