Class AggregateEvent
- java.lang.Object
-
- com.metsci.glimpse.core.plot.timeline.event.Event
-
- com.metsci.glimpse.core.plot.timeline.event.AggregateEvent
-
public class AggregateEvent extends Event
When aStackedTimePlot2Dis zoomed out very far, Events can be squashed very close together in pixel space, making them hard to see.EventPlotInfocan alleviate this problem by automatically creating combined Events which represent aggregations of many user created Events.- Author:
- ulman
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.metsci.glimpse.core.plot.timeline.event.Event
Event.OverlapRenderingMode, Event.TextRenderingMode
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetEventCount()Gets the number of aggregated events that make up this event.inthashCode()Iterator<Event>iterator()EventPlotInfo can automatically create synthetic groups of Events when the timeline is zoomed out far enough that a bunch of Events are crowded into the same space.voidsetEditable(boolean isEditable)Sets whether or not the Event start and end times are modifiable by the user via mouse interaction.voidsetEndTime(TimeStamp endTime)voidsetEndTimeMoveable(boolean isEndTimeMoveable)If true, the endTime of the Event cannot be adjusted by user mouse gestures.voidsetFixedRow(int rowIndex)This event will appear on the requested row index in the timeline regardless of whether that causes it to overlap with other Events.voidsetFloatingRow()The row this Event appears on will be managed by itsEventPlotInfoparent.voidsetMaxTimeSpan(double maxTimeSpan)Sets the maximum time span between the start and end times.voidsetMinTimeSpan(double minTimeSpan)Sets the minimum (inclusive) span between the start and end times.voidsetResizeable(boolean isResizeable)If true, the time span of the Event (the amount of time between the start and end times) cannot be adjusted by user mouse gestures.voidsetStartTime(TimeStamp startTime)voidsetStartTimeMoveable(boolean isStartTimeMoveable)If true, the startTime of the Event cannot be adjusted by user mouse gestures.voidsetTimes(TimeStamp startTime, TimeStamp endTime)voidsetTimes(TimeStamp startTime, TimeStamp endTime, boolean force)Sets the start and end time for this Event.-
Methods inherited from class com.metsci.glimpse.core.plot.timeline.event.Event
addConstraint, contains, createDummyEvent, createDummyEvent, getBackgroundColor, getBorderColor, getBorderThickness, getDuration, getEndTime, getEndTimeComparator, getEventPainter, getEventPlotInfo, getIconId, getIconSize, getId, getLabel, getLabelColor, getMaxTimeSpan, getMinTimeSpan, getOverlapRenderingMode, getOverlapTime, getRow, getStartTime, getStartTimeComparator, getTextRenderingMode, getTimeSpan, getToolTipText, hasChildren, isEditable, isEndTimeMoveable, isFixedRow, isResizeable, isSelectable, isShowBackground, isShowBorder, isShowIcon, isShowLabel, isStartTimeMoveable, isUseDefaultBorderThickness, isUseDefaultIconSize, paint, removeConstraint, setBackgroundColor, setBorderColor, setBorderThickness, setEventPainter, setIconId, setIconSize, setLabel, setLabelColor, setOverlapMode, setSelectable, setShowBackground, setShowBorder, setShowIcon, setShowLabel, setTextRenderingMode, setTimes, setToolTipText, setUseDefaultBorderThickness, setUseDefaultIconSize, toString
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
public Iterator<Event> iterator()
EventPlotInfo can automatically create synthetic groups of Events when the timeline is zoomed out far enough that a bunch of Events are crowded into the same space. The individual constituent Events can be accessed via this method. User created Events never have children.
-
getEventCount
public int getEventCount()
Description copied from class:EventGets the number of aggregated events that make up this event.- Overrides:
getEventCountin classEvent- See Also:
iterator()
-
setEditable
public void setEditable(boolean isEditable)
Description copied from class:EventSets whether or not the Event start and end times are modifiable by the user via mouse interaction. This does not prevent programmatically changing the mouse bounds. For finer control over what the user is allowed to do when modifying the start and end time of an Event (without disallowing it completely) seeEvent.setStartTimeMoveable(boolean),Event.setResizeable(boolean), andEvent.setMinTimeSpan(double).- Overrides:
setEditablein classEvent
-
setEndTimeMoveable
public void setEndTimeMoveable(boolean isEndTimeMoveable)
Description copied from class:EventIf true, the endTime of the Event cannot be adjusted by user mouse gestures.- Overrides:
setEndTimeMoveablein classEvent
-
setStartTimeMoveable
public void setStartTimeMoveable(boolean isStartTimeMoveable)
Description copied from class:EventIf true, the startTime of the Event cannot be adjusted by user mouse gestures.- Overrides:
setStartTimeMoveablein classEvent
-
setResizeable
public void setResizeable(boolean isResizeable)
Description copied from class:EventIf true, the time span of the Event (the amount of time between the start and end times) cannot be adjusted by user mouse gestures. However, the Event may still be dragged.- Overrides:
setResizeablein classEvent
-
setMaxTimeSpan
public void setMaxTimeSpan(double maxTimeSpan)
Description copied from class:EventSets the maximum time span between the start and end times. By default the maximum is Double.MAX_VALUE.- Overrides:
setMaxTimeSpanin classEvent
-
setMinTimeSpan
public void setMinTimeSpan(double minTimeSpan)
Description copied from class:EventSets the minimum (inclusive) span between the start and end times. By default the minimum is 0.- Overrides:
setMinTimeSpanin classEvent
-
setTimes
public void setTimes(TimeStamp startTime, TimeStamp endTime, boolean force)
Description copied from class:EventSets the start and end time for this Event.
If force is false, then the constraints (see
Event.addConstraint(EventConstraint)) are taken into account and the final Event bounds might not be equal to the input arguments.
-
setFloatingRow
public void setFloatingRow()
Description copied from class:EventThe row this Event appears on will be managed by itsEventPlotInfoparent. IfEventPlotInfo.setStackOverlappingEvents(boolean)is set to true, then the row will be set to avoid overlaps with other events, otherwise the Event will be placed in the first row.- Overrides:
setFloatingRowin classEvent
-
setFixedRow
public void setFixedRow(int rowIndex)
Description copied from class:EventThis event will appear on the requested row index in the timeline regardless of whether that causes it to overlap with other Events.- Overrides:
setFixedRowin classEvent
-
setTimes
public void setTimes(TimeStamp startTime, TimeStamp endTime)
Description copied from class:Event
-
setStartTime
public void setStartTime(TimeStamp startTime)
- Overrides:
setStartTimein classEvent- See Also:
Event.setTimes(TimeStamp, TimeStamp, boolean)
-
setEndTime
public void setEndTime(TimeStamp endTime)
- Overrides:
setEndTimein classEvent- See Also:
Event.setTimes(TimeStamp, TimeStamp, boolean)
-
-