Class EventPlotInfo
- java.lang.Object
-
- com.metsci.glimpse.core.plot.stacked.PlotInfoWrapper
-
- com.metsci.glimpse.core.plot.timeline.layout.TimePlotInfoWrapper
-
- com.metsci.glimpse.core.plot.timeline.event.EventPlotInfo
-
- All Implemented Interfaces:
PlotInfo
,TimePlotInfo
public class EventPlotInfo extends TimePlotInfoWrapper implements TimePlotInfo
A handle to one of the plotting areas making up a
StackedTimePlot2D
. This is a specialized plotting area which supports display and manipulation ofEvent
objects.For an example of this plot in use, see
com.mcom.metsci.glimpse.examples.stacked.CollapsibleTimelinePlotExample
.- Author:
- ulman
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BUFFER_SIZE
static int
DEFAULT_ROW_SIZE
-
Constructor Summary
Constructors Constructor Description EventPlotInfo(TimePlotInfo delegate)
EventPlotInfo(TimePlotInfo delegate, TextureAtlas atlas)
-
Method Summary
-
Methods inherited from class com.metsci.glimpse.core.plot.timeline.layout.TimePlotInfoWrapper
addPainter, getAxisPainter, getBackgroundPainter, getBorderPainter, getCommonAxis, getCommonAxis, getDataAxisMouseListener, getDataPainter, getGridPainter, getLabelBorderPainter, getLabelLayout, getLabelPainter, getStackedTimePlot, removePainter, setAxisColor, setAxisFont, setBackgroundColor, setBorderWidth, setLabelBorderColor, setLabelBorderWidth, setLabelColor, setLabelText, setTimeToolTipHandler
-
Methods inherited from class com.metsci.glimpse.core.plot.stacked.PlotInfoWrapper
addLayout, deletePlot, getBaseLayout, getId, getIndentLevel, getLayout, getLayoutData, getOrder, getOrthogonalAxis, getOrthogonalAxis, getParent, getPlotSpacing, getSize, getStackedPlot, isExpanded, isGrow, isVisible, removePlot, setIndentLevel, setLayoutData, setLookAndFeel, setOrder, setParent, setPlotSpacing, setVisible, updateLayout
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.metsci.glimpse.core.plot.stacked.PlotInfo
addLayout, deletePlot, getBaseLayout, getId, getIndentLevel, getLayout, getLayoutData, getOrder, getOrthogonalAxis, getOrthogonalAxis, getParent, getPlotSpacing, getSize, getStackedPlot, isExpanded, isGrow, isVisible, removePlot, setIndentLevel, setLayoutData, setLookAndFeel, setOrder, setParent, setPlotSpacing, setVisible, updateLayout
-
Methods inherited from interface com.metsci.glimpse.core.plot.timeline.layout.TimePlotInfo
addPainter, getAxisPainter, getBackgroundPainter, getBorderPainter, getCommonAxis, getCommonAxis, getDataAxisMouseListener, getDataPainter, getGridPainter, getLabelBorderPainter, getLabelLayout, getLabelPainter, getStackedTimePlot, removePainter, setAxisColor, setAxisFont, setBackgroundColor, setBorderWidth, setLabelBorderColor, setLabelBorderWidth, setLabelColor, setLabelText, setTimeToolTipHandler
-
-
-
-
Field Detail
-
DEFAULT_ROW_SIZE
public static final int DEFAULT_ROW_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventPlotInfo
public EventPlotInfo(TimePlotInfo delegate)
-
EventPlotInfo
public EventPlotInfo(TimePlotInfo delegate, TextureAtlas atlas)
-
-
Method Detail
-
setDefaultIconSize
public void setDefaultIconSize(int size)
-
getDefaultIconSize
public int getDefaultIconSize()
-
isUseDefaultIconSize
public boolean isUseDefaultIconSize()
-
setUseDefaultIconSize
public void setUseDefaultIconSize(boolean useDefaultIconSize)
-
setAggregateNearbyEvents
public void setAggregateNearbyEvents(boolean aggregate)
-
isAggregateNearbyEvents
public boolean isAggregateNearbyEvents()
-
setEventPainter
public void setEventPainter(GroupedEventPainter painter)
-
getEventPainter
public GroupedEventPainter getEventPainter()
-
setSelectionHandler
public void setSelectionHandler(EventSelectionHandler selectionHandler)
-
getEventSelectionHandler
public EventSelectionHandler getEventSelectionHandler()
-
setEventToolTipHandler
public void setEventToolTipHandler(EventToolTipHandler toolTipHandler)
-
getTime
public TimeStamp getTime(GlimpseMouseEvent e)
-
isMouseDragEnabled
public boolean isMouseDragEnabled()
-
setMouseDragEnabled
public void setMouseDragEnabled(boolean enabled)
-
addEventPlotListener
public void addEventPlotListener(EventPlotListener listener)
-
removeEventPlotListener
public void removeEventPlotListener(EventPlotListener listener)
-
isStackOverlappingEvents
public boolean isStackOverlappingEvents()
-
setStackOverlappingEvents
public void setStackOverlappingEvents(boolean stack)
-
getRow
public int getRow(Object eventId)
-
setRowSize
public void setRowSize(int size)
Sets the size of a single row of events. An EventPlotInfo may contain multiple rows of events if some of those events overlap in time.
-
getRowSize
public int getRowSize()
-
getRowSize
public double getRowSize(GlimpseBounds bounds)
-
setGrow
public void setGrow(boolean grow)
Description copied from interface:PlotInfo
Sets the plot to fill all available space. First, fixed size plots are given their space (set by
PlotInfo.setSize(int)
) and then all plots set to grow fill the remaining space.Setting the plot size to a negative value is the same as setting grow to true (but this behavior is deprecated and
PlotInfo.setGrow(boolean)
should be used). Setting size to a positive value will set grow to false.- Specified by:
setGrow
in interfacePlotInfo
- Overrides:
setGrow
in classPlotInfoWrapper
-
setSize
public void setSize(int size)
Description copied from interface:PlotInfo
Sets the size in pixels for this plot. If
size < 0
, then the plot will attempt to fill all available space, sharing space evenly with other plots with negative size.For a VERTICAL oriented plot,
setSize( )
adjusts the plot height, for a HORIZONTAL oriented plot, the width is adjusted.- Specified by:
setSize
in interfacePlotInfo
- Overrides:
setSize
in classPlotInfoWrapper
- Parameters:
size
- the size of the plot in pixels.
-
setEventPadding
public void setEventPadding(int size)
-
getEventPadding
public int getEventPadding()
-
setRowMaxCount
public void setRowMaxCount(int count)
-
getRowMaxCount
public int getRowMaxCount()
-
setRowMinCount
public void setRowMinCount(int count)
-
getRowMinCount
public int getRowMinCount()
-
getRowCount
public int getRowCount()
-
updateSize
public void updateSize()
-
isTextColorSet
public boolean isTextColorSet()
-
isBackgroundColorSet
public boolean isBackgroundColorSet()
-
isBorderColorSet
public boolean isBorderColorSet()
-
getTextRenderer
public TextRenderer getTextRenderer()
-
getDefaultIconId
public Object getDefaultIconId()
-
getTextureAtlas
public TextureAtlas getTextureAtlas()
-
setDefaultEventBorderThickness
public void setDefaultEventBorderThickness(float thickness)
-
getDefaultEventBorderThickness
public float getDefaultEventBorderThickness()
-
setDefaultEventBackgroundColor
public void setDefaultEventBackgroundColor(float[] backgroundColor)
-
getDefaultEventBackgroundColor
public float[] getDefaultEventBackgroundColor()
-
setDefaultEventBorderColor
public void setDefaultEventBorderColor(float[] borderColor)
- Specified by:
setDefaultEventBorderColor
in interfaceTimePlotInfo
- Overrides:
setDefaultEventBorderColor
in classTimePlotInfoWrapper
-
getDefaultEventBorderColor
public float[] getDefaultEventBorderColor()
-
setDefaultEventTextColor
public void setDefaultEventTextColor(float[] textColor)
-
getTextColorNoBackground
public float[] getTextColorNoBackground()
-
getTextColor
public float[] getTextColor()
-
setFont
public void setFont(Font font, boolean antialias)
-
getEventBounds
public EventBounds getEventBounds(Object id)
-
getEventManager
public EventManager getEventManager()
-
addEvent
public void addEvent(Event event)
-
removeEvent
public void removeEvent(Event event)
-
removeEvent
public void removeEvent(Object id)
-
removeAllEvents
public void removeAllEvents()
-
setTextRenderingMode
public void setTextRenderingMode(Event.TextRenderingMode mode)
Sets the TextRenderingMode for allEvent
children of this EventPlotInfo. This value will also be the default of any newly created Events. The value can be overridden on a per-Event basis usingEvent#setTextRenderingMode(OverlapRenderingMode)
. However, the next call toEventPlotInfo#setTextRenderingMode(OverlapRenderingMode)
will reset all Events to the same value.
-
getTextRenderingMode
public Event.TextRenderingMode getTextRenderingMode()
- See Also:
setTextRenderingMode(TextRenderingMode)
-
updateEventRow
public void updateEventRow(GlimpseMouseEvent mouseEvent, Event event, int rowIndex)
-
validate
public void validate()
-
getEventLayout
public GlimpseAxisLayout1D getEventLayout()
-
-